PathFragment Class

  • Annotation of an interval of a curve.
  • The interval is marked with two pairs of numbers:
    • fraction0, fraction1 = fraction parameters along the child curve
    • distance0,distance1 = distances within containing CurveChainWithDistanceIndex

Methods

Name Description
constructor(childFraction0: number, childFraction1: number, distance0: number, distance1: number, childCurve: CurvePrimitive, range?: Range3d): PathFragment Create a fragment with complete fraction, distance and child data.  
chainDistanceToAccurateChildFraction(chainDistance: number, allowExtrapolation?: boolean): number Convert chainDistance to true chidFraction, using detailed moveSignedDistanceFromFraction  
chainDistanceToInterpolatedChildFraction(distance: number): number Convert distance to local fraction, and apply that to interpolate between the stored curve fractions.  
childFractionTChainDistance(fraction: number): number   Deprecated  
childFractionToChainDistance(fraction: number): number convert a fractional position on the childCurve to distance in the chain space.  
containsChainDistance(distance: number): boolean Return true if the distance is within the distance limits of this fragment.  
containsChildCurveAndChildFraction(curve: CurvePrimitive, fraction: number): boolean Return true if this fragment addresses curve and brackets fraction  
fractionScaleFactor(globalDistance: number): number Return the scale factor to map childCurve fraction derivatives to chain fraction derivatives  
quickMinDistanceToChildCurve(spacePoint: Point3d): number    
reverseFractionsAndDistances(totalDistance: number): void Reverse the fraction and distance data.  
collectSortedQuickMinDistances(fragments: PathFragment[], spacePoint: Point3d): PathFragment[] Static    

Properties

Name Type Description
a number working var for use in searches.  
chainDistance0 number distance along parent to this fragment start  
chainDistance1 number distance along parent to this fragment end  
childCurve CurvePrimitive Curve primitive of this fragment, as presented in stroker.  
childFraction0 number Fractional position of this fragment start within its curve primitive.  
childFraction1 number Fractional position of this fragment end within its curve primitive..  
range undefined | Range3d optional range  

Defined in

Last Updated: 30 November, 2023