STL to STEP

From Open Source Ecology
Jump to: navigation, search

Problem Statement

STL files are to be found everywhere in the 3D printing world, and it is useful to edit them. For OSE, our core CAD tool is FreeCAD. However, one has to step into the slow lane by using OpenSCAD to modify STLs, as there is no great way to edit STLs in FreeCAD.

Effectively, STLs are useless from the standpoint of re-design within FreeCAD -as they are meshes and do not work the same way as solids (boundary representation objects like STEP). FreeCAD works easily with STEP imports - and STEP files can be modified. Not so for STLs. Sometimes STLs can be imported and made into solids in FreeCAD, see FreeCAD 101 video number 2.

It appears that the best workflow for STL modification (derivatives of STL files when FreeCAD source is not available) is to use an STL editor such as OpenSCAD or BlocksCAD or OpenJSCAD. Modification occurs in the STL editor, and then the file is imported to FreeCAD. PITA, but that's all we have for now in the open source.

A good open source STL to STEP converted would be very useful to the open source community.

Does the OpenSCAD workbench do the same in FreeCAD? Yes, as long the OpenSCAD text file is available, it can be rendered - and EDITED - in the FreeCAD OpenSCAD workbench - apparently as if it were a solid object - see [1].

Reverse Engineering STL to OpenSCAD so it Can Be Edited in FreeCAD

  • Advanced workflow using Meshlab- [2]
  • Here is an STL to OpenSCAD converter on thingiverse, which converts STL format to OpenSCAD format. https://www.thingiverse.com/thing:62666 - but it doesn't appear to work.
  • Python program for doing so - [3]
  • Seems limit will be length of a file that FreeCAD can handle if done this way.

Options

  • FreeCAD has an export of STL to STEP, but sometimes it doesn't work. You have to repair mesh, convert mesh to shape, and convert to solid (meshes are shells). See FreeCAD 101 tutorial.
  • Gmsh may have export to STEP? [4]
  • MeshLab has export to DXF 3D format, and importing to FreeCAD works (MJ). It may break for large files?
  • If OpenSCAD file is available - it can be processed in OpenSCAD command line to make it smooth upon import to FreeCAD. [5]

Scaling

  • FreeCAD scaling is tricky. Another way to do it is to convert to STL, and scale in simple platforms like BlocksCAD or Cura.