Arch SplitMesh/pt-br: Difference between revisions

From FreeCAD Documentation
(Created page with "==Descrição==")
(Updating to match new version of source page)
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<languages/>
<languages/>

<div class="mw-translate-fuzzy">
{{Docnav
{{Docnav
|[[Arch_CloneComponent/pt-br|Clonar componente]]
|[[Arch_CloneComponent/pt-br|Clonar componente]]
|[[Arch_MeshToShape/pt-br|Malha para uma forma]]
|[[Arch_MeshToShape/pt-br|Malha para uma forma]]
|[[Arch_Module/pt-br|Arch]]
|[[Arch_Workbench/pt-br|Arch]]
|IconL=Arch_CloneComponent.svg
|IconL=Arch_CloneComponent.svg
|IconR=Arch_MeshToShape.svg
|IconR=Arch_MeshToShape.svg
|IconC=Workbench_Arch.svg
|IconC=Workbench_Arch.svg
}}
}}
</div>


{{GuiCommand
{{GuiCommand
|Name=Arch SplitMesh
|Name=Arch SplitMesh
|MenuLocation=Arch → Utilities → Split Mesh
|MenuLocation=Arch → Utilities → Split Mesh
|Workbenches=[[Arch_Module|Arch]]
|Workbenches=[[Arch_Workbench|Arch]]
|SeeAlso=[[Arch_SelectNonSolidMeshes|Arch SelectNonSolidMeshes]], [[Arch_MeshToShape|Arch MeshToShape]]
|SeeAlso=[[Arch_SelectNonSolidMeshes|Arch SelectNonSolidMeshes]], [[Arch_MeshToShape|Arch MeshToShape]]
}}
}}
Line 20: Line 23:
This tool splits a selected [[Mesh_Workbench|Mesh]] object into its separate components
This tool splits a selected [[Mesh_Workbench|Mesh]] object into its separate components


==Usage==
==Utilização==


# Select a mesh object.
# Select a mesh object.
Line 26: Line 29:


==Scripting==
==Scripting==

{{Emphasis|See also:}} [[Arch_API|Arch API]] and [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].
{{Emphasis|See also:}} [[Arch_API|Arch API]] and [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].


The SplitMesh tool can be used in [[macros|macros]] and from the [[Python|Python]] console by using the following function:
The SplitMesh tool can be used in [[Macros|macros]] and from the [[Python|Python]] console by using the following function:


{{Code|code=
{{Code|code=
Line 35: Line 39:


* Splits the given mesh object ({{incode|obj}}) into separated components.
* Splits the given mesh object ({{incode|obj}}) into separated components.
* If {{incode|mark}} is {{incode|True}} [http://en.wikipedia.org/wiki/Manifold non-manifold] components will be painted red.
* If {{incode|mark}} is {{incode|True}} [https://en.wikipedia.org/wiki/Manifold non-manifold] components will be painted red.
* {{incode|new_list}} is a list of all the individual components that make the mesh.
* {{incode|new_list}} is a list of all the individual components that make the mesh.


Line 57: Line 61:
}}
}}



<div class="mw-translate-fuzzy">
{{Docnav
{{Docnav
|[[Arch_CloneComponent|Clone component]]
|[[Arch_CloneComponent/pt-br|Clonar componente]]
|[[Arch_MeshToShape|Mesh To Shape]]
|[[Arch_MeshToShape/pt-br|Malha para uma forma]]
|[[Arch_Module|Arch]]
|[[Arch_Workbench/pt-br|Arch]]
|IconL=Arch_CloneComponent.svg
|IconL=Arch_CloneComponent.svg
|IconR=Arch_MeshToShape.svg
|IconR=Arch_MeshToShape.svg
|IconC=Workbench_Arch.svg
|IconC=Workbench_Arch.svg
}}
}}
</div>


{{Arch Tools navi{{#translation:}}}}
{{Arch_Tools_navi{{#translation:}}}}

{{Userdocnavi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}

Latest revision as of 16:52, 12 March 2022

Arch SplitMesh

Menu location
Arch → Utilities → Split Mesh
Workbenches
Arch
Default shortcut
None
Introduced in version
-
See also
Arch SelectNonSolidMeshes, Arch MeshToShape

Descrição

This tool splits a selected Mesh object into its separate components

Utilização

  1. Select a mesh object.
  2. Press the Split Mesh entry in Arch → Utilities → Split Mesh.

Scripting

See also: Arch API and FreeCAD Scripting Basics.

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

new_list = splitMesh(obj, mark=True)
  • Splits the given mesh object (obj) into separated components.
  • If mark is True non-manifold components will be painted red.
  • new_list is a list of all the individual components that make the mesh.

Example:

import FreeCAD, Draft, Arch, Mesh, MeshPart

Line = Draft.makeWire([FreeCAD.Vector(0, 0, 0),FreeCAD.Vector(2000, 2000, 0)])
Wall = Arch.makeWall(Line, width=150, height=3000)
FreeCAD.ActiveDocument.recompute()

Shape = Wall.Shape.copy(False)
Shape.Placement = Wall.getGlobalPlacement()

mesh_obj = FreeCAD.ActiveDocument.addObject("Mesh::Feature", "Mesh")
mesh_obj.Mesh = MeshPart.meshFromShape(Shape=Shape, MaxLength=520)
mesh_obj.ViewObject.DisplayMode = "Flat Lines"

new_list = Arch.splitMesh(mesh_obj)