Code: Select all
mesh_Cyl_2 = App.ActiveDocument.addObject("Mesh::Feature","Mesh_Cyl_2")
mesh_Cyl_2.Mesh=MeshPart.meshFromShape(Shape=obj_Cyl_2.Shape.copy(False), LinearDeflection=0.5, AngularDeflection=0.05, Relative=False)
mesh_Cut_1 = App.ActiveDocument.addObject("Mesh::Feature","Mesh_Cut_1")
mesh_Cut_1.Mesh=MeshPart.meshFromShape(Shape=obj_Cut_1.Shape.copy(False), LinearDeflection=0.5, AngularDeflection=0.05, Relative=False)
__objs__=[]
__objs__.append(mesh_Cyl_2)
__objs__.append(mesh_Cut_1)
Mesh.export(__objs__,"myfile.stl")
Code: Select all
__objs__=[]
__objs__.append(obj_Cyl_2) # Shape object
__objs__.append(obj_Cut_1) # Shape object
Mesh.export(__objs__,"myfile.stl")