Jump to navigation Jump to search
|Arch → Utilities → Mesh to Shape|
|Introduced in version|
|Arch SplitMesh, Arch RemoveShape|
This tool converts a selected Mesh object into a Shape object. Note that this tool is optimized for objects with flat faces (no curves). The corresponding tool from the Part Workbench might be more suited for objects that contain curved surfaces.
How to use
- Select a mesh object.
- Press the entry in Arch → Utilities → Mesh to Shape.
new_obj = meshToShape(obj, mark=True, fast=True, tol=0.001, flat=False, cut=True)
- Turns the given
obj, a mesh, into a shape, joining coplanar facets.
True, non-solid objects will be marked in red.
Trueit uses a faster algorithm by building a shell from the facets then removing splitter.
tolis the tolerance used when converting mesh segments to wires.
Trueit will force the wires to be perfectly planar, to be sure they can be turned into faces, but this might leave gaps in the final shell.
Trueholes in faces are made by subtraction.
import Arch, Mesh, BuildRegularGeoms Box = FreeCAD.ActiveDocument.addObject("Mesh::Cube", "Cube") Box.Length = 1000 Box.Width = 2000 Box.Height = 1000 FreeCAD.ActiveDocument.recompute() new_obj = Arch.meshToShape(Box)