offset_faces
Changing a solid · api.md § offset_faces · all operations
definition
offset_faces(s: Solid, faces: list<Point3>, distance: Length) -> Solid
Pushes or pulls faces, as a direct edit. Each named face moves distance along its outward normal onto its offset surface: a plane is moved, and a cylinder's radius is changed. The faces round the named face are extended or trimmed to meet it. A negative distance pulls the face in.
Where a moved face comes to lie on another face's plane, the two faces merge into one face, and a face between them that shrinks to nothing is removed. A step pushed level becomes one top, and a slot's wall pushed across to the other wall closes the slot. faces must name one face or more, distance must not be zero, and no face may pass beyond the face it meets.
Example. Solid 1 is a 10 × 20 × 30 mm box with one corner at the origin. The point names its top face.
> {"cmd": "offset_faces", "s": 1, "faces": [[5, 10, 30]], "distance": 2}
< {"ok": 2}common to changing a solid
A face is named in the same way as an edge: each point names the face of s that the point lies on, within 10·ε.
| Function | Fields | Returns |
|---|---|---|
offset | s, distance | Solid |
offset_faces | s, faces, distance | Solid |
delete_faces | s, faces | Solid |
move_faces | s, faces, matrix | Solid |
thicken | s, faces, thickness | Solid |
shell | s, open, thickness | Solid |
draft | s, faces, origin, pull, angle | Solid |