Importing OpenSCAD designs into Onshape

After using Onshape CAD software for a while I am really fond of it. So one natural thing to do, specially once they have released the Instructor's kit is to start using it in the classroom too. But one thing I was not so sure how to do was to use old designs I made using OpenSCAD.

It does not mean I am completely quitting using OpenSCAD but suddenly I can see I can do assemblies in Onshape that will look quite nice for showing and documentation purposes if only I could easily import from OpenSCAD.

I am glad to report that the route OpenSCAD --> FreeCAD --> Onshape worked brilliantly. Even more when a few tricks were applied. While some people suggest to import CSG files from OpenSCAD to FreeCAD, I have had more success by directly importing SCAD files into FreeCAD. One trick that worked well for me was to get rid of $fn references, so now circles become real circles (or cylinders) in FreeCAD.


If a part keeps some $fn references then your cylinders or circles will keep the desired number of facets, which may be the desired intent in some cases.

This workflow: import .scad file in FreeCAD and export it from there as .step file will create a STEP file that Onshape will happily import into a part studio with no further intervention on your side. 

Once this process is done with all your parts you can easily create an assembly of your machine in Onshape, including rotating and sliding mates that will allow you see your mechanism in motion.

Comments

Shai said…
I tried this. But freecad can't open scad files and there's no options in scad to export to any of the other formats freecad supports other than CSG. And that didn't work either when opening in freecad. Any other ideas or more details on your workflow?

Thank you!
misan said…
Maybe your FreeCAD version is an old build. This is the file chooser of mine (0.16), but I reckon it worked from 0.14) http://imgur.com/a/ePbPy
misan said…
Oops, I know what happens. 0.14 accepted .scad extension (when I wrote this entry) but not anymore, now you have to use .csg instead (that can easily created from OpenSCAD anyway). Other that that, it is working for me now.

Popular posts from this blog

VFD control with Arduino using RS485 link

How to get sinusoidal s-curve for a stepper motor