Skip to main content

Module window

Module window 

Source
Expand description

Seam-snapping windows (#294, ADR 0082 amendment).

An authoring rule may put a station ON a seam of its basis when it lies within the model’s precision of one (IFC 4.3 ADD2 8.9.3.48.3: the previous segment’s tangent governs a station “within precision limits” of a tangent discontinuity). That precision, up to a millimetre, is far wider than ARC_LENGTH_TOLERANCE, within which every station is on a seam already (super::seam). A station may therefore carry a WINDOW, a non-negative distance in its basis’s station measure: snapped_distance2, snapped_distance3 and [CompositeBasis::snapped_distance] return the distance it is read at.

§The rule

The seams considered are those whose frame may jump (not StationSeam::smooth): a composite’s joints, a polyline’s vertices, a B-spline’s corner knots, an elevated curve’s grade breaks, a banked curve’s cant and pivot seams. Each is located by a DistanceInterval that contains its true distance: a point where the distance is read from stored data, a certified interval no wider than WINDOW_CERTIFICATION times the window where it is a quadrature (after an offset piece, an ellipse or a B-spline, and a B-spline’s corner knot; see super::certify).

  • A seam whose interval lies inside [d - w, d + w] is within the window; one whose interval lies wholly outside it is not.
  • Exactly one seam within the window: the station is read at that seam’s own distance, where the kernel reads the seam, so the seam rule takes over and its SeamSide names the piece. The station’s point is the seam’s: the station has moved onto it.
  • None: the distance is read as it is.
  • Two or more: refused by a typed GeomError::UnsupportedInput naming SEAM_WINDOW_AMBIGUOUS, since the side would not say which seam.
  • A seam whose interval straddles the window’s edge, so that inside and outside cannot be told: refused by name, SEAM_WINDOW_STRADDLED.

A window of 0 reads the distance as it is, the arc-length tolerance alone; a negative or non-finite window is refused by name.

The same test of an interval against a window, DistanceInterval::meets, picks the joints [CompositeBasis::joint_intervals_within] (#305) and the curve-evaluation contract’s path_joint_distances_within return.

Constants§

SEAM_WINDOW_AMBIGUOUS
The input a window holding two seams is refused for.
SEAM_WINDOW_STRADDLED
The input a seam straddling a window’s edge is refused for.
WINDOW_CERTIFICATION
How finely a seam’s distance is certified for a window: the certified interval is at most this fraction of the window wide.

Functions§

snapped_distance2
The distance a station at distance along a 2D curve, with the seam-snapping window, is read at; see the module documentation.
snapped_distance3
snapped_distance2 along a 3D curve.