Skip to content
brep-conformancegithub

move_faces

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

move_faces(s: Solid, faces: list<Point3>, matrix: Placement) -> Solid

Moves the faces that the points lie on rigidly by p ↦ R·p + t. The rows of matrix are [R | t], where R is a rotation. The faces round the moved faces are extended or trimmed to meet them, as a direct edit. Moving a hole's face across a plate moves the hole. Moving a notch's faces along a side moves the notch. Turning a side about its bottom edge leans the side. A plane moved along itself is the same plane.

faces must name one face or more, R must be a rotation, and the faces round the moved faces must reach them.

Example. Solid 1 is a 10 × 20 × 30 mm box with one corner at the origin.

> {"cmd": "move_faces", "s": 1, "faces": [[5, 10, 30]], "matrix": [[1, 0, 0, 0], [0, 1, 0, 0],
   [0, 0, 1, 3]]}
< {"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