You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The geometric representation of a vertical alignment is accomplished with IfcGradientCurve. It represents the elevation profile as a two-dimensional curve in a (distance along, elevation) coordinate system, where distance along is measured along the horizontal IfcCompositeCurve (IfcGradientCurve.BaseCurve). Combined with the horizontal alignment, the gradient curve establishes the three-dimensional geometry of the route.
Table 3.0-1 maps each IfcAlignmentVerticalSegment.PredefinedType to its corresponding parent curve type.
Business Logic (IfcAlignmentVerticalSegment.PredefinedType)
Table 3.0-1 — Mapping of business logic to geometric representation for vertical alignment
This chapter covers:
The four-step evaluation algorithm: Steps 1–3 follow the same matrix composition as horizontal segments; Step 4 combines the vertical result with the horizontal placement matrix to produce a full 3D placement.
Parametric equations and geometry mapping examples for the curve types in Table 3.0-1.
The combined 3D evaluation that produces position, tangent, cross-track, and up-axis vectors from the IfcGradientCurve.
Known limitation: vertical clothoid curves are not addressed in this guide.
3.1 Conventions
Each vertical segment is parameterized by arc-length $s$ along its parent curve, where $s = 0$ at the start of the parent curve. The key semantic attributes are IfcAlignmentVerticalSegment.StartDistAlong (horizontal distance from the alignment start to the segment start), HorizontalLength (the horizontal projection of the segment), StartHeight (elevation at the segment start), and StartGradient and EndGradient (decimal slopes; e.g., $0.005 = 0.5%$).
IfcCurveSegment.SegmentLength stores arc-length along the parent curve, not horizontal distance. The evaluator parameter is horizontal distance $\ell$, which must be converted to arc-length $s$ for use in the parent curve equations. For the grades typical in road and railway design ($\leq 5%$), the difference is small but non-zero.
The grade angle at horizontal distance $\ell$ is $\theta(\ell) = \tan^{-1}(g(\ell))$, where $g(\ell)$ is the gradient. The cosine and sine of $\theta$ form the RefDirection of the vertical curve at that point.
3.2 Curve Segment Evaluation Algorithm
Steps 1–3 follow the identical procedure described in Section 2.2 for horizontal segments, substituting distance along for the horizontal $x$-coordinate and elevation for the horizontal $y$-coordinate. Let $s_0$ = IfcCurveSegment.SegmentStart.
Step 1 — Form the curve segment placement matrix $M_{CSP}$
$M_{CSP}$ is constructed from IfcCurveSegment.Placement, where $(d_p, y_p)$ is the Location (distance along, elevation) and $\theta_p$ is the grade angle of the RefDirection.
Column 4 of $M_v$ contains the distance along $d$ and elevation $z$ of the evaluated point. Column 1 contains $(dx_v, dy_v) = (\cos\theta_v, \sin\theta_v)$, the grade direction at that point. Step 4 is performed immediately for this point before moving to the next point.
Step 4 — Combine with the horizontal alignment point to produce the 3D placement matrix
The vertical result lives in the (distance along, elevation) plane and must be merged with the horizontal alignment to form a 3D position and orientation. The "distance along" axis corresponds to the curve tangent of the horizontal alignment and the vertical $y$ is elevation (Z in 3D).
Evaluate the horizontal placement matrix $M_h$ at distance $d$ along the IfcCompositeCurve. This yields the horizontal 2D position $(x_h, y_h)$ and the horizontal alignment tangent direction $(dx_h, dy_h) = (\cos\theta_h, \sin\theta_h)$.
$M_v$ is a two-dimensional matrix whose rows index the vertical frame: row 1 = distance-along, row 2 = elevation, row 3 = out-of-plane. Three modifications produce $M'_v$, the form required for multiplication with $M_h$.
Column 4 — The distance-along value $d$ is replaced with zero. The horizontal position already comes from $M_h$; retaining $d$ would displace the point a second time along the horizontal tangent.
Rows 2 and 3 — $M_h$'s third row $(0,\ 0,\ 1,\ 0)$ passes row 3 of the right operand through unchanged into row 3 of the product. Because row 3 of $M_{3D}$ must carry the elevation (Z) component of every vector, elevation must occupy row 3 of $M'_v$ — not row 2 as in $M_v$. The row semantics are therefore swapped: in $M'_v$, row 2 is the cross-track (lateral) component and row 3 is the elevation (Z) component.
Columns 2 and 3 — The row reordering reindexes the column values and exchanges the columns. $M_v$ column 2, the in-plane normal $(-dy_v,\ dx_v,\ 0)$ in [d-along, elevation, out-of-plane] ordering, becomes $(-dy_v,\ 0,\ dx_v)$ in [d-along, cross-track, elevation] ordering — the 3D up direction — and moves to column 3. $M_v$ column 3, the out-of-plane unit direction $(0,\ 0,\ 1)$, becomes $(0,\ 1,\ 0)$ — the cross-track direction — and moves to column 2.
The columns of $M'_v$ define directions in the 3D frame local to the alignment:
Column 1$(dx_v,\ 0,\ dy_v)$: the grade direction — $dx_v$ scales the contribution along the horizontal tangent; $dy_v$ is the elevation rate of change (Z component of the 3D tangent).
Column 2$(0,\ 1,\ 0)$: the cross-track direction, always lateral to the alignment and always horizontal.
Column 3$(-dy_v,\ 0,\ dx_v)$: the "up" direction in the vertical plane of the alignment, orthogonal to the grade direction.
Column 4$(0,\ 0,\ z)$: the elevation offset with no horizontal displacement.
The 3D placement matrix is:
$$M_{3D} = M_h \cdot {M'}_v$$
Multiplying out, the columns of $M_{3D}$ are:
Column 1 (RefDirection / 3D tangent): $(dx_h \cdot dx_v,\ dy_h \cdot dx_v,\ dy_v)$ — the horizontal tangent scaled by $\cos\theta_v$, with $\sin\theta_v$ as the Z component.
Column 2 (Y / cross-track): $(-dy_h,\ dx_h,\ 0)$ — the horizontal normal direction, unchanged from $M_h$.
Column 3 (Axis / up): $(-dx_h \cdot dy_v,\ -dy_h \cdot dy_v,\ dx_v)$ — orthogonal to both the 3D tangent and the cross-track direction.
Column 4 (Location): $(x_h,\ y_h,\ z)$ — the full 3D position.
Numerical examples of Steps 1–3 are given in Sections 3.3 through 3.6. A complete worked example including Step 4 is in Section 3.7.
3.3 Constant Gradient
A constant gradient is geometrically represented with a segment trimmed from an IfcLine parent curve.
3.3.1 Parent Curve Parametric Equations
$$x(s) = p_{x} + s \cdot dx$$
$$y(s) = p_{y} + s \cdot dy$$
where $(p_x,\ p_y)$ is the IfcLine origin and $dx$ and $dy$ are the direction parameters.
3.3.2 Semantic Definition to Geometry Mapping
Mapping of the semantic definition of the linear segment to the
geometric definition is described with the following example.
Consider a vertical gradient at an uphill slope of 0.5 starting at point
(0,10). The horizontal projection of the segment length is 100.
IfcCurveSegment.SegmentLength is the length measured along the trimmed
curve. For a horizontal length of $100\ m$, the length along the curve is
$$100/0.894427190999916 = 111.803398874989\ m$$
A circular vertical curve is geometrically represented with a segment trimmed from an IfcCircle parent curve.
3.4.1 Parent Curve Parametric Equations
The IfcCircle parametric equations for a vertical circular arc are identical to the horizontal case (Section 2.4.1), with $x(s)$ representing distance along the horizontal alignment and $y(s)$ representing elevation.
where $R$ is IfcCircle.Radius and $s$ is arc length along the circle. The grade at arc length $s$ is $g(s) = \tan(\theta(s))$.
3.4.2 Semantic Definition to Geometry Mapping
Vertical circular arcs are tricky. The "distance along" dimension is
horizontal while the IfcCurveSegment trimming parameters SegmentStart and SegmentLength are measured along the IfcCircle.
The following procedure maps the semantic parameters of a vertical circular arc to its geometric definition.
Given the following semantic definition of a vertical circular arc, create the geometric definition.
Determine the tangent slope angle at the start and end of the segment.
$$g_{start} = -0.5$$
$$\theta_{start} = \tan^{-1}(g_{start})$$
$$\theta_{start} = \tan^{-1}(-0.5) = -0.463648$$
$$g_{end} = -1$$
$$\theta_{end} = \tan^{-1}(g_{end})$$
$$\theta_{end} = \tan^{-1}(-1) = -0.785398$$
Compute the radius of the circle.
IfcAlignmentVerticalSegment.RadiusOfCurvature is optional. If provided, it should be consistent with the HorizontalLength, StartGradient and EndGradient, but is not guaranteed. For this reason, the radius is computed from the required HorizontalLength, StartGradient and EndGradient attributes. Note that in computing the radius, it is taken to be an absolute value because IfcCircle.Radius is a IfcPositiveLengthMeasure.
Compute the arc-length trimming parameters SegmentStart and SegmentLength.
For an IfcCircle with CCW parametrization and RefDirection = (1, 0), the arc-length parameter at a point where the grade angle is $\theta$ depends on which half of the circle the vertical curve occupies.
If $\theta_{start} < \theta_{end}$ — sagging curve (lower half of circle):
Compute the chord length, $c$ between the start and end of the trimmed segment. This is accomplished by locating the point on the parent curve that corresponds to a horizontal distance of $\ell = 50\ m$. From Figure 3.4.3-1 the point on the parent curve is located using the right triangle shown. Once the point on the parent curve is known, a chord distance between the start of the trim and this point can be computed (see inset chord line detail). From here a sweep angle $\Delta$ is computed and then the tangent direction at the point.
Figure 3.4.3-1 — Geometry of a vertical circular arc. The chord $c$ connects two points on the arc. The right triangle simplifies locating points on the arc. The inset highlights the distinction between the straight chord and the curved arc.
Location point on parent curve corresponding to $\ell = 50$
The most common transition curve in a vertical profile is a parabola. The geometric representation is IfcPolynomialCurve. Mapping of the semantic definition to the geometric definition can be a bit tricky.
Consider a 1600 m parabolic vertical curve that starts 1200 m along the horizontal alignment. The entry grade is 1.75% and the exit grade is -1%. The elevation at the start of the curve is 121 m.
Note: The coefficients $A_0$, $A_1$, and $A_2$ must have the following unit of measure, consistent with the project units:
$A_0 = Length^1$
$A_1 = Length^0$
$A_2 = Length^{-1}$
The coefficients of IfcPolynomialCurve expect real numbers without explicit unit of measure. This is a problem with the IFC Specification. See the discussion of IfcAlignmentHorizontalSegment and IfcPolynomialCurve for Cubic Transition Curve in Chapter 2 - Horizontal Alignments. Implicit units of measure are required for the polynomial coefficients.
The polynomial curve is trimmed using IfcCurveSegment.SegmentStart and IfcCurveSegment.SegmentLength. These parameters are measured along the length of the curve. The horizontal projection of the segment length, from IfcAlignmentVerticalSegment.HorizontalLength is $h_l = 1600$. SegmentLength will be slightly longer because it is the distance along the curve.
The length along the curve is $L_c = s(h_l) - s(0.0)$.
Let $\quad a = 4A_2^2 \quad b = 4A_2A_1 \quad c = A_1^2 + 1$
Compute the coefficients $a, b, c$, substitute curve length equation and solve. The curve length is
$$L_c = 1600.0616641340894$$
The placement of the trimmed curve segment is noteworthy. From the IfcAlignmentVerticalSegment attributes, the parabolic segment of the vertical alignment starts at 1200 from the beginning of the horizontal alignment and is at an elevation of 121. The RefDirection vector at the start of the curve is needed as well.
Compute the vertical placement matrix for the point at horizontal distance $1500$ m from the start of the alignment. This vertical alignment segments starts at $1200$ from the start of the alignment. The evaluation point is $\ell=1500-1200=300$ from the start of the segment.
Step 1 — Form the curve segment placement matrix $M_{CSP}$
Step 4 — Combine with the horizontal alignment point to produce the 3D placement matrix
Modify the $M_v$ matrix into $M'_v$ to put the vertical point into the same reference frame as the horizontal. Swap rows and columns 2 and 3. Set the distance along to 0.0.
3.8 Zero-Length Closing Segment and IfcGradientCurve.EndPoint
The zero-length closing segment requirement described in Section 2.12 applies equally to IfcGradientCurve. The final IfcAlignmentVerticalSegment nested within IfcAlignmentVertical must have SegmentLength = 0, and the corresponding geometric counterpart in IfcGradientCurve must be a zero-length IfcCurveSegment placed at the endpoint of the profile with its tangent direction matching the end grade direction.
IfcGradientCurve.EndPoint is an optionalIfcCartesianPoint attribute whose purpose overlaps with the zero-length segment: it encodes the 3D endpoint of the gradient curve, providing the same geometric information as the placement of the zero-length IfcCurveSegment. Because EndPoint is optional and the zero-length segment is required by the IFC Concept Templates, the zero-length segment is the primary, normative source of the endpoint geometry. When EndPoint is present, it must be consistent with the placement of the zero-length closing segment — a discrepancy between the two is a data error. Implementations should not rely on EndPoint as a substitute for the zero-length segment, nor assume it will be populated.
3.9 Summary and Implementation Checklist
#
Item
Notes
1
SegmentStart and SegmentLength are arc-length parameters, but vertical segments are evaluated at horizontal distance
Convert horizontal distance $\ell$ to arc-length $s$ using the parent curve geometry before passing to the evaluator; for low grades the difference is small but non-zero
2
SegmentLength is negative for crest (cresting) circular arc curves
A negative SegmentLength indicates the arc is traversed clockwise; use its absolute value for length accumulation and preserve the sign for trim direction
3
Do not rely on IfcAlignmentVerticalSegment.RadiusOfCurvature
This attribute is optional and may be absent or inconsistent; always compute the radius from HorizontalLength, StartGradient, and EndGradient
4
Treat IfcPolynomialCurve coefficients as having implicit units of $\text{Length}^{(1-i)}$
For a parabolic arc, $A_2$ has implicit units of Length$^{-1}$; evaluate as $y(x) = A_2 x^2 + A_1 x + A_0$ where $x$ is a length
5
When forming $M'_v$ for Step 4, zero the distance-along component and swap rows/columns 2 and 3
This maps elevation from the vertical plane's row 2 to row 3 of the 3D matrix, placing it on the Z axis where $M_h$ expects it
6
Include a zero-length IfcCurveSegment at the end of IfcGradientCurve; treat IfcGradientCurve.EndPoint as secondary
The zero-length segment is required by the IFC Concept Templates and is the normative endpoint; EndPoint is optional — if present, it must agree with the zero-length segment placement