Skip to content
brep-conformancegithub

offset

Changing a solid · api.md § offset · all operations

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}

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·ε.

FunctionFieldsReturns
offsets, distanceSolid
offset_facess, faces, distanceSolid
delete_facess, facesSolid
move_facess, faces, matrixSolid
thickens, faces, thicknessSolid
shells, open, thicknessSolid
drafts, faces, origin, pull, angleSolid