Skip to content
brep-conformancegithub

draft

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

draft(s: Solid, faces: list<Point3>, origin: Point3, pull: Vector3, angle: Angle) -> Solid

Tilts faces so that a part draws out of a mould. The neutral plane is the plane through origin perpendicular to pull. Each named face turns by angle about the line where the face meets the neutral plane, which narrows the part along pull.

faces must name one face or more, each face must be a plane that meets the neutral plane, and angle must be between 0 and π/2, with neither included. The result is s with those faces moved onto their tilted planes, and with the faces round them extended or trimmed to meet them. Where tilted faces meet each other or another face before the part ends, the part closes there, along a ridge or at an apex, and what lay beyond is removed. The result is still the part cut by the tilted planes.

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

> {"cmd": "draft", "s": 1, "faces": [[0, 10, 15]], "origin": [0, 0, 0], "pull": [0, 0, 1],
   "angle": 0.05}
< {"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