JointOptions Class

  • Control parameters for joint construction.
  • Decision order is:
    • if turn angle is greater than minArcDegrees, make an arc.
    • if turn angle is less than or equal maxChamferTurnDegrees, extend curves along tangent to single intersection point.
    • if turn angle is greater than maxChamferTurnDegrees, construct multiple lines that are tangent to the turn circle "from the outside", with each equal turn less than maxChamferTurnDegrees.
    • otherwise make single edge.

Methods

Name Description
constructor(leftOffsetDistance: number, minArcDegrees: number = 180, maxChamferDegrees: number = 90, preserveEllipticalArcs: boolean = false): JointOptions Construct JointOptions.  
clone(): JointOptions Return a deep clone.  
needArc(theta: Angle): boolean return true if the options indicate this amount of turn should be handled with an arc.  
numChamferPoints(theta: Angle): number Test if turn by theta should be output as single point.  
setFrom(other: JointOptions): void Copy values of input options  
create(leftOffsetDistanceOrOptions: number | JointOptions): JointOptions Static Parse a number or JointOptions up to JointOptions:  

Properties

Name Type Description
leftOffsetDistance number Offset distance, positive to left of base curve.  
maxChamferTurnDegrees number    
minArcDegrees number smallest arc to construct.  
preserveEllipticalArcs boolean Whether to offset elliptical arcs as elliptical arcs (true) or as B-spline curves (false, default).  

Defined in

Last Updated: 30 November, 2023