Arch SplitMesh/sv: Difference between revisions
Renatorivo (talk | contribs) (Created page with "Category:Arch/sv") |
(Updating to match new version of source page) |
||
Line 1: | Line 1: | ||
<languages/> |
<languages/> |
||
{{docnav|[[Arch_CloneComponent|Clone component]]|[[Arch_MeshToShape|Mesh To Shape]]|[[Arch_Module|Arch]]}} |
|||
<div class="mw-translate-fuzzy"> |
|||
{{GuiCommand/sv|Name=Arch SplitMesh|Name/sv=Arch SplitMesh|Workbenches=[[Arch Module/sv|Arch]]|MenuLocation=Arch → Utilities → Split Mesh|SeeAlso=[[Arch SelectNonSolidMeshes/sv|Arch SelectNonSolidMeshes]]}} |
{{GuiCommand/sv|Name=Arch SplitMesh|Name/sv=Arch SplitMesh|Workbenches=[[Arch Module/sv|Arch]]|MenuLocation=Arch → Utilities → Split Mesh|SeeAlso=[[Arch SelectNonSolidMeshes/sv|Arch SelectNonSolidMeshes]]}} |
||
</div> |
|||
====Beskrivning==== |
====Beskrivning==== |
||
Line 8: | Line 12: | ||
==How to use== |
==How to use== |
||
# Select a mesh object |
# Select a mesh object. |
||
# Press the {{ |
# Press the {{Button|[[Image:Arch SplitMesh.png|16px]] [[Arch SplitMesh|Split Mesh]]}} entry in {{MenuCommand|Arch → Utilities → Split Mesh}}. |
||
==Scripting== |
==Scripting== |
||
{{Emphasis|See also:}} [[Arch API]] and [[FreeCAD Scripting Basics]]. |
|||
The |
The SplitMesh tool can be used in [[macros]] and from the [[Python]] console by using the following function: |
||
{{Code|code= |
{{Code|code= |
||
new_list = splitMesh(obj, mark=True) |
|||
splitMesh (object,[mark]) |
|||
}} |
}} |
||
⚫ | |||
⚫ | |||
If mark is |
* If {{incode|mark}} is {{incode|True}} [http://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. |
|||
Example: |
|||
{{Code|code= |
|||
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) |
|||
}} |
|||
{{docnav|[[Arch_CloneComponent|Clone component]]|[[Arch_MeshToShape|Mesh To Shape]]|[[Arch_Module|Arch]]}} |
|||
<div class="mw-translate-fuzzy"> |
|||
[[Category:Arch/sv]] |
[[Category:Arch/sv]] |
||
</div> |
Revision as of 12:57, 5 February 2019
Arch SplitMesh |
Menyplacering |
---|
Arch → Utilities → Split Mesh |
Arbetsbänkar |
Arch |
Standard genväg |
Ingen |
Introducerad i version |
- |
Se även |
Arch SelectNonSolidMeshes |
Beskrivning
This tool splits a selected Mesh object into its separate components
How to use
- Select a mesh object.
- 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
isTrue
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)