cone
Constructors · api.md § cone · all operations
definition
cone(frame: Frame, bottom: Length, top: Length, height: Length) -> Solid
Makes a cone or truncated cone that stands on the frame's xy plane round the frame's z axis. Its radius goes from bottom at the origin to top at height.
height must be positive. bottom and top must each be at least zero, and must not both be zero. A zero radius is an apex. The result is the set of points where √(u² + v²) ≤ bottom + (top − bottom)·w/height and 0 ≤ w ≤ height.
Example.
> {"cmd": "cone", "frame": {"origin": [0, 0, 0], "x": [1, 0, 0], "y": [0, 1, 0], "z": [0, 0, 1]},
"bottom": 5, "top": 2, "height": 10}
< {"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 |