GuiCommand: Name: Mesh SectionByPlane MenuLocation: Meshes , Cutting , Create section from mesh and plane Workbenches: Mesh_Workbench SeeAlso: Mesh_CrossSections
Mesh SectionByPlane
Description
The Mesh SectionByPlane command creates a cross section across a mesh object. The cross section is a Part Feature.
Usage
- Select a single mesh object and a single Part plane. The (extended) plane should intersect the mesh object.
- There are several ways to invoke the command:
- Press the
Create section from mesh and plane button.
- Select the Meshes → Cutting →
Create section from mesh and plane option from the menu.
- Press the
Properties
See: Part Feature.
Scripting
See also: FreeCAD Scripting Basics.
To section a mesh use its section
method. The method requires a second mesh object that need not be planar.
import FreeCAD as App
import Mesh
import Part
# Create a non-parametric box-shaped mesh:
msh = App.ActiveDocument.addObject("Mesh::Feature", "Mesh")
msh.Mesh = Mesh.createBox(30, 40, 50)
msh.ViewObject.DisplayMode = "Flat Lines"
# Create a planar mesh from 3 points:
p1 = App.Vector(-20, -60, 0)
p2 = App.Vector(65, 25, 0)
p3 = App.Vector(-20, 25, 0)
msh_plane = Mesh.Mesh([p1, p2, p3])
# Find the section loops (each loop is a list of points):
loops = msh.Mesh.section(msh_plane)
# Show the loop polygon:
Part.show(Part.makePolygon(loops[0]))
{{Mesh Tools navi}}
⏵ documentation index > Mesh > Mesh SectionByPlane
This page is retrieved from https://github.com/FreeCAD/FreeCAD-documentation/blob/main/wiki/Mesh_SectionByPlane.md