Arch SplitMesh: Difference between revisions
(Vertical GuiCoOmmand; {{Button}} instead of {{KEY}} template; full stops) |
Tag: Undo |
||
(23 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
<languages/> |
<languages/> |
||
<translate> |
<translate> |
||
⚫ | |||
{{Docnav |
|||
|[[Arch_CloneComponent|Clonecomponent]] |
|||
|[[Arch_MeshToShape|MeshToShape]] |
|||
|[[Arch_Workbench|Arch]] |
|||
|IconL=Arch_CloneComponent.svg |
|||
|IconR=Arch_MeshToShape.svg |
|||
|IconC=Workbench_Arch.svg |
|||
}} |
|||
<!--T:1--> |
<!--T:1--> |
||
{{GuiCommand |
{{GuiCommand |
||
|Name=Arch SplitMesh |
|Name=Arch SplitMesh |
||
|MenuLocation=Arch → Utilities → Split Mesh |
|MenuLocation=Arch → Utilities → Split Mesh |
||
|Workbenches=[[ |
|Workbenches=[[Arch_Workbench|Arch]] |
||
|SeeAlso=[[Arch SelectNonSolidMeshes]] |
|SeeAlso=[[Arch_SelectNonSolidMeshes|Arch SelectNonSolidMeshes]], [[Arch_MeshToShape|Arch MeshToShape]] |
||
}} |
}} |
||
Line 12: | Line 23: | ||
<!--T:3--> |
<!--T:3--> |
||
This tool splits a selected [[ |
This tool splits a selected [[Mesh_Workbench|Mesh]] object into its separate components |
||
== |
==Usage== <!--T:4--> |
||
<!--T:5--> |
<!--T:5--> |
||
# Select a mesh object. |
# Select a mesh object. |
||
# Press the {{Button|[[Image: |
# Press the {{Button|[[Image:Arch_SplitMesh.svg|16px]] [[Arch_SplitMesh|Split Mesh]]}} entry in {{MenuCommand|Arch → Utilities → Split Mesh}}. |
||
==Scripting== <!--T: |
==Scripting== <!--T:16--> |
||
⚫ | |||
{{Emphasis|See also:}} [[Arch_API|Arch API]] and [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]]. |
|||
<!--T:7--> |
<!--T:7--> |
||
The |
The SplitMesh tool can be used in [[Macros|macros]] and from the [[Python|Python]] console by using the following function: |
||
</translate> |
</translate> |
||
{{Code|code= |
{{Code|code= |
||
new_list = splitMesh(obj, mark=True) |
|||
splitMesh (object,[mark]) |
|||
}} |
}} |
||
<translate> |
<translate> |
||
<!--T:8--> |
<!--T:8--> |
||
* Splits the given mesh object ({{incode|obj}}) into separated components. |
|||
⚫ | |||
* {{incode|new_list}} is a list of all the individual components that make the mesh. |
|||
<!--T:12--> |
|||
Example: |
|||
⚫ | |||
⚫ | |||
</translate> |
</translate> |
||
{{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) |
|||
}} |
|||
<translate> |
<translate> |
||
⚫ | |||
[[Category:Arch]] |
|||
<!--T:13--> |
|||
{{Docnav |
|||
|[[Arch_CloneComponent|Clonecomponent]] |
|||
|[[Arch_MeshToShape|MeshToShape]] |
|||
|[[Arch_Workbench|Arch]] |
|||
|IconL=Arch_CloneComponent.svg |
|||
|IconR=Arch_MeshToShape.svg |
|||
|IconC=Workbench_Arch.svg |
|||
}} |
|||
</translate> |
</translate> |
||
{{Arch_Tools_navi{{#translation:}}}} |
|||
{{Userdocnavi{{#translation:}}}} |
Latest revision as of 13:43, 3 April 2022
Arch SplitMesh |
Menu location |
---|
Arch → Utilities → Split Mesh |
Workbenches |
Arch |
Default shortcut |
None |
Introduced in version |
- |
See also |
Arch SelectNonSolidMeshes, Arch MeshToShape |
Description
This tool splits a selected Mesh object into its separate components
Usage
- 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)
Arch
- Elements: Wall, Structure, Curtain Wall, Window, Roof, Space, Stairs, Equipment, Frame, Fence, Truss, Profile, Pipe, Pipe Connector
- Reinforcements: Straight Rebar, U-Shape Rebar, L-Shape Rebar, Stirrup, Bent-Shape Rebar, Helical Rebar, Column Reinforcement, Beam Reinforcement, Slab Reinforcement, Footing Reinforcement, Custom Rebar
- Panels: Panel, Panel Cut, Panel Sheet, Nest
- Materials: Material, Multi-Material
- Organization: Building Part, Project, Site, Building, Level, External reference, Section Plane, Schedule
- Axes: Axis, Axes system, Grid
- Modification: Cut with plane, Add component, Remove component, Survey
- Utilities: Component, Clone component, Split Mesh, Mesh to Shape, Select non-manifold meshes, Remove Shape from Arch, Close Holes, Merge Walls, Check, Toggle IFC Brep flag, 3 Views from mesh, Create IFC spreadsheet, Toggle Subcomponents
- Additional: Preferences, Import Export Preferences (IFC, DAE, OBJ, JSON, 3DS, SHP), IfcOpenShell, IfcPlusPlus, Arch API
User documentation
- Getting started
- Installation: Download, Windows, Linux, Mac, Additional components, Docker, AppImage, Ubuntu Snap
- Basics: About FreeCAD, Interface, Mouse navigation, Selection methods, Object name, Preferences, Workbenches, Document structure, Properties, Help FreeCAD, Donate
- Help: Tutorials, Video tutorials
- Workbenches: Std Base, Arch, Assembly, CAM, Draft, FEM, Inspection, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Surface, TechDraw, Test Framework
- Hubs: User hub, Power users hub, Developer hub