Skip to content
brep-conformancegithub

screw

Constructors · api.md § screw · all operations

screw(frame: Frame, profile: Profile, rise: Length, angle: Angle) -> Solid

Spins a profile about an axis while moving the profile along the axis, as a thread is formed. Each whole turn rises 2π·rise.

The profile is drawn as for revolve. Ω must lie where the first coordinate is at least zero, and angle must be positive. The turns must stay apart: 2π·|rise| must be at least the profile's extent along z. The result is the set of points (ρ cos φ, ρ sin φ, w + rise·φ) for (ρ, w) ∈ Ω and 0 ≤ φ ≤ angle: the profile turned about z while rising rise per radian, as a thread. The result's volume is M·angle, because the rise moves each section within its own plane. Its area is angle·∮ √(u² + rise²·(du/ds)²) ds + 2A.

Example.

> {"cmd": "screw", "frame": {"origin": [0, 0, 0], "x": [1, 0, 0], "y": [0, 1, 0], "z": [0, 0, 1]},
   "profile": [[{"line": [[5, 0], [6, 0]]}, {"line": [[6, 0], [6, 1]]}, {"line": [[6, 1], [5, 1]]},
   {"line": [[5, 1], [5, 0]]}]], "rise": 0.5, "angle": 12.566370614}
< {"ok": 1}
FunctionFieldsReturns
boxframe, sizeSolid
cylinderframe, radius, heightSolid
sphereframe, radiusSolid
torusframe, major, minorSolid
coneframe, bottom, top, heightSolid
extrudeframe, profile, heightSolid
revolveframe, profile, angleSolid
screwframe, profile, rise, angleSolid
loftframe, profile, scale, height, topSolid
loft_throughframe, profiles, heightsSolid
sweepframe, profile, pathSolid
sweep_pathframe, profile, path, twistSolid
slabframe, size, knots_u, knots_v, heightsSolid