Methodology & Checks

The alignment check: structure and continuity of IFC 4.3 alignments

Summary

Roads, railways, bridges and tunnels are positioned along an alignment: the centreline that every station, chainage, cross-section and object refers to. If the alignment in an IFC file is wrong, everything placed along it is wrong with it, and in the data that error is usually invisible.

What the check does: for every IfcAlignment in an IFC 4.3 file, forensicBIM tests whether the design description of the alignment and its geometry describe the same line, whether consecutive segments join up without gaps or kinks, and whether the file follows the alignment rules that buildingSMART publishes for its validation service. The result appears on the Structure tab as the card Alignment structure & continuity, and only when the file contains an alignment.

Why the alignment matters to an asset owner

The alignment is the reference for everything that follows. Stationing on drawings, the location of a pier or a signal, the extent of a maintenance contract and the position of an inspection finding are all expressed as a distance along it. An alignment that is complete and correct can be reused for the next project phase, for other disciplines and for operations. One with gaps or contradictions has to be checked, and often rebuilt, by whoever receives it next.

The problem is that alignment errors rarely show on screen. A gap of a few millimetres between two segments, or a curve that was written as a straight line, looks fine in a viewer. The error only surfaces when someone computes a station, places an object at a distance along the alignment, or imports the file into design software that rebuilds the alignment from its parameters.

One alignment, two descriptions

An IFC 4.3 alignment is stored twice, on purpose:

  • The design layout (buildingSMART calls this the business logic): the alignment as an engineer designs it. A horizontal layout (IfcAlignmentHorizontal) of lines, arcs and transition curves with their radii and lengths; a vertical layout (IfcAlignmentVertical) of gradients and vertical curves; for rail, a cant layout (IfcAlignmentCant) for the superelevation. Each piece is an IfcAlignmentSegment with design parameters.
  • The geometry (the representation): the same line as explicit curves that any software can draw. An IfcCompositeCurve for the plan, an IfcGradientCurve for the vertical profile and an IfcSegmentedReferenceCurve for cant, each made of IfcCurveSegment pieces.

Design software reads the layout; viewers, coordination tools and GIS read the geometry. When the two disagree, different people looking at the same file see different alignments. That is why the check compares them piece by piece.

What forensicBIM checks

The checks below follow the alignment rules in buildingSMART's published rule set for its validation service (the ifc-gherkin-rules). Each check on the card carries the rule code, so you can look it up. Rules marked error are agreements every implementer is expected to meet; the two continuity rules are good practice, and buildingSMART reports them as warnings.

Check on the card Rule What it tests Usual cause when it fails Severity
Design type ↔ geometry type ALB023 Each design segment is drawn with the matching curve type: a line as IfcLine, a circular arc as IfcCircle, a clothoid as IfcClothoid, a Helmert curve as two IfcSecondOrderPolynomialSpiral pieces, and so on. The design and geometry lists must also be equally long. The exporter simplified curves to lines or polylines, or wrote a segment without a type. Error
Layout nesting ALB002 An alignment contains only layouts, and each layout contains only alignment segments of its own kind. Stations (IfcReferent) nested inside a layout instead of under the alignment, or a vertical layout placed inside the horizontal one. Error
Segment count parity ALB022 The design layout and its geometry have the same number of segments (a Helmert curve counts as two). A segment missing on one side, or a closing segment written in the geometry but not in the design. Error
Horizontal continuity ALS016 Each plan segment starts where the previous one ends and, where the joint is declared tangent, in the same direction. Coordinates rounded on export, or segments edited one by one so they no longer meet. Warning
Vertical continuity ALS017 Each profile segment starts at the height where the previous one ends and, where the joint is declared tangent, with the same gradient. Gradients or heights rounded on export; a vertical curve that does not reach the next gradient. Warning
Zero-length final design segment ALB015 Each design layout ends with a segment of length 0 that fixes the end point and end direction. The exporter does not write the closing segment. Error
Zero-length, discontinuous final curve segment ALS015 Each geometric curve ends with a segment of length 0 marked DISCONTINUOUS. No closing segment, or the closing segment marked as continuous. Error
Representation fits the layouts ALB021 The type of geometry matches the layouts present: a gradient curve needs a vertical layout, a segmented reference curve needs a cant layout, and a plan-only curve used as the main axis may not sit next to a vertical or cant layout. A plan curve exported as the Axis representation instead of the FootPrint, or a layout missing. Error

Two further lines on the card come from forensicBIM itself rather than from buildingSMART: Design length = curve length compares the length of each plan segment in the design with the length of its curve, and Geometric representation shows which representations the alignment carries, or flags an alignment that only has design parameters.

How strict the continuity check is

The continuity checks do not use a fixed tolerance chosen by forensicBIM. Like buildingSMART, they use the precision the file itself declares for its geometry (the Precision of its geometric representation context), and 0.00001 in the file's length unit when none is declared. For a metric file that is a hundredth of a millimetre.

  • Position: the gap between the end of one segment and the start of the next may not exceed that precision.
  • Direction (plan): the change in direction may not exceed the angle that the precision makes over the length of the segment. A long straight is therefore held to a tighter angle than a short transition.
  • Gradient (profile): the change in gradient may not exceed the precision.

A joint marked DISCONTINUOUS in the file is a deliberate break and is not tested. Every other joint is tested for position; direction and gradient are tested only where the joint is marked as tangent (CONTSAMEGRADIENT or CONTSAMEGRADIENTSAMECURVATURE).

Why a gap of a fraction of a millimetre is reported. The file states that its geometry is exact to the declared precision. A gap larger than that means the segments do not meet as the file claims, usually because values were rounded on export. It rarely matters on a drawing, but software that rebuilds the alignment or computes positions along it may stop at the gap, or carry it into everything placed further along.

To find the end of a segment, forensicBIM evaluates the curve with the same geometry kernel (IfcOpenShell) as the buildingSMART validation service. For the rare segment that kernel cannot evaluate, forensicBIM falls back to its own calculation and, because that calculation is an approximation, uses a looser tolerance of 5 mm and 0.05° for that joint so that rounding in the approximation is not reported as a fault.

Reading the alignment card

  1. Header and key figures: the alignment name and status (Consistent, or the number of findings), its length measured from the design segments with start and end station, the number of horizontal and vertical elements, the gradient range, the smallest radius and the number of referents (stations). Files with several alignments get a selector at the top right.
  2. Plan view: the alignment drawn to scale from its design parameters, with station ticks, radii, a north arrow and a scale bar. Lines are grey, arcs blue and transition curves purple. A red ring marks a joint over tolerance.
  3. Checks: one line per rule, with the measured value and the rule code. Findings reported by the audit are listed underneath.
  4. Along the alignment: horizontal elements, a curvature diagram (left-hand curves above the line, right-hand below), vertical elements, the elevation profile and, for rail, cant and superelevation, all on the same station axis.
  5. Segment register: every segment with its station, length, parameters, the curve type that represents it and the joint to the next segment. Click a row for all identifiers and design parameters; click a segment in either drawing to jump to its row.
  6. Referents & stations: the IfcReferent objects placed along the alignment. Referents without a distance along the alignment are counted separately: they exist, but cannot be located by station.

Stations follow the file's unit: 100 ft stations (12+34.56) in feet, and kilometre stations (1+234.56) in metres. The card is included in the downloadable standalone HTML report and works there offline.

What to do with a finding

Most alignment findings come from the export, not from the design itself, and can be fixed by whoever produced the file.

  • Missing closing segments (ALB015, ALS015): check the exporter's IFC 4.3 alignment settings, or whether a newer version of the exporter writes the closing segment.
  • Count or type mismatches (ALB022, ALB023): ask for the alignment to be exported with both its design layout and its geometry, without simplifying curves to polylines.
  • Gaps and kinks (ALS016, ALS017): ask for an export without rounding of coordinates, directions and gradients. Where the gaps are real, the design itself needs correcting.
  • Nesting and representation (ALB002, ALB021): these are structural export errors. Referents belong under the alignment, not inside a layout; a plan curve belongs in the FootPrint representation.

When you return a file to a supplier, quote the rule code and the segment or joint numbers from the card. They match the order of the segments in the file.

Frequently asked questions

Does a finding mean my IFC file is invalid?

Not necessarily. The file can be valid against the IFC schema and still break these rules: the schema says what may be written, the rules say what the content must agree on. An error-level finding means the file does not meet an agreement that buildingSMART expects every implementer to follow. A continuity warning means the segments do not meet within the precision the file itself declares.

Is this the same as the buildingSMART validation service?

The checks follow the same published rules and the same tolerances, and the card shows the rule codes so the two can be compared. forensicBIM is stricter in a few places: for example, it compares the segment types of the vertical and cant layouts as well as the horizontal one. The buildingSMART validation service remains the reference for formal compliance; this check shows the result next to the rest of the model's audit, in terms an owner can act on.

Why does a segment of length zero matter?

The closing segment records where the alignment ends and in which direction. Without it, software has to work out the end point from the last real segment, and different tools can arrive at slightly different answers.

Which files are checked?

Every IFC 4.3 file that contains an IfcAlignment. Files in IFC2x3 and IFC4 have no alignment entity, so the card does not appear for them. Alignment curves are also excluded from the geometry risk assessment described in The risks of complex IFC geometry types: clothoids and vertical curves are expected in civil work.

The alignment length differs from the value in my design software. Why?

The card reports the horizontal length, the sum of the plan segment lengths in the design layout. Lengths measured along the 3D line, or including run-in and run-out sections that were not exported, will differ.