Problem
Curve2 can carry a transition spiral exactly; Curve3 cannot.
pub enum Curve2 { Line, Circle, Ellipse, Polyline, BSpline, Intrinsic }
pub enum Curve3 { Line, Circle, Ellipse, Polyline, BSpline }
Curve2::Intrinsic holds a CurvatureLaw anchored to a start frame over
an arc length, so a clothoid, a Helmert curve and a sine-corrected
transition are all exact values rather than approximations. Curve3 has no
counterpart, and CurveRelation composes existing nodes (Composite,
Trimmed, Offset, SurfaceCurve, ParameterCurve) without offering a
way to combine a planar curve with an independent elevation law.
Why it matters
A road or rail centreline is authored as two independent laws: a planar
horizontal layout carrying the spirals, and a vertical profile giving
elevation as a function of distance along that plan. The 3D centreline is
their composition, and it is the curve every downstream question resolves
against.
With no exact 3D form, a consumer holding an exact Intrinsic2 plan plus an
exact vertical law has three options, and all three are bad:
- approximate the spiral as a
BSpline3, discarding the exactness the
kernel deliberately preserves in 2D
- keep plan and profile separate and make every consumer recompose them,
which is the operation the graph exists to own
- refuse, which is what we do today
The information is exact at the boundary and is being lost on the way in --
the same argument as #90.
Concretely, in ifc-alignment (IFC4x3): horizontal layouts lower to an
exact composite Curve2 today, including clothoid, Helmert and sine
families. Vertical segments lower separately. Nothing composes them, so
IfcGradientCurve and IfcSegmentedReferenceCurve are unimplemented, and
a product positioned along an alignment cannot be placed in space.
This is a representation gap, not a request for road semantics. What a
centreline means, what a station is, and whether a gradient is acceptable
all stay with the consumer.
Possible shapes
Not a prescription -- the kernel owns this choice:
Curve3::Intrinsic -- a 3D natural-equation curve carrying curvature
and torsion laws. Most general; also the largest change, and torsion is
not what an alignment actually states.
- A
CurveRelation variant composing an existing planar curve node with
an elevation law along its arc length. Closer to how the data is
authored, and reuses the exact 2D values already supported.
- An elevation law type usable with the existing
Composite machinery.
Option 2 looks closest to the existing design, since CurveRelation
already composes rather than re-encodes, but that is a preference from the
consumer side, not a requirement.
Done when
- a planar curve carrying an exact transition spiral can be combined with
an elevation law into a single 3D curve value, without approximating
either input
- the composition survives a round trip through the graph
- a point and a frame can be evaluated at a given distance along the
composed curve
- validation refuses a composition whose plan and elevation cover
different arc-length domains, rather than silently clamping or
extrapolating
- the distinction between horizontal length, projected length and 3D length
is preserved rather than collapsed
Verified against
crates/representations/analytic/curve/src/lib.rs on main at the time of
writing, and the v0.1.8 tag that openbimrs/ifc currently pins. The
Curve3 variant list is unchanged between the two.
Reported from openbimrs/ifc, where ifc-alignment is the blocked
consumer. Not urgent for us: alignment authoring does not depend on it, so
we are proceeding there and treating 3D composition as a typed refusal
until this lands.
Problem
Curve2can carry a transition spiral exactly;Curve3cannot.Curve2::Intrinsicholds aCurvatureLawanchored to a start frame overan arc length, so a clothoid, a Helmert curve and a sine-corrected
transition are all exact values rather than approximations.
Curve3has nocounterpart, and
CurveRelationcomposes existing nodes (Composite,Trimmed,Offset,SurfaceCurve,ParameterCurve) without offering away to combine a planar curve with an independent elevation law.
Why it matters
A road or rail centreline is authored as two independent laws: a planar
horizontal layout carrying the spirals, and a vertical profile giving
elevation as a function of distance along that plan. The 3D centreline is
their composition, and it is the curve every downstream question resolves
against.
With no exact 3D form, a consumer holding an exact
Intrinsic2plan plus anexact vertical law has three options, and all three are bad:
BSpline3, discarding the exactness thekernel deliberately preserves in 2D
which is the operation the graph exists to own
The information is exact at the boundary and is being lost on the way in --
the same argument as #90.
Concretely, in
ifc-alignment(IFC4x3): horizontal layouts lower to anexact composite
Curve2today, including clothoid, Helmert and sinefamilies. Vertical segments lower separately. Nothing composes them, so
IfcGradientCurveandIfcSegmentedReferenceCurveare unimplemented, anda product positioned along an alignment cannot be placed in space.
This is a representation gap, not a request for road semantics. What a
centreline means, what a station is, and whether a gradient is acceptable
all stay with the consumer.
Possible shapes
Not a prescription -- the kernel owns this choice:
Curve3::Intrinsic-- a 3D natural-equation curve carrying curvatureand torsion laws. Most general; also the largest change, and torsion is
not what an alignment actually states.
CurveRelationvariant composing an existing planar curve node withan elevation law along its arc length. Closer to how the data is
authored, and reuses the exact 2D values already supported.
Compositemachinery.Option 2 looks closest to the existing design, since
CurveRelationalready composes rather than re-encodes, but that is a preference from the
consumer side, not a requirement.
Done when
an elevation law into a single 3D curve value, without approximating
either input
composed curve
different arc-length domains, rather than silently clamping or
extrapolating
is preserved rather than collapsed
Verified against
crates/representations/analytic/curve/src/lib.rsonmainat the time ofwriting, and the
v0.1.8tag thatopenbimrs/ifccurrently pins. TheCurve3variant list is unchanged between the two.Reported from
openbimrs/ifc, whereifc-alignmentis the blockedconsumer. Not urgent for us: alignment authoring does not depend on it, so
we are proceeding there and treating 3D composition as a typed refusal
until this lands.