comparePairsByFractions MethodStatic

Return a pair comparator useful for sorting an array of detail pairs by their fractions.

  • Comparison assumes detailA curves are the same and detailB curves are the same.
  • Comparison checks for equality of pair fractions, then of pair points, then sorts by detailA.fraction, then detailB.fraction.

comparePairsByFractions(fractionTol: number = Geometry.smallFraction, pointTol: number = Geometry.smallMetricDistance, xyOnly: boolean = false, equateClosedCurveFractions: boolean = false): OrderedComparator<CurveLocationDetailPair>

Parameter Type Description
fractionTol number tolerance for comparing fractions. Default value smallFraction.
pointTol number tolerance for comparing points, used if fractions are distinct. Default value smallMetricDistance.
xyOnly boolean whether to perform point comparisons in xy only. Default is false (compare 3D points).
equateClosedCurveFractions boolean whether to equate fractions 0 and 1 for physically closed curves. Default is false.

Returns - OrderedComparator<CurveLocationDetailPair>

Defined in

Last Updated: 28 April, 2026