Expand description
IfcTrimmedCurve: the single most misread entity in IFC geometry.
§What the file gives you
A basis curve, two trims, a sense flag and a preference. Each trim is a
SET [1:2] OF IfcTrimmingSelect, and IfcTrimmingSelect is a select over
IfcCartesianPoint and IfcParameterValue. So a single trim may carry a
point, a parameter, or both, and when both are present they can
disagree – exporters round the parameter or snap the point. That is what
MasterRepresentation is for: it names which of the two is authoritative.
§The four-arc problem
When the basis curve is closed (IfcCircle, IfcEllipse), one basis curve
plus one pair of trim points defines four different arcs. Two come from
which trim is start and which is end; each of those doubles depending on
SenseAgreement, because on a closed curve you can reach the same end
point going either way round. The spec says so explicitly and notes that
informal proposition IP3 (sense implies parameter 1 < parameter 2) does
not apply to closed basis curves.
This module therefore refuses to collapse the four into one. TrimSpec
keeps Trim1, Trim2 and SenseAgreement as three independent facts, and
nothing here reorders trims to make parameters ascending. A kernel that
sorts them will silently draw the complementary arc – 350 degrees where 10
were meant – and the model will look plausible while being wrong.
§Parameter units
IfcParameterValue on a conic basis curve is an angle in the model’s
declared plane-angle unit, so a file in degrees writes 90. where a file in
radians writes 1.5707963. This view returns the number as written;
converting requires the unit context and belongs to crate::units.
Structs§
- Trim
- One end of the trim: up to one point and up to one parameter.
- Trim
Spec - The complete, uncollapsed trim of a curve.
- Trimmed
Curve - A borrowed view of an
IfcTrimmedCurve.
Enums§
- Trim
Point - One member of an
IfcTrimmingSelectset. - Trimming
Preference IfcTrimmingPreference: which trim representation is authoritative.