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 IfcCurveSegment placement is provided in the IFC. This placement is
represented in matrix form as
$$M_{PC} = \begin{bmatrix}
dx & - dy & 0 & x \\
dy & dx & 0 & y \\
0 & 0 & 1 & 0 \\
0 & 0 & 0 & 1
\end{bmatrix}$$
Column 1 represents the RefDirection (dx,dy,0)
Column 3 represents the Axis (0,0,1). Axis is always "up" normal to the
2D plane
Column 4 represents the Location (x,y,0). Z is always zero because the
horizontal curve lies in the X-Y plane
Column 2 is the Y direction is the cross product of RefDirection and
Axis.
Line
When IfcLine is used as a parent curve, it represents a tangent run of
the alignment.
Source Model: FHWA Alignment Model
Parent Curve Parametric Equations
The equation of a line is parameterized as
$$\theta(t) = \theta$$
$$\kappa(t) = 0$$
$$\lambda(u) = C + L\left( \int_{0}^{u = 1}{\cos\left( \theta(t) \right)}dt\ x,\ \int_{0}^{u = 1}{\sin\left( \theta(t) \right)}dt\ y \right)$$
$$\lambda(u) = C + \left( \int_{0}^{u = L}{\cos\left( \theta(t) \right)}dt\ x,\ \int_{0}^{u = L}{\sin\left( \theta(t) \right)}dt\ y \right)$$
⚠️[Discuss that a line (and the other parent curves) can be parametetized
differently and there isn't a standards therefore the rule that
IfcCurveSegment.Start and Length IfcCurveMeasureSelect must be
IfcLengthMeasure.]⚠️
Semantic Definition to Geometry Mapping
Mapping of the semantic definition of the linear segment to the
geometric definition is described with the following example.
Given a horizontal alignment segment is a line segment starting at point
(500,2500), bearing in the direction 5.70829654085293 and has a length
of 1956.785654. This segment is represented as
The geometric representation is an IfcLine. The line can be defined in
different ways and is generally not important, as will be shown in the
example below. IfcLine is an infinitely long line that passes through a
specified point at some direction in the X-Y plane. An easy way to
define the IfcLine parent curve is to have in the X-axis direction
passing through point (0,0).
IfcCurveSegment defines the portion of the line used and how it is
placed and oriented in the X-Y plane.
IfcCurveSegment.SegmentStart defines where the parent curve trimming
begins. It can be anywhere along the line. It's easiest to begin the
trimming at the origin but could be anywhere. The SegmentStart attribute
is 0.0 in this case.
IfcCurveSegment.SegmentLength defines where the parent curve trimming
ends relative to SegmentStart. This is the length of the curve we want
to trim. The SegmentLength attribute is 1956.785654 for this example.
The SegmentStart and SegmentLength attributes trims a portion of the
IfcLine parent curve, which is oriented in the direction (1,0) with
origin at (0,0). The trimmed portion of the curve needs to be placed and
oriented into the horizontal alignment, but in this case, it is trivial
and the IfcCurveSegment.Placement is sufficient to place and orient the
trimmed line segment.
From IfcCurveSegment.Placement, the direction of the segment is
Compute the position matrix for a point 100 m from the start of the
curve segment.
The IfcCurveSegment.Placement is sufficient to locate a point on the
segment. The position and orientation of the parent curve are irrelevant
for IfcLine.
IfcCircle is defined by its center (IfcCircle.Position) and radius
(IfcCircle.Radius). The position of the circle is irrelevant. The
mapping from the semantic definition of radius to the geometric
definition of radius is trivial.
Consider a horizontal curve segment that starts at (0,0), has a radius
of 300 m, and an arc length of 100 m. The semantic definition is
This is a circle centered at point (0,300) with the local X-axis aligned
with the negative global Y-axis. This aligns the trimmed curve with its
final placement.
The trimmed curve segment is placed such that the start point is at
(0,0) and the tangent at the start point is in the direction (1,0).
A clothoid curve is parameterized by
$$u = \frac{s}{\left| A\sqrt{\pi} \right|}\ $$ with
$- \infty < u < \infty$. When $\theta = \pi/2$, $u = 1.0$.
Semantic Definition to Geometry Mapping
$$f = \frac{L}{R_{e}} - \frac{L}{R_{s}}$$
$$A = \frac{L}{\sqrt{|f|}}\frac{f}{|f|}$$
Consider a horizontal clothoid segment that starts at (0,0) with a start
direction of (1.0,0.0). The radii at the start and end of the segment
are 300 and 1000, respectively. The arc length of the segment is 100.
The semantic definition is
The curve segment starts where the radius is 300. The distance from the
origin where this radius occurs can be computed from the curvature
equation. The curvature at the start is 1/300 and the clothoid constant
is -207.0196678. Solve for distance from origin.
Step 4 -- Create matrix for IfcCurveSegment.Placement
Represent IfcCurveSegment.Placement in matrix form. In this example, the
placement is at (0,0) with RefDirection (1,0) which results in an
identity matrix. This is not true in all cases.
The approach for calculating the coordinates of a horizontal cubic curve
is unique compared to the other curve types. For a horizontal alignment,
the coordinate point and curve tangent angle is generally defined by
parametric equations where the parameter is the distance along the
curve. A cubic curve is represented with the IfcPolynomialCurve parent
curve type. When IfcPolynomialCurve is used as a cubic transition curve,
the $x$ coefficients are [0,1] and the $y$ coefficients are
[0,0,0, $A_{3}$] resulting in a function of the form
$y(x) = A_{3}x^{3}$.
This equation is solved for $x$ and then $y$ can be computed. This can
be accomplished with numeric methods.
For a distance $u$ along the curve, find $x$ for $s - u = 0$
Compute $y(x) = A_{3}x^{3}$
Compute curve tangent slope as $\frac{dy}{dx} = 3A_{3}x^{2}$
Semantic Definition to Geometry Mapping
$$A_{0} = A_{1} = A_{2} = 0$$
$$A_{3} = \frac{1}{6R_{e}L} - \frac{1}{6R_{s}L}$$
Consider a horizontal cubic transition curve segment that starts at
(0,0) with a start direction of 0.0. The radius at the start is infinite
and the radius at the end is 300. The arc length of the segment is 100.
The semantic definition is
There is a flaw in the IFC Specification. IfcAlignmentHorizontalSegment indicates the cubic formula is $y=\frac{x^3}{6RL}$ which means the IfcPolynomialCurve.CoefficentY[3] attribute must have unit of $Length^{-2}$. This is a direct contradiction to IfcPolynomialCurve which clearly states the coefficent are real values (i.e. scalar values) with IfcReal.
Why is this a problem? The calculation of a point on the polynomal curve is different depending on how the coefficients are defined.
The parametric form of the polynomial curve is $Q(u) = ( x(u), y(u), z(u) )$. The polynomial curve represents real geometry so the resulting values, $x$, $y$, and $z$ must have units of $Length$.
When $u$ is parametrized as a Length measure, as required by IfcCurveSegment, the parametric terms of the polynomal equation are:
$x(u) = \sum\limits_{i=0}^{l} a_i u^i $
$y(u) = \sum\limits_{j=0}^{m} b_j u^j $
$z(u) = \sum\limits_{k=0}^{n} c_k u^k $
For $x$, $y$, and $z$ to have values in $Length$ measure, the implicit unit of measure of the coefficients must be:
$Length^{(1-i)}$ for $a_i$
$Length^{(1-j)}$ for $b_j$
$Length^{(1-k)}$ for $c_k$
When $u$ is parametrized as a scalar, as required by IfcPolynomialCurve, the parametric terms of the polynomial equation are:
$x(u) = L\sum\limits_{i=0}^{l} a_i u^i $
$y(u) = L\sum\limits_{j=0}^{m} b_j u^j $
$z(u) = L\sum\limits_{k=0}^{n} c_k u^k $
The parameter $u$ and the coefficients are scalar so they must be multipled with the curve length $L$ to result values of Length.
The equations for $x$, $y$, and $z$ differ depending on the parameterization.
Concept Template 4.2.2.1.5 Cubic Transition Segment and IfcAlignmentHorizontalSegment provide clear direction (not withstanding typographical errors) that IfcPolynomalCurve is to be evaluated as $y = CoefficientsY[3]x^3$ which dictates that $CoefficientsY[3]$ must be in units of $Length^{-2}$ and must be encoded in the IfcPolynomialCurve.CoefficientY attribute as an IfcReal.
While I've never been able to find an offically documented Implementer's Agreement, this interpetation is consistent with several different discussions on GitHub.
The Helmert curve is unique in that it is modeled in two halves. The
business logic is represented geometrically by two
IfcSecondOrderPolynomialSpiral objects.
Consider a horizontal Helmert transition curve segment that starts at
(0,0) with a start direction of 0.0. The radius at the start is infinite
and the radius at the end is 300. The arc length of the segment is 100.
The semantic definition is
The end point of the first parent curve and the start point of the
second parent curve are offset so a rotation and translation for the
placement of the second parent curve is needed.
Consider a horizontal Bloss transition curve segment that starts at
(0,0) with a start direction of 0.0. The radius at the start is infinite
and the radius at the end is 300. The arc length of the segment is 100.
The semantic definition is
Consider a horizontal cosine transition curve segment that starts at
(0,0) with a start direction of 0.0. The radius at the start is infinite
and the radius at the end is 300. The arc length of the segment is 100.
The semantic definition is
Consider a horizontal sine transition curve segment that starts at (0,0)
with a start direction of 0.0. The radius at the start is infinite and
the radius at the end is 300. The arc length of the segment is 100. The
semantic definition is
Consider a horizontal Viennese Bend transition curve segment that starts at (0,0) with a start direction of 0.0. The radius at the start is infinite and the radius at the end is 300. The arc length is 100. The Gravity Center Line Height is 1.8 (this optional parameter is required for the Viennese Bend). The semantic definition is
Viennese Bend transition curves are unique in that the horizontal geometry of the curve depends on the cant. For the example, the cant segment horizontal length is 100, the start cant is 0.0 and the end cant is 0 at the left rail and 0.1 at the right rail. The semantic definition is