Mesh SectionByPlane: Difference between revisions
No edit summary |
(Button text.) |
||
(11 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
<languages/> |
<languages/> |
||
{{Page in progress}} |
|||
<translate> |
<translate> |
||
<!--T:1--> |
|||
{{Docnav |
{{Docnav |
||
|[[Mesh_TrimByPlane| |
|[[Mesh_TrimByPlane|TrimByPlane]] |
||
|[[Mesh_CrossSections| |
|[[Mesh_CrossSections|CrossSections]] |
||
|[[Mesh_Workbench|Mesh]] |
|[[Mesh_Workbench|Mesh]] |
||
|IconL= |
|IconL=Mesh_TrimByPlane.svg |
||
|IconR= |
|IconR=Mesh_CrossSections.svg |
||
|IconC=Workbench_Mesh.svg |
|IconC=Workbench_Mesh.svg |
||
}} |
}} |
||
<!--T:2--> |
|||
{{GuiCommand |
{{GuiCommand |
||
|Name=Mesh SectionByPlane |
|Name=Mesh SectionByPlane |
||
|Empty=1 |
|||
|MenuLocation=Meshes → Cutting → Create section from mesh and plane |
|MenuLocation=Meshes → Cutting → Create section from mesh and plane |
||
|Workbenches=[[Mesh_Workbench|Mesh]] |
|Workbenches=[[Mesh_Workbench|Mesh]] |
||
Line 22: | Line 20: | ||
}} |
}} |
||
==Description== |
==Description== <!--T:3--> |
||
<!--T:4--> |
|||
The '''Mesh SectionByPlane''' command creates a cross section |
The '''Mesh SectionByPlane''' command creates a cross section across a mesh object. The cross section is a [[Part_Feature|Part Feature]]. |
||
==Usage== |
==Usage== <!--T:5--> |
||
<!--T:6--> |
|||
# Select a single mesh object and a single [[Part_Primitives|Part plane]]. The (extended) plane should intersect the mesh object. |
# Select a single mesh object and a single [[Part_Primitives|Part plane]]. The (extended) plane should intersect the mesh object. |
||
# There are several ways to invoke the command: |
|||
⚫ | |||
#* Press the {{Button|[[Image:Mesh_SectionByPlane.svg|16px]] [[Mesh_SectionByPlane|Create section from mesh and plane]]}} button. |
|||
⚫ | |||
==Properties== |
==Properties== <!--T:7--> |
||
<!--T:8--> |
|||
See: [[Part_Feature|Part Feature]]. |
See: [[Part_Feature|Part Feature]]. |
||
==Scripting== <!--T:10--> |
|||
<!--T:11--> |
|||
See also: [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]]. |
|||
<!--T:12--> |
|||
To section a mesh use its {{incode|section}} method. The method requires a second mesh object that need not be planar. |
|||
</translate> |
|||
{{Code|code= |
|||
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])) |
|||
}} |
|||
<translate> |
|||
<!--T:9--> |
|||
{{Docnav |
{{Docnav |
||
|[[Mesh_TrimByPlane| |
|[[Mesh_TrimByPlane|TrimByPlane]] |
||
|[[Mesh_CrossSections| |
|[[Mesh_CrossSections|CrossSections]] |
||
|[[Mesh_Workbench|Mesh]] |
|[[Mesh_Workbench|Mesh]] |
||
|IconL= |
|IconL=Mesh_TrimByPlane.svg |
||
|IconR= |
|IconR=Mesh_CrossSections.svg |
||
|IconC=Workbench_Mesh.svg |
|IconC=Workbench_Mesh.svg |
||
}} |
}} |
||
Line 48: | Line 85: | ||
{{Mesh Tools navi{{#translation:}}}} |
{{Mesh Tools navi{{#translation:}}}} |
||
{{Userdocnavi{{#translation:}}}} |
{{Userdocnavi{{#translation:}}}} |
||
{{clear}} |
Latest revision as of 16:44, 25 November 2023
Mesh SectionByPlane |
Menu location |
---|
Meshes → Cutting → Create section from mesh and plane |
Workbenches |
Mesh |
Default shortcut |
None |
Introduced in version |
- |
See also |
Mesh CrossSections |
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.
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
- Miscellaneous: Import mesh, Export mesh, Create mesh from shape, Regular solid, Unwrap Mesh, Unwrap Face
- Modifying: Harmonize normals, Flip normals, Fill holes, Close hole, Add triangle, Remove components, Remove components by hand, Smooth, Refinement, Decimation, Scale
- Boolean: Union, Intersection, Difference
- Cutting: Cut mesh, Trim mesh, Trim mesh with a plane, Create section from mesh and plane, Cross-sections
- Components and segments: Merge, Split by components, Create mesh segments, Create mesh segments from best-fit surfaces
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