Skip to main content

Module bspline

Module bspline 

Source
Expand description

IfcBSplineSurface and its knotted / rational refinements.

§The same job as crate::curve::bspline, one dimension up

Read the parameters, check the invariants, evaluate nothing. What changes in 2D is that every invariant now has a u form and a v form, and the control points are a grid rather than a list. The grid is where files go wrong: ControlPointsList is LIST OF LIST OF IfcCartesianPoint, and a ragged inner list means the surface is not a tensor product at all.

§Which index is which

ControlPointsList[i][j] has i running along u and j along v. So the outer list length is the u control point count and the inner length the v count. Transposing them yields a surface that is plausible, is not the one in the file, and passes every count check because the two knot vectors are usually the same length in test data. This module’s accessors are named u_* and v_* for exactly that reason, and the row/column convention is asserted in the tests.

§Invariants checked here

  • Control point grid is rectangular (no ragged rows).
  • sum(UMultiplicities) = u control points + UDegree + 1, and the v form.
  • UKnots / UMultiplicities are parallel lists, and the v form.
  • Weights form a grid of the same shape as the control points, all positive.

Structs§

BSplineSurface
A borrowed view of any IfcBSplineSurface subtype.
ControlPointGrid
The control point grid, [u][v].

Enums§

BSplineSurfaceForm
IfcBSplineSurfaceForm: what shape the surface originally was.

Type Aliases§

SurfaceKnotVector
Marker kept so the curve module’s knot types are visibly reused.