Expand description
IfcBSplineCurve and its knotted / rational refinements.
§What this module does and does not do
It reads the NURBS parameters. It does not evaluate a basis function, does not de-Boor, does not insert a knot. Those belong to a geometry kernel. What this module does provide is the consistency checking a kernel would otherwise have to repeat, because every one of these invariants shows up in real files and every one of them produces a NaN or an out-of-bounds read rather than an error.
§The invariants worth enforcing at the boundary
- Knot vector length.
sum(KnotMultiplicities)must equalControlPoints + Degree + 1. IFC stores knots in compressed form: distinct values plus their multiplicities, not the repeated vector a kernel wants. Getting this wrong is not detectable downstream, it just evaluates garbage. - Multiplicities and knots are parallel lists. Different lengths mean the file is corrupt, not that the shorter one defaults.
- Weights are positive and count-matched. A zero weight divides by zero at the corresponding control point; a negative one produces a curve that flips through infinity. Both are legal IEEE arithmetic and neither is legal geometry.
§Why ClosedCurve and SelfIntersect are only informational
They are IfcLogical, may be .U., and are derived facts a file asserts
rather than constraints it guarantees. They are exposed as Option<bool>
so a consumer can use them as a hint and never as a precondition.
Structs§
- BSpline
Curve - A borrowed view of any
IfcBSplineCurvesubtype. - Knot
Vector - A knot vector as IFC stores it: distinct values plus multiplicities.
Enums§
- BSpline
Curve Form IfcBSplineCurveForm: what shape the curve was originally.- Knot
Type IfcKnotType: the shape of the knot vector.