Skip to content
brep-conformancegithub

offset_faces

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

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}

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