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.
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.
True non-manifold components will be painted red.
new_list is a list of all the individual components that make the mesh.
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)
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)
- Elements: Wall, Structure, Roof, Window, Door, Stairs, Space, Frame, Equipment; Pipe, Pipe Connector; Schedule
- Reinforcements: Rebar; Straight Rebar, UShape Rebar, LShape Rebar, Bent Shape Rebar, Stirrup Rebar, Helical Rebar
- Panels: Panel, Panel Cut, Panel Sheet, Nest
- Materials: Material, Multi-Material
- Organization: Site, Reference, Building, Floor, Building Part, Section Plane
- Axes: Axis, Axes system, Grid
- Utilities: Component, Clone component, Split Mesh, Mesh To Shape, Select non-solid meshes, Remove Shape, Close Holes, Merge Walls, Check, Ifc Explorer, Toggle IFC Brep flag, 3 Views from mesh, Create IFC spreadsheet, Toggle Subcomponents
- Additional: Preferences, Import-Export Preferences (IFC, DAE, OBJ, JSON, 3DS); Arch API
- Installation: Unix, Windows, Mac; Getting started
- Basics: About FreeCAD, Workbenches, Preferences, Document structure, Interface Customization, Properties, Mouse Model; Tutorials
- Workbenches: Arch, Draft, FEM, Image, Inspection, Mesh, OpenSCAD, Part, PartDesign, Path, Plot, Points, Raytracing, Reverse Engineering, Robot, Ship, Sketcher, Spreadsheet, Start, Surface workbench, TechDraw, Test Framework, Web
- Scripting: Introduction to Python, FreeCAD scripting tutorial, FreeCAD Scripting Basics, How to install macros, Gui Command, Units Modules: Builtin modules, Workbench creation, Installing more workbenches Meshes: Mesh Scripting, Mesh Module Parts: The Part Module, Topological data scripting, PythonOCC, Mesh to Part Coin scenegraph: The Coin/Inventor scenegraph, Pivy Qt interface: PySide, Using the FreeCAD GUI, Dialog creation Parametric objects: Scripted objects Other: Code snippets, Line drawing function, Embedding FreeCAD, FreeCAD vector math library, Power users hub, Python, Macros, FreeCAD Scripting Basics, Topological data scripting