New in 0.20: Improved OpenSCAD Compatibility

Graphic of OpenSCAD importing into FreeCAD

FreeCAD has sup­port­ed import­ing *.scad and *.csg files from Open­SCAD for sev­er­al years, but sup­port­ing the full range of fea­tures pro­vid­ed by Open­SCAD is an ongo­ing project. The FreeCAD 0.20 release brings improved com­pat­i­bil­i­ty with sev­er­al more com­mands, as well as bug fix­es to sev­er­al exist­ing commands.

Low-poly modeling

Open­SCAD and FreeCAD have dif­fer­ent mod­el­ing strate­gies: Open­SCAD is fun­da­men­tal­ly dis­crete, where­as FreeCAD typ­i­cal­ly main­tains math­e­mat­i­cal­ly-pre­cise object def­i­n­i­tions with­out sur­face dis­cretiza­tion (unless explic­it­ly told to dis­cretize using the Mesh work­bench, etc.). Most of the time when import­ing from Open­SCAD, the dis­cretized object is replaced by its equiv­a­lent “exact” FreeCAD object: how­ev­er, this is not always the Open­SCAD geom­e­try design­er’s intent. For exam­ple, some­times a cylin­der with only eight sides (i.e. $fn=8 in Open­SCAD) is real­ly intend­ed to have an octag­o­nal cross-sec­tion which is not intend­ed to be a per­fect cir­cle. FreeCAD 0.20 improves sup­port for this mod­el­ing strat­e­gy to include low-$fn sweeps and revolutions.

Surfaces from data

When cre­at­ing a sur­face from a set of 2D data points and some arbi­trary data val­ue at those points, pre­vi­ous ver­sions of FreeCAD “un-dis­cretized” that sur­face and cre­at­ed a Bezi­er sur­face rep­re­sen­ta­tion. How­ev­er, this con­flict­ed with Open­SCAD’s ful­ly-dis­crete geom­e­try rep­re­sen­ta­tion and often result­ed in extreme spikes in the splined sur­face. FreeCAD now remains faith­ful to the orig­i­nal dis­crete sur­face geom­e­try and gives results more akin to what would be seen direct­ly in OpenSCAD.

Improved extrusions

FreeCAD now ful­ly sup­ports tapered and twist­ed extru­sions, in both low-$fn and non-dis­cretized versions.

Improved Snap/AppImage support

For users with the lat­est ver­sion of Open­SCAD installed (2021.01) FreeCAD now sup­ports the new pipe-based data trans­mis­sion method. The upshot of this new method is that even if FreeCAD and Open­SCAD are installed as Snap or AppIm­age pack­ages (pre­clud­ing com­mu­ni­ca­tion using files in /tmp because the dif­fer­ent pack­ages will be pre­vent­ed from access­ing each oth­er’s temp files), they can still exchange data. As a fall­back for old­er ver­sions of Open­SCAD, users can now explic­it­ly set the trans­fer direc­to­ry to some­place where both pro­grams can access files (for exam­ple, the user’s home directory).

%d bloggers like this: