torus
Constructors · api.md § torus · all operations
definition
torus(frame: Frame, major: Length, minor: Length) -> Solid
Makes a ring lying round the frame's z axis: a tube of radius minor whose centre runs round a circle of radius major in the xy plane.
major > minor > 0 must hold. The result is the set of points where (√(u² + v²) − major)² + w² ≤ minor².
Example.
> {"cmd": "torus", "frame": {"origin": [0, 0, 0], "x": [1, 0, 0], "y": [0, 1, 0], "z": [0, 0, 1]},
"major": 10, "minor": 2}
< {"ok": 1}common to constructors
| Function | Fields | Returns |
|---|---|---|
box | frame, size | Solid |
cylinder | frame, radius, height | Solid |
sphere | frame, radius | Solid |
torus | frame, major, minor | Solid |
cone | frame, bottom, top, height | Solid |
extrude | frame, profile, height | Solid |
revolve | frame, profile, angle | Solid |
screw | frame, profile, rise, angle | Solid |
loft | frame, profile, scale, height, top | Solid |
loft_through | frame, profiles, heights | Solid |
sweep | frame, profile, path | Solid |
sweep_path | frame, profile, path, twist | Solid |
slab | frame, size, knots_u, knots_v, heights | Solid |