nurbsSurface.cylinder
The exact side of a cylinder standing on a plane, its axis along the plane’s normal and its seam on the plane’s x axis.
Usage
NurbsSurface.cylinder(radius: number, height: number, plane?: Plane): Result<NurbsSurface>Parameters
radiusnumberThe radius, finite and > 0. Required. In model.
heightnumberThe height along the normal, finite and > 0. Required. In model.
planePlaneThe base plane: the axis runs from its origin along its normal. Default
Plane.worldXY. In model.
Returns
Ok with a rational degree-(2, 1) surface without caps: u runs round from the plane’s x axis counter-clockwise about the normal, v from the base (v = domainV.t0) to the top.
Errors
Guarantees
- pointAt(domainU.t0, domainV.t0) = plane.origin + radius · plane.xAxis, and at domainV.t1 that plus height · plane.zAxis
- every point is at radius from the axis, and Plane.signedDistance(plane, point) is in [0, height]
- normalAt points away from the axis
- The same result on every machine.
Example
const r = NurbsSurface.cylinder(1, 3) // → seam at (1, 0, 0), top at z = 3, once loadGeometryKernel() has run