cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to import OpenSCAD file into Fusion360 as a solid body

How to import OpenSCAD file into Fusion360 as a solid body

I found an acceptable way to import OpenSCAD files into a fully editable Fusion360 body and I thought I would share in case it can help someone else.

 

  • Download OpenSCAD file and open in OpenSCAD (https://www.openscad.org/)
  • Export to .CSG in OpenSCAD
  • Download and install FreeCAD (https://www.freecadweb.org/)
  • Open the saved .CSG file in FreeCAD
  • Select the model in the model tab (mine was auto-named "Matrix_Union")
  • Go to File>Export (Ctrl+E) and Export to "STEP with colors (*.step, *.stp)" and save
  • Open Fusion360 and select File>Open (Ctrl+O)>"Open from my computer..."
  • Select the saved .step file and open
  • Now you should have a converted body that is able to be edited non-destructively

 

I often come across files on thingiverse and elsewhere with OpenSCAD files, but I could not figure out a good way to import these files into Fusion360 while maintaining the proper shapes and dimensions without dealing with a mesh.

 

When I use an imported STL (mesh converted to Brep) the faces are not continuous and I cannot adjust tolerances with the press-pull function

Failed press-pull on continuous face from SCAD>STL File conversionFailed press-pull on continuous face from SCAD>STL File conversion

 

When I convert from SCAD to CSG in OpenSCAD, then from CSG to STEP in FreeCAD (as per the workflow above) the continuous face is easily adjusted with the press-pull function

Successful press-pull on continuous face from SCAD>CSG>STEP File conversionSuccessful press-pull on continuous face from SCAD>CSG>STEP File conversion

4 Comments
tarekmid
Explorer

I am also working with a camera mount so that was a coincidence! I love your solution. However I am struggling at the last step, getting a messy result in Fusion360.

 

Here is what it looks like in FreeCAD:

tarekmid_1-1638073624365.png

vs how Fusion360 interprets the exported STEP:

tarekmid_2-1638073662647.png

 

 

howard.vass
Explorer

Thanks for the guide, @Anonymous

 

It seems you missed a bit though.

 

In FreeCAD go to Edit > Preferences > Workbenches > OpenSCAD > Load now (probably a good idea to check the Autoload option too).

 

I the model tab, I had loads of items called Line001, Line002, etc. So I just pressed Ctrl+A to select all, then File > Export.

 

Edit: I have now learned that selecting Group001 from the list, instead of selecting all, is a far better option.

 

I was getting a ton of errors like this when trying to open an .CSG file created in OpenSCAD, before stumbling upon the solution.

 

 

01:47:28  WARNING: Token 'DOT' defined, but not used
01:47:28  WARNING: Token 'WORD' defined, but not used
01:47:28  WARNING: There are 2 unused tokens
01:47:28  Traceback (most recent call last):
  File "C:\Program Files\FreeCAD 0.20\Mod\OpenSCAD\OpenSCADFeatures.py", line 583, in execute
    shape = OpenSCAD.OpenSCADUtils.process_ObjectsViaOpenSCADShape(fp.Document,fp.Children,\
  File "C:\Program Files\FreeCAD 0.20\Mod\OpenSCAD\OpenSCADUtils.py", line 703, in process_ObjectsViaOpenSCADShape
    return process2D_ObjectsViaOpenSCADShape(children,name,doc)
  File "C:\Program Files\FreeCAD 0.20\Mod\OpenSCAD\OpenSCADUtils.py", line 637, in process2D_ObjectsViaOpenSCADShape
    tmpfilename = callopenscadstring('%s(){%s}' % (Operation,dxfimports),'dxf')

 

 

 

 

Thanks again for getting me 99.99% of the way there ‌🙂

 

Now if only there were a way to do the same thing with .stl files

shaneLTBEM
Observer

I know this is an old post, but this doesn't really work for me. When I open the CSG file in FreeCAD and/or open the STEP file in Fusion 360 there are all bodies but the all have tons of faces no different than importing a STL file. I've been playing around with different options and nothing works. Any other ideas?

JEDtoo
Community Visitor

I tried this procedure and IT WORKED!  I have a system with Ubuntu 20.04.5 LTS and did "apt-get install openscad freecad" to install both. openscad worked to read then export the model. Couldn't open freecad but found I could fix that error with "apt-get install python3-pyqt5" but got other error "import ply.lex could not be resolved". Found I could fix THAT error with "apt install python3-pip" followed with "pip install ply".

 

After all that I could open my spoolholder.scad and then file->export spoolholder.csg and close scad. I then started freecad and opened spoolholder.csg. In the model menu on the left I selected all the geometry and then did file->export step with colors to make spoolholder.step. I moved that to my Windoze 10 machine and opened it in fusion360 and saw extrusions, polygons, unions and things.

 

If it sounds like I don't really know how to use any of this stuff, then you are getting the right impression. I've NEVER used scad or freecad before today and I'm on day 1 of "learn fusion 360 in 30 days" which has taken me a week so far.  Still with the kind help of this post, I moved a thingiverse scad model into fusion360 with geometry that seems intact! YMMV

Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea  

Technology Administrators


Autodesk Design & Make Report