Skip to main content

Module surface

Module surface 

Source
Expand description

Concrete surfaces.

The five analytic surfaces plus a NURBS patch, a surface of revolution, a surface of extrusion, and a trimmed restriction of any of them. All reachable through SurfaceGeometry, an enum for the same reasons curves are one; see crate::curve.

§Keeping analytic surfaces analytic

A cylinder could be written as a NURBS patch, and some kernels do exactly that. Keeping it a cylinder is worth the extra types: intersection can take a closed-form path, measurement can report a radius rather than a fit, files stay small, and a fillet knows it is filleting a cylinder. The cost is that every algorithm must handle a handful of cases, which the kind method makes an explicit choice rather than a hidden one.

Structs§

BSplineSurface
A tensor-product B-spline patch, polynomial or rational.
ConeSurface
A cone, parameterized by (angle, height).
CylinderSurface
A cylinder, parameterized by (angle, height).
ExtrusionSurface
A curve swept along a direction.
OffsetSurface
A surface displaced a constant signed distance along its basis’s normal, sharing the basis’s parameterization.
PlaneSurface
A plane, parameterized by its frame’s x and y axes.
RevolutionSurface
A curve revolved about an axis.
SphereSurface
A sphere, parameterized by (longitude, latitude).
TorusSurface
A torus, parameterized by (angle about the axis, angle around the tube).
TrimmedSurface
Another surface restricted to a sub-rectangle of its domain.

Enums§

SurfaceGeometry
A surface.

Constants§

SURFACE_EXTENT
How far an unbounded surface’s default domain reaches.