Mesh PolyTrim
Appearance
|
|
| Menu location |
|---|
| Meshes → Cutting → Trim |
| Workbenches |
| Mesh |
| Default shortcut |
| None |
| Introduced in version |
| - |
| See also |
| Mesh PolyCut, Mesh TrimByPlane |
Description[edit | edit source]
The Mesh PolyTrim command trims faces and parts of faces from mesh objects.
Usage[edit | edit source]
- During the command the 3D View cannot be changed. It is advisable to properly line up the 3d View first.
- Select one or more mesh objects.
- There are several ways to invoke the command:
- Press the
Trim button.
- Select the Meshes → Cutting →
Trim option from the menu.
- Press the
- Define a polygon by picking points in the 3D View.
- Select an option from the 3D View context menu:
- Inner: removes the faces and parts of faces that are inside the polygon.
- Outer: removes the faces and parts of faces that are outside the polygon.
- Split: removes the faces and parts of faces that are outside the polygon, and creates a new mesh object containing them.
- Cancel: cancels the command.
Scripting[edit | edit source]
See also: FreeCAD Scripting Basics.
To trim a mesh with a polygon use its trim method.
import FreeCAD as App
import Mesh
# 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"
# Define some points:
p1 = App.Vector(0, 0, 0)
p2 = App.Vector(60, 0, 0)
p3 = App.Vector(60, 60, 0)
# We need to work on a copy of the msh.Mesh object:
new_msh = msh.Mesh.copy()
# Trim that copy:
new_msh.trim([p1, p2, p3], 0) # 2nd argument: 0=inner, 1=outer.
# Update msh.Mesh:
msh.Mesh = new_msh
- Miscellaneous: Import Mesh, Export Mesh, Mesh From Shape, Regular solid, Unwrap Mesh, Unwrap Face
- Modifying: Harmonize Normals, Flip Normals, Fill Holes, Close Holes, Add Triangle, Remove Components, Remove Components Manually, Smooth, Refinement, Decimate, Scale
- Boolean: Union, Intersection, Difference
- Cutting: Cut, Trim, Trim With Plane, Section From Plane, Cross-Sections
- Components and segmentation: Merge, Split by Components, Segmentation, Segmentation From Best-Fit Surfaces
- Analyze: Evaluate and Repair, Face Info, Curvature Plot, Curvature Info, Evaluate Solid, Bounding Box Info
- Additional: Import Export Preferences, OpenSCAD Workbench, Mesh Scripting
- 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, Assembly, BIM, CAM, Draft, FEM, Inspection, Material, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Surface, TechDraw, Test Framework
- Hubs: User hub, Power users hub, Developer hub