REFERENCE / 11
Surface and Path Signatures
heightfield
(heightfield image-path :width w :depth d :relief-height h :base-thickness t [:invert bool]) → native mesh solid.
A raster image can drive a raised landscape. Width, depth, relief height, and base thickness are all required and positive. :invert reverses the height mapping. The image must be a readable staged asset; a missing image is a render error, not a flat fallback. FreeCAD interop does not support this operation.
(model
(params (image terrain_map ""))
(part terrain
(heightfield terrain_map :width 40mm :depth 30mm
:relief-height 4mm :base-thickness 2mm :invert #f)))Choose an image for terrain_map before rendering. This reference example needs that external input; it is not one of the self-contained farm models.
extrude
Extend a planar profile by distance, normally along Z for an XY sketch. :symmetric true distributes the extrusion about its profile plane.
- signature:
extrude profile distance - result:
Solid - optional keyword:
:symmetricboolean
revolve
Rotate the profile through angle degrees to make a solid of revolution. Use 360 for a complete turn.
- signature:
revolve profile angle - result:
Solid
loft
Join two or more profiles along the loft distance. With two profiles, the distance separates the first and last sections.
- signature:
loft distance profile1 profile2 ... - requires at least two profiles after distance
- result:
Solid
sweep
- signature:
sweep profile path - result:
Solid
Example:
(model
(part rail
(sweep
(circle 1.2)
(bezier-path ((0 0 0) (0 0 12) (12 0 20) (24 0 20))))))The circle is the cross-section. The Bézier path carries it upward, then through the bend, producing a capped solid rail.
shell
Hollow a solid using the requested wall thickness. :faces selects openings. Wall thickness must fit the local geometry; reduce it if adjacent walls or tight corners cause a failure.
- signature:
shell thickness solid - result:
Solid - optional keyword:
:faces selector
offset
Expand or contract a planar profile by an amount. Use the resulting profile in a later solid operation.
- signature:
offset amount profile - result:
Sketch - optional keyword:
:openings sketch-or-sketch-list
offset-rounded
Offset a profile with rounded transitions at corners.
- signature:
offset-rounded amount profile - result:
Sketch - optional keyword:
:openings sketch-or-sketch-list
fillet
Round selected solid edges with a constant radius. Omit :edges to use the default selection. A radius too large for the adjacent faces can fail; test a smaller radius and a narrower edge selection.
- signature:
fillet radius solid - result:
Solid - optional keyword:
:edges selector
chamfer
Cut a flat bevel on selected solid edges. distance sets its size; :edges restricts the selection.
- signature:
chamfer distance solid - result:
Solid - optional keyword:
:edges selector
taper
- signature:
taper height scale profile - signature:
taper height scale-x scale-y profile - result:
Solid - FreeCAD caveat: non-uniform taper currently rejected
twist
- signature:
twist height angle profile - result:
Solid - all three positional arguments are required
path
- signature:
path point1 point2 ... - signature:
path point-list - each point is 3D
- result:
Path
polyline
- alias of
path
bezier-path
- signature:
bezier-path point-list - point list must be 3D
- result:
Path
bspline
- signature:
bspline point-list - optional second positional:
closed - optional keywords:
:closedboolean:tangentspoint-list:tangent-scalarsnumeric list- result:
Sketch
Notes:
- point-list is required
- tangent hints are optional
- tangents list may use 2 entries or one per point in native path
Example:
(model
(part body
(extrude
(bspline
((-14 -8) (-8 -14) (8 -14) (14 -8)
(14 8) (8 14) (-8 14) (-14 8))
:closed #t)
4)))