Api - path Module
Index
Interfaces
Variables
Functions
- break
AtPoint - circle
ToCircle - clone
- clone
And Break Path - converge
- copy
Layer - distort
- dogbone
- expand
- fillet
- find
Corresponding Angle Index - get
Angles Within Arc - get
Dogbone Result - get
Fillet Result - get
Guide Path - get
Line Ratio - get
Matching Point Properties - get
Point Properties - intersection
- line
ToCircle - mirror
- move
- move
Relative - move
Temp - move
Temporary - points
From Angles OnCircle - populate
Shard Points From Reference Circle - rotate
- scale
- straighten
- swap
Angles - test
Fillet Result
Variables
Private breakPathFunctionMap
Private distortMap
Private filletResultMap
Type declaration
-
[pathType: string]: function
-
-
Parameters
Returns IFilletResult
-
-
Private guidePathMap
Private map
Private mirrorMap
Private moveMap
Private moveRelativeMap
Private propertyNamesMap
Type declaration
-
[pathType: string]: function
-
-
Parameters
-
pathToInspect: IPath
Returns string[]
-
-
-
Private rotateMap
Private scaleMap
Type declaration
-
[pathType: string]: function
-
-
Parameters
-
pathValue: IPath
-
scaleValue: number
Returns void
-
-
-
Functions
breakAtPoint
-
Breaks a path in two. The supplied path will end at the supplied pointOfBreak, a new path is returned which begins at the pointOfBreak and ends at the supplied path's initial end point. For Circle, the original path will be converted in place to an Arc, and null is returned.
Parameters
Returns IPath
A new path of the same type, when path type is line or arc. Returns null for circle.
Private circleToCircle
-
Parameters
-
circle1: IPathCircle
-
circle2: IPathCircle
-
options: IPathIntersectionOptions
Returns number[]
-
clone
Private cloneAndBreakPath
converge
-
Connect 2 lines at their slope intersection point.
Parameters
-
lineA: IPathLine
First line to converge.
-
lineB: IPathLine
Second line to converge.
-
Optional useOriginA: boolean
Optional flag to converge the origin point of lineA instead of the end point.
-
Optional useOriginB: boolean
Optional flag to converge the origin point of lineB instead of the end point.
Returns IPoint
-
Private copyLayer
distort
dogbone
-
Adds a round corner to the outside angle between 2 lines. The lines must meet at one point.
Parameters
-
lineA: IPathLine
First line to fillet, which will be modified to fit the fillet.
-
lineB: IPathLine
Second line to fillet, which will be modified to fit the fillet.
-
filletRadius: number
-
Optional options: IPointMatchOptions
Returns IPathArc
Arc path object of the new fillet.
-
expand
fillet
-
Adds a round corner to the inside angle between 2 paths. The paths must meet at one point.
Parameters
-
pathA: IPath
First path to fillet, which will be modified to fit the fillet.
-
pathB: IPath
Second path to fillet, which will be modified to fit the fillet.
-
filletRadius: number
-
Optional options: IPointMatchOptions
Returns IPathArc
Arc path object of the new fillet.
-
Private findCorrespondingAngleIndex
-
Parameters
-
circleAngles: number[]
-
arcAngle: number[]
Returns number
-
Private getAnglesWithinArc
-
Parameters
-
angles: number[]
-
arc: IPathArc
-
options: IPathIntersectionOptions
Returns number[]
-
Private getDogboneResult
-
Parameters
-
context: IMatchPointProperty
-
filletCenter: IPoint
Returns IFilletResult
-
Private getFilletResult
-
Parameters
-
context: IMatchPointProperty
-
filletRadius: number
-
filletCenter: IPoint
Returns IFilletResult
-
Private getGuidePath
-
Parameters
-
context: IMatchPointProperty
-
filletRadius: number
-
nearPoint: IPoint
Returns IPath
-
Private getLineRatio
-
Parameters
-
lines: IPathLine[]
Returns number
-
Private getMatchingPointProperties
-
Parameters
-
pathA: IPath
-
pathB: IPath
-
Optional options: IPointMatchOptions
Returns IMatchPointProperty[]
-
Private getPointProperties
-
Parameters
-
pathToInspect: IPath
Returns IPointProperty[]
-
intersection
-
Find the point(s) where 2 paths intersect.
Parameters
-
path1: IPath
First path to find intersection.
-
path2: IPath
Second path to find intersection.
-
Default value options: IPathIntersectionOptions = {}
Optional IPathIntersectionOptions.
Returns IPathIntersection
IPathIntersection object, with points(s) of intersection (and angles, when a path is an arc or circle); or null if the paths did not intersect.
-
Private lineToCircle
-
Parameters
-
line: IPathLine
-
circle: IPathCircle
-
options: IPathIntersectionOptions
Returns number[]
-
mirror
move
moveRelative
Private moveTemp
-
Parameters
-
pathsToOffset: IPath[]
-
options: IPathIntersectionOptions
-
swapOffsets: boolean
-
task: Function
Returns void
-
moveTemporary
Private pointsFromAnglesOnCircle
-
Parameters
-
anglesInDegrees: number[]
-
circle: IPathCircle
Returns IPoint[]
-
Private populateShardPointsFromReferenceCircle
-
Parameters
-
filletRadius: number
-
center: IPoint
-
properties: IMatchPointProperty[]
-
options: IPointMatchOptions
Returns boolean
-
rotate
scale
straighten
-
Represent an arc using straight lines.
Parameters
-
arc: IPathArc
Arc to straighten.
-
Optional bevel: boolean
Optional flag to bevel the angle to prevent it from being too sharp.
-
Optional prefix: string
Optional prefix to apply to path ids.
-
Optional close: boolean
Returns IModel
Model of straight lines with same endpoints as the arc.
-
Private swapAngles
-
Parameters
-
result: IPathIntersection
Returns IPathIntersection
-
Private testFilletResult
-
Parameters
-
context: IMatchPointProperty
-
result: IFilletResult
Returns boolean
-
Generated using TypeDoc