Part ShapeFromMesh
|
Menu location |
---|
Part → Create shape from mesh... |
Workbenches |
Part |
Default shortcut |
None |
Introduced in version |
- |
See also |
Part ConvertToSolid, Part RefineShape, Part PointsFromMesh |
Introduction
The Part ShapeFromMesh command creates shapes from mesh objects. Mesh objects have limited editing capabilities in FreeCAD, converting them to shapes will allow their use with many more boolean and modification commands.
The inverse operation is Mesh FromPartShape from the Mesh Workbench.
Usage
- Analyzing and repairing the mesh object, if needed, should be done before launching this command. Appropriate tools for this task are available in the
Mesh Workbench.
- Select one or more mesh objects.
- Select the Part →
Create shape from mesh option from the menu.
- The Shape from mesh dialog opens.
- Optionally check the Sew shape checkbox and specify a tolerance:
- This option is usually not needed. It is meant for mesh objects that are not watertight and have small gaps between edges.
- If the option is selected a compound of shells, instead of a compound of faces, is created.
- The sewing operation may be computationally demanding.
- Press the OK button.
- For each selected mesh object a shape is created as a separate new object.
- Optionally use
Part RefineShape on these objects.
- Optionally turn the final objects into solids with
Part MakeSolid.
Properties
See also: Property editor.
The Part ShapeFromMesh command creates Part Feature objects with no additional properties.
Scripting
Creating a Shape from a Mesh can be done by using the makeShapeFromMesh
method from a Part TopoShape; you need to specify the source mesh and tolerance, and assign the result to a new Part Feature object.
Notice that the mesh must be recalculated before it is converted to a Shape, otherwise there won't be topology information, and the conversion won't be successful.
import FreeCAD as App
import Part
doc = App.ActiveDocument
mesh = doc.addObject("Mesh::Cube", "Mesh")
mesh.recompute()
shape = Part.Shape()
shape.makeShapeFromMesh(mesh.Mesh.Topology, 0.1)
solid = doc.addObject("Part::Feature", "Solid")
solid.Shape = Part.Solid(shape.removeSplitter())
solid.Placement.Base = App.Vector(15, 0, 0)
doc.recompute()
Links
- Edit STL Files In FreeCAD video by AllVisuals4U.
- Primitives: Box, Cylinder, Sphere, Cone, Torus, Tube, Create primitives, Shape builder
- Creation and modification: Create sketch, Extrude, Revolve, Mirror, Scale, Fillet, Chamfer, Make face from wires, Ruled Surface, Loft, Sweep, Section, Cross sections, 3D Offset, 2D Offset, Thickness, Projection on surface, Color per face
- Boolean: Make compound, Explode compound, Compound Filter, Boolean, Cut, Union, Intersection, Connect objects, Embed object, Cutout for object, Boolean fragments, Slice apart, Slice to compound, Boolean XOR, Check geometry, Defeaturing
- Other tools: Import CAD file, Export CAD file, Box selection, Create shape from mesh, Create points object from geometry, Convert to solid, Reverse shapes, Create simple copy, Create transformed copy, Create shape element copy, Refine shape, Attachment
- Preferences: Preferences, Fine tuning

- 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