FreeCADが提供する API を使用して、STEP ファイルを別の 3D 形式に変換できます。
APIはPythonで書かれていますが、PHPでPip - Pythonを使用できます
Python を使用してファイルを STEP から OBJ 形式に変換する方法を示す例を次に示します。
import os
import ImportGui
files = os.listdir("path")
for file in files:
ImportGui.open("path" + file)
App.setActiveDocument("Unnamed")
App.ActiveDocument=App.getDocument("Unnamed")
Gui.ActiveDocument=Gui.getDocument("Unnamed")
Gui.SendMsgToActiveView("ViewFit")
__objs__=[]
__objs__.append(FreeCAD.getDocument("Unnamed").getObject("Part__Feature"))
index = 1
base = 'Part__Feature00'
while FreeCAD.getDocument("Unnamed").getObject(base + str(index)) is not None:
__objs__.append(FreeCAD.getDocument("Unnamed").getObject(base + str(index)))
index+=1
import Mesh
Mesh.export(__objs__,"path" + file + ".obj")
del __objs__
App.closeDocument("Unnamed")