Open missionsave opened 5 months ago
I got this code working, but the stl files looses the position and rotation of the parts in the assembly a2plus, how to fix that?
`
import FreeCAD import Mesh doc = App.ActiveDocument export_directory = "./" for obj in doc.Objects: if obj.isDerivedFrom("Part::Feature"): global_transform = obj.Placement temp_obj = doc.addObject("Part::Feature", obj.Label + "_temp") temp_obj.Shape = obj.Shape temp_obj.Placement = global_transform stl_path = export_directory + obj.Label + ".stl" Mesh.export([temp_obj], stl_path) doc.removeObject(temp_obj.Name)`
Thanks
Well, tested in the latest development build of Freecad and it saves the positions allright with the assembly, but the front view appears as top view in the stl files, they're all rotated but consistent.
I got this code working, but the stl files looses the position and rotation of the parts in the assembly a2plus, how to fix that?
`
Thanks