offset
Changing a solid · api.md § offset · all operations
definition
offset(s: Solid, distance: Length) -> Solid
Grows the solid by a constant distance all round, rounding its convex edges and corners.
distance must be positive. The result is the set of points within distance of s. For a convex solid, the volume of the result is given by Steiner's formula V + S·d + M·d² + (4π/3)·d³, where M is the integral of mean curvature over the boundary of s.
Example. Solid 1 is a 10 × 20 × 30 mm box with one corner at the origin.
> {"cmd": "offset", "s": 1, "distance": 1}
< {"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 |