moveSignedDistanceFromFraction Method
- (Attempt to) find a position on the curve at a signed distance from start fraction.
- Return the position as a CurveLocationDetail.
- In the
CurveLocationDetail, record:fractionalpositionfraction= coordinates of the point- `search
a= (signed!) distance moved. IfallowExtensionis false and the move reached the start or end of the curve, this distance is smaller than the requested signedDistance.curveSearchStatusindicates one of:error(unusual) computation failed not supported for this curve.successfull movement completedstoppedAtBoundarypartial movement completed. This can be due to eitherallowExtensionparameter sent asfalse- the curve type (e.g. bspline) does not support extended range.
- if
allowExtensionis true, movement may still end at the startPoint or end point for curves that do not support extended geometry (specifically bsplines) - if the curve returns a value (i.e. not
undefined) forcurve.getFractionToDistanceScale(), the base class carries out the computation and returns a final location.- LineSegment3d relies on this.
- If the curve does not implement the computation or the curve has zero length, the returned
CurveLocationDetailhasfraction= the value ofstartFractionpoint= result ofcurve.fractionToPoint(startFraction)a= 0curveStartState=CurveSearchStatus.error
moveSignedDistanceFromFraction(startFraction: number, signedDistance: number, allowExtension: boolean, result?: CurveLocationDetail): CurveLocationDetail
| Parameter | Type | Description |
|---|---|---|
| startFraction | number | fractional position where the move starts |
| signedDistance | number | distance to move. Negative distance is backwards in the fraction space |
| allowExtension | boolean | if true, all the move to go beyond the startPoint or endpoint of the curve. If false, do not allow movement beyond the startPoint or endpoint |
| result | CurveLocationDetail | optional result. |
Returns - A CurveLocationDetail annotated as above. Note that if the curve does not support the calculation, there is still a result which contains the point at the input startFraction, with failure indicated in the curveStartState member
Defined in
Last Updated: 08 January, 2020