Arch MeshToShape: Difference between revisions

From FreeCAD Documentation
(Undo revision 1124009 by David69 (talk)This is not correct.)
Tag: Undo
No edit summary
(One intermediate revision by the same user not shown)
Line 6: Line 6:
|[[Arch_SplitMesh|SplitMesh]]
|[[Arch_SplitMesh|SplitMesh]]
|[[Arch_SelectNonSolidMeshes|SelectNonSolidMeshes]]
|[[Arch_SelectNonSolidMeshes|SelectNonSolidMeshes]]
|[[Arch_Workbench|Arch]]
|[[BIM_Workbench|BIM]]
|IconL=Arch_SplitMesh.svg
|IconL=Arch_SplitMesh.svg
|IconR=Arch_SelectNonSolidMeshes.svg
|IconR=Arch_SelectNonSolidMeshes.svg
|IconC=Workbench_Arch.svg
|IconC=Workbench_BIM.svg
}}
}}

{{VeryImportantMessage|THIS COMMAND IS PART OF THE INTEGRATED [[BIM_Workbench|BIM WORKBENCH]] IN V1.0<br>
This page has been updated for that version.}}


<!--T:1-->
<!--T:1-->
{{GuiCommand
{{GuiCommand
|Name=Arch MeshToShape
|Name=Arch MeshToShape
|MenuLocation=Arch → Utilities → Mesh to Shape
|MenuLocation=Utils → Mesh to Shape
|Workbenches=[[Arch_Workbench|Arch]]
|Workbenches=[[BIM_Workbench|BIM]]
|SeeAlso=[[Arch_SplitMesh|Arch SplitMesh]], [[Arch_RemoveShape|Arch RemoveShape]]
|SeeAlso=[[Arch_SplitMesh|Arch SplitMesh]], [[Arch_RemoveShape|Arch RemoveShape]]
}}
}}
Line 32: Line 35:
<!--T:5-->
<!--T:5-->
# Select a mesh object.
# Select a mesh object.
# Press the {{Button|[[Image:Arch MeshToShape.svg|16px]] [[Arch_MeshToShape|Mesh to Shape]]}} entry in {{MenuCommand|Arch → Utilities → Mesh to Shape}}.
# Select the {{MenuCommand|Utils → [[Image:Arch_MeshToShape.svg|16px]] Mesh to Shape}} option from the menu.


==Properties== <!--T:15-->
==Properties== <!--T:15-->
Line 80: Line 83:
|[[Arch_SplitMesh|SplitMesh]]
|[[Arch_SplitMesh|SplitMesh]]
|[[Arch_SelectNonSolidMeshes|SelectNonSolidMeshes]]
|[[Arch_SelectNonSolidMeshes|SelectNonSolidMeshes]]
|[[Arch_Workbench|Arch]]
|[[BIM_Workbench|BIM]]
|IconL=Arch_SplitMesh.svg
|IconL=Arch_SplitMesh.svg
|IconR=Arch_SelectNonSolidMeshes.svg
|IconR=Arch_SelectNonSolidMeshes.svg
|IconC=Workbench_Arch.svg
|IconC=Workbench_BIM.svg
}}
}}


</translate>
</translate>
{{Arch Tools navi{{#translation:}}}}
{{BIM_Tools_navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}

Revision as of 19:25, 9 June 2024

THIS COMMAND IS PART OF THE INTEGRATED BIM WORKBENCH IN V1.0
This page has been updated for that version.

Arch MeshToShape

Menu location
Utils → Mesh to Shape
Workbenches
BIM
Default shortcut
None
Introduced in version
-
See also
Arch SplitMesh, Arch RemoveShape

Description

Arch MeshToShape converts a selected Mesh (Mesh Feature) object into a Shape (Part Feature) object.

This tool is optimized for objects with flat faces (no curves). The corresponding tool Part ShapeFromMesh from the Part Workbench might be more suited for objects that contain curved surfaces.

Usage

  1. Select a mesh object.
  2. Select the Utils → Mesh to Shape option from the menu.

Properties

Limitations

Scripting

See also: Arch API and FreeCAD Scripting Basics.

This tool can be used in macros and from the Python console by using the following function:

new_obj = meshToShape(obj, mark=True, fast=True, tol=0.001, flat=False, cut=True)

The above code snippet converts the given obj (a mesh), into a shape, joining coplanar facets.

  • If mark is True, non-solid objects will be marked in red.
  • If fast is True, it uses a faster algorithm by building a shell from the facets then removing splitter.
  • tol is the tolerance used when converting mesh segments to wires.
  • If flat is True, it will force the wires to be perfectly planar to be sure they can be converted into faces, but this might leave gaps in the final shell.
  • If cut is True, holes in faces are made by subtraction.

Example:

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)