I have been working on a project to convert CAD files from different formats (OBJ, FBX, COLLADA, 3DS, IGES, STEP, VRML/X3D) to STL. Recently, I posted this question on stackoverflow to convert STEP file to STL format and was successfully able to do so. Right now, I am working on converting an OBJ file to STL format using FREECAD and Python. Are there any python examples to convert OBJ to STL so that I know where to start and how to proceed?
I found the answer online. More details can be found by referencing this script. The short answer is:
Mesh.open("inputFileName.obj")
o = FreeCAD.getDocument("Unnamed").findObjects()[0]
Mesh.export([o], "outputFileName.stl")