Mesh Disassembly using Python

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
ahmed807
Posts: 1
Joined: Wed Mar 27, 2019 10:46 am

Mesh Disassembly using Python

Post by ahmed807 »

Hello Everyone,

I have tried to import a .stp file from python and get the different objects in it from the treeview and save each part alone, now I am trying to do the same thing with an .stl file but I can't. I even don't know how to do it from the gui.

So if anyone knows how to disassemble a mesh file please help. Also I tried to convert it to a part model but then also I can not get the different parts inside the model.

Thanks in advance.
User avatar
microelly2
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Mesh Disassembly using Python

Post by microelly2 »

A stl file creates a mesh, this is a list of triangle faces. There is no inner structure what you can break into subparts.
The only way I see is to select submeshes and approximate them by CAD primitives.
You have access to the topology by the mesh workbench api.
Post Reply