Shape Builder¶
In one sentence: Compose new Part shapes by combining existing vertices, edges, wires, faces, and shells — building up from lower-level topological elements to higher-level ones.
Overview¶
Workbench: Part · Menu: Part → Shape Builder
Toolbar: Part Tools · Shortcut: none
Shape Builder opens a dialog that lets you create higher-level OCCT topology from lower-level elements. You can build an edge from two vertices, a wire from edges, a face from wires, a shell from faces, or a solid from shells — one step up the B-rep topology ladder at a time.
Intuition¶
FreeCAD's B-rep (boundary representation) topology has a strict hierarchy:
Sometimes imported geometry arrives with gaps or missing topology: you have faces but no shell, or edges but no wire. Shape Builder lets you explicitly assemble the missing higher-level topology from the lower-level pieces you already have.
This is a power-user tool. For routine modelling, use Extrude, Loft, or Face from Wires instead.
When to use it¶
- Repairing imported STEP/IGES that has disconnected faces: select all faces and build a Shell, then a Solid.
- Creating custom wires from individual edges for use as sweep spines.
- Building compound shapes from manually positioned elements.
When NOT to use it¶
- Routine face creation — use Face from Wires.
- Merging two solids — use Boolean Fuse.
Available constructions¶
| Mode | Input | Output | Use case |
|---|---|---|---|
| Edge from two vertices | 2 vertices | 1 edge | Connect two points with a straight line |
| Wire from edges | N edges (connected) | 1 wire | Assemble a closed or open path from individual edges |
| Face from wires | 1+ closed wires | 1 face | Turn wire outlines into a planar face |
| Shell from faces | N faces | 1 shell | Group faces into an open or closed shell |
| Solid from shell | 1 closed shell | 1 solid | Close a shell into a watertight solid |
| Compound from shapes | N shapes (any type) | 1 compound | Group arbitrary shapes without merging |
Step-by-step walkthrough¶
Building a solid from imported faces¶
- Import a STEP file that arrives as disconnected faces.
- Part → Shape Builder.
- In the dialog, select Shell from Faces.
- Click all the faces in the viewport (or use Ctrl+A if all are desired).
- Click Create — a shell object appears.
- Change the mode to Solid from Shell.
- Select the newly created shell.
- Click Create — a solid appears.
- Use Check Geometry to verify it is valid.
Building a wire from edges¶
- Create or import several edges that share endpoints.
- Part → Shape Builder.
- Select Wire from Edges.
- Click each edge in order.
- Click Create — a wire object appears.
- Use the wire as a sweep spine with Sweep.
Common mistakes and pitfalls¶
Shell from Faces requires no gaps
The shell construction succeeds only when all selected faces share edges without gaps. Even a small gap causes OCCT to reject the shell. Use Check Geometry to detect gaps.
Solid from Shell requires a closed shell
An open shell (with boundary edges) cannot become a solid. Close all openings with additional faces before converting to solid.
Python API¶
import FreeCAD as App
import Part
doc = App.newDocument()
# Build a wire from two edges
v1 = Part.Vertex(0, 0, 0)
v2 = Part.Vertex(10, 0, 0)
v3 = Part.Vertex(10, 10, 0)
v4 = Part.Vertex(0, 10, 0)
e1 = Part.makeLine(v1.Point, v2.Point)
e2 = Part.makeLine(v2.Point, v3.Point)
e3 = Part.makeLine(v3.Point, v4.Point)
e4 = Part.makeLine(v4.Point, v1.Point)
wire = Part.Wire([e1, e2, e3, e4])
face = Part.Face(wire)
shell = Part.Shell([face])
# Add top face and bottom face to close the shell...
# (simplified: just show the wire/face approach)
Part.show(face)
doc.recompute()
# Extrude the face to get a solid
solid = face.extrude(App.Vector(0, 0, 5))
feature = doc.addObject("Part::Feature", "ExtrudedBox")
feature.Shape = solid
doc.recompute()
See also¶
- Face from Wires — simpler dedicated tool for face creation
- Check Geometry — verify shells and solids for validity
- Extrude — build a solid from a face or wire
- Convert to Solid — convert a shell to solid