Expand description
Typed read-only views of the IfcCurve family.
§What is here and what is deliberately not
These are views: newtypes over (EntityId, &Entity) that name the
attributes and check the invariants a file can violate. Nothing here
evaluates a curve, tessellates one, or implements NURBS basis functions.
A geometry kernel does that; this module’s job is to hand it parameters it
can trust, and to fail loudly where the file cannot be trusted.
§The taxonomy
IfcCurve is abstract with three branches:
IfcCurve
|- IfcLine unbounded, point + vector
|- IfcConic unbounded, placement + radii
| |- IfcCircle
| '- IfcEllipse
|- IfcOffsetCurve2D / 3D relative to another curve
|- IfcPcurve in a surface's parameter space
|- IfcSurfaceCurve on one or two surfaces
| |- IfcIntersectionCurve
| '- IfcSeamCurve
'- IfcBoundedCurve has a start and an end
|- IfcPolyline
|- IfcIndexedPolyCurve
|- IfcTrimmedCurve
|- IfcCompositeCurve
| '- IfcCompositeCurveOnSurface
| '- IfcBoundaryCurve
| '- IfcOuterBoundaryCurve
'- IfcBSplineCurve
'- IfcBSplineCurveWithKnots
'- IfcRationalBSplineCurveWithKnotsBounded versus unbounded is the distinction that bites. An IfcCircle
is the whole circle; an IfcLine is infinite in both directions. Neither
can be drawn on its own. They appear in files almost exclusively as the
BasisCurve of an trimmed::TrimmedCurve or as the ParentCurve of a
composite::CompositeCurveSegment, which is where the bounds come from.
Code that meets an IfcCircle at the top of a representation and draws a
full circle has usually skipped a trim.
§IfcCurveSegment
Not in IFC4 ADD2 TC1. It was introduced in IFC4x3 for alignment geometry
and has no view here; CurveKind::classify returns None for it, so a
consumer meeting one in an IFC4x3 file gets an honest miss rather than a
wrong shape. Lowering reads it directly (lower::curve::segment).
§Coordinate and parameter units
Curve coordinates are in the model’s length unit, but IfcParameterValue
is not a length. On a conic it is an angle in the model’s plane-angle
unit, which is degrees in a large minority of files. No accessor in this
module converts anything; see crate::units.
Re-exports§
pub use bspline::BSplineCurve;pub use bspline::BSplineCurveForm;pub use bspline::KnotType;pub use bspline::KnotVector;pub use composite::CompositeCurve;pub use composite::CompositeCurveSegment;pub use composite::TransitionCode;pub use conic::Circle;pub use conic::Ellipse;pub use line::Line;pub use offset::OffsetCurve2D;pub use offset::OffsetCurve3D;pub use offset::PCurve;pub use offset::PreferredSurfaceCurveRepresentation;pub use offset::SurfaceCurve;pub use offset::SurfaceCurveKind;pub use polyline::IndexedPolyCurve;pub use polyline::PolySegment;pub use polyline::Polyline;pub use trimmed::Trim;pub use trimmed::TrimPoint;pub use trimmed::TrimSpec;pub use trimmed::TrimmedCurve;pub use trimmed::TrimmingPreference;
Modules§
- bspline
IfcBSplineCurveand its knotted / rational refinements.- composite
IfcCompositeCurveand its segments.- conic
IfcConicsubtypes:IfcCircleandIfcEllipse.- line
IfcLine: a point and a vector, unbounded in both directions.- offset
- Curves defined relative to another curve or to a surface.
- polyline
IfcPolylineandIfcIndexedPolyCurve: the two vertex-list curves.- trimmed
IfcTrimmedCurve: the single most misread entity in IFC geometry.
Enums§
- Curve
Kind - Which concrete
IfcCurvesubtype an entity is.