Api - model Module
Index
Classes
Interfaces
Functions
- addOrDelete Segments 
- addUnique Points 
- breakAll Paths AtIntersections 
- breakAlong Foreign Path 
- breakPaths AtIntersections 
- center
- checkFor Equal Overlaps 
- checkFor Overlaps 
- checkInside Foreign Model 
- collectLoop 
- combine
- combineIntersection 
- combineSubtraction 
- combineUnion 
- convertUnits 
- countChild Models 
- detachLoop 
- expandPaths 
- findChains 
- findLoops 
- follow
- followLinks 
- getFirst Path From Model 
- getNon Zero Segments 
- getOpposed Link 
- getSimilar Model Id 
- getSimilar Path Id 
- isPath Inside Model 
- mirror
- move
- moveRelative 
- originate
- outline
- prefixPath Ids 
- removeDead Ends 
- rotate
- scale
- simplify
- walk
- walkPaths 
- zero
Functions
Private addOrDeleteSegments  
		- 
				
				Parameters- 
						crossedPath: ICrossedPath
- 
						includeInside: boolean
- 
						includeOutside: boolean
- 
						keepDuplicates: boolean
- 
						atlas: Atlas
 Returns void
- 
						
Private addUniquePoints  
		Private breakAllPathsAtIntersections   
		Private breakAlongForeignPath   
		- 
				
				Parameters- 
						crossedPath: ICrossedPath
- 
						overlappedSegments: ICrossedPathSegment[]
- 
						foreignWalkedPath: IWalkPath
 Returns void
- 
						
breakPathsAtIntersections  
		center
Private checkForEqualOverlaps   
		- 
				
				Parameters- 
						crossedPathsA: ICrossedPathSegment[]
- 
						crossedPathsB: ICrossedPathSegment[]
- 
						pointMatchingDistance: number
 Returns void
- 
						
Private checkForOverlaps  
		Private checkInsideForeignModel   
		- 
				
				Parameters- 
						segment: IPathInside
- 
						segmentOffset: IPoint
- 
						modelToIntersect: IModel
- 
						modelToIntersectAtlas: Atlas
- 
						Default value farPoint: IPoint = [7654321, 1234567]
 Returns void
- 
						
Private collectLoop 
		- 
				
				Parameters- 
						loop: ILoopModel
- 
						loops: ILoopModel[]
- 
						detach: boolean
 Returns void
- 
						
combine
- 
				
				Combine 2 models. Parameters- 
						modelA: IModelFirst model to combine. 
- 
						modelB: IModelSecond model to combine. 
- 
						Default value includeAInsideB: boolean = falseFlag to include paths from modelA which are inside of modelB. 
- 
						Default value includeAOutsideB: boolean = trueFlag to include paths from modelA which are outside of modelB. 
- 
						Default value includeBInsideA: boolean = falseFlag to include paths from modelB which are inside of modelA. 
- 
						Default value includeBOutsideA: boolean = trueFlag to include paths from modelB which are outside of modelA. 
- 
						Optional options: ICombineOptions
 Returns void
- 
						
combineIntersection 
		combineSubtraction 
		combineUnion 
		convertUnits 
		countChildModels  
		- 
				
				Count the number of child models within a given model. Parameters- 
						modelContext: IModelThe model containing other models. 
 Returns numberNumber of child models. 
- 
						
detachLoop 
		- 
				
				Remove all paths in a loop model from the model(s) which contained them. Parameters- 
						loopToDetach: IModelThe model to search for loops. 
 Returns void
- 
						
expandPaths 
		- 
				
				Expand all paths in a model, then combine the resulting expansions. Parameters- 
						modelToExpand: IModelModel to expand. 
- 
						distance: numberDistance to expand. 
- 
						Default value joints: number = 0Number of points at a joint between paths. Use 0 for round joints, 1 for pointed joints, 2 for beveled joints. 
- 
						Default value combineOptions: ICombineOptions = {}
 Returns IModelModel which surrounds the paths of the original model. 
- 
						
findChains 
		- 
				
				Find paths that have common endpoints and form chains. Parameters- 
						modelContext: IModelThe model to search for chains. 
- 
						callback: IChainCallback
- 
						Optional options: IFindChainsOptionsOptional options object. 
 Returns void
- 
						
findLoops 
		- 
				
				Find paths that have common endpoints and form loops. Parameters- 
						modelContext: IModelThe model to search for loops. 
- 
						Optional options: IFindLoopsOptionsOptional options object. 
 Returns IModelA new model with child models ranked according to their containment within other found loops. The paths of models will be IPathDirectionalWithPrimeContext. 
- 
						
Private follow
- 
				
				Parameters- 
						connections: Collector<IPoint, ILinkedPath>
- 
						loops: ILoopModel[]
- 
						detach: boolean
 Returns void
- 
						
Private followLinks 
		- 
				
				Parameters- 
						connections: Collector<IPoint, IChainLink>
- 
						chainFound: IChainFound
- 
						Optional chainNotFound: IChainNotFound
 Returns void
- 
						
Private getFirstPathFromModel    
		Private getNonZeroSegments   
		Private getOpposedLink  
		- 
				
				Parameters- 
						linkedPaths: IChainLink[]
- 
						pathContext: IPath
 Returns IChainLink
- 
						
getSimilarModelId   
		- 
				
				Get an unused id in the models map with the same prefix. Parameters- 
						modelContext: IModelThe model containing the models map. 
- 
						modelId: stringThe id to use directly (if unused), or as a prefix. 
 Returns string
- 
						
getSimilarPathId   
		- 
				
				Get an unused id in the paths map with the same prefix. Parameters- 
						modelContext: IModelThe model containing the paths map. 
- 
						pathId: stringThe id to use directly (if unused), or as a prefix. 
 Returns string
- 
						
isPathInsideModel   
		- 
				
				Check to see if a path is inside of a model. Parameters- 
						pathContext: IPathThe path to check. 
- 
						modelContext: IModelThe model to check against. 
- 
						Optional pathOffset: IPoint
- 
						Optional farPoint: IPointOptional point of reference which is outside the bounds of the modelContext. 
- 
						Optional measureAtlas: Atlas
 Returns booleanBoolean true if the path is inside of the modelContext. 
- 
						
mirror
move
moveRelative 
		originate
- 
				
				Moves all of a model's children (models and paths, recursively) in reference to a single common origin. Useful when points between children need to connect to each other. Parameters- 
						modelToOriginate: IModelThe model to originate. 
- 
						Optional origin: IPointOptional offset reference point. 
 Returns IModel
- 
						
outline
- 
				
				Outline a model by a specified distance. Useful for accommodating for kerf. Parameters- 
						modelToOutline: IModelModel to outline. 
- 
						distance: numberDistance to outline. 
- 
						Default value joints: number = 0Number of points at a joint between paths. Use 0 for round joints, 1 for pointed joints, 2 for beveled joints. 
- 
						Default value inside: boolean = falseOptional boolean to draw lines inside the model instead of outside. 
 Returns IModelModel which surrounds the paths outside of the original model. 
- 
						
prefixPathIds  
		removeDeadEnds  
		- 
				
				Remove paths from a model which have endpoints that do not connect to other paths. Parameters- 
						modelContext: IModelThe model to search for dead ends. 
- 
						Optional pointMatchingDistance: any
- 
						Optional keep: IWalkPathBooleanCallback
 Returns IModelThe input model (for chaining). 
- 
						
rotate
scale
simplify
- 
				
				Simplify a model's paths by reducing redundancy: combine multiple overlapping paths into a single path. The model must be originated. Parameters- 
						modelToSimplify: IModel
- 
						Optional options: ISimplifyOptionsOptional options object. 
 Returns IModelThe simplified model (for chaining). 
- 
						
walk
- 
				
				Recursively walk through all paths for a given model. Parameters- 
						modelContext: IModelThe model to walk. 
- 
						options: IWalkOptions
 Returns void
- 
						
walkPaths 
		- 
				
				Recursively walk through all paths for a given model. Parameters- 
						modelContext: IModelThe model to walk. 
- 
						callback: IModelPathCallbackCallback for each path. 
 Returns void
- 
						
zero
Generated using TypeDoc
