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.
Jirka said…
not work for me. When i export step file from FreeCAD and import to Onshape i don't have any change to edit model only update or dovnload step file.

In import process in Onshape i have 3 options to select:
1. Import to a single document
2. Split into multiple document
3. Combine a single part studio

Witch option is right?
misan said…
@Jirka:

It appears as if you have successfully imported the file into Onshape but you are puzzled as you cannot modify it as if the part was originally built in Onshape. That is to be expected.

I am not aware of a way of importing a part in Onshape that creates the whole history creation of the features so you later can edit. You can just do direct editing with that part: https://learn.onshape.com/courses/direct-editing

Popular posts from this blog

VFD control with Arduino using RS485 link

How to get sinusoidal s-curve for a stepper motor

Stepper motor step signal timing calculation