ClipVector Class

Class holding an array structure of shapes defined by ClipPrimitive

  • The ClipVector defines an intersection of the member ClipPrimitive regions.
  • In the most common usage, one of the ClipPrimitive will be an outer region, and all others are holes with marker flag indicating that the outside of each hole is live.

Implements

Methods

Name Description
announceClippedArcIntervals(arc: Arc3d, announce?: AnnounceNumberNumberCurvePrimitive): boolean Method from Clipper interface.  
announceClippedSegmentIntervals(f0: number, f1: number, pointA: Point3d, pointB: Point3d, announce?: AnnounceNumberNumber): boolean Method from Clipper interface.  
appendClone(clip: ClipPrimitive): void Append a deep copy of the given ClipPrimitive to this ClipVector.  
appendPolygonClip(xyz: GrowableXYZArray, insideFragments: GrowableXYZArray[], outsideFragments: GrowableXYZArray[], arrayCache: ): void Execute polygon clip as intersection of the child primitives.  
appendReference(clip: ClipPrimitive): void Append a reference of the given ClipPrimitive to this ClipVector.  
appendShape(shape: Point3d[], zLow?: number, zHigh?: number, transform?: Transform, isMask: boolean = false, invisible: boolean = false): boolean Create and append a new ClipPrimitive to the array given a shape as an array of points.  
classifyPointContainment(points: Point3d[], ignoreMasks: boolean = false): ClipPlaneContainment Determines whether the given points fall inside or outside this set of ClipShapes.  
classifyRangeContainment(range: Range3d, ignoreMasks: boolean): ClipPlaneContainment Determines whether a 3D range lies inside or outside this set of ClipShapes.  
clear(): void Empties out the array of ClipShapes.  
clone(result?: ClipVector): ClipVector Create a deep copy of another ClipVector  
extractBoundaryLoops(loopPoints: Point3d[][], transform?: Transform): number[] A simple way of packaging this ClipVector's ClipShape points into a multidimensional array, while also  
isAnyLineStringPointInside(points: Point3d[]): boolean For an array of points (making up a LineString), tests whether the segment between each point lies inside the ClipVector.  
isLineStringCompletelyContained(points: Point3d[]): boolean For an array of points that make up a LineString, develops a line segment between each point pair,  
isPointOnOrInside(point: Point3d, onTolerance: number = Geometry.smallMetricDistanceSquared): boolean Method from Clipper interface.  
multiplyPlanesByMatrix4d(matrix: Matrix4d, invert: boolean = true, transpose: boolean = true): boolean Multiply all ClipPlanes DPoint4d by matrix.  
parseClipPlanes(): void For every clip, parse the member point array into the member clip plane object (only for clipPlanes member, not the mask)  
pointInside(point: Point3d, onTolerance: number = Geometry.smallMetricDistanceSquared): boolean Returns true if the given point lies inside all of this ClipVector's ClipShapes (by rule of intersection).  
setInvisible(invisible: boolean): void Sets this ClipVector and all of its members to the visibility specified.  
sumSizes(intervals: Segment1d[], begin: number, end: number): number Note: Line segments are used to represent 1 dimensional intervals here, rather than segments.  
toCompactString(): string Serializes this ClipVector to a compact string representation appropriate for transmission as part of a URL.  
toJSON(): ClipVectorProps Parse this ClipVector into a JSON object.  
transformInPlace(transform: Transform): boolean Transforms this ClipVector to a new coordinate-system.  
create(clips: ClipPrimitive[], result?: ClipVector): ClipVector Static Create a ClipVector from (clones of) an array of ClipPrimitives  
createCapture(clips: ClipPrimitive[], result?: ClipVector): ClipVector Static Create a ClipVector from an array of ClipPrimitives (or derived classes) (capture the pointers)  
createEmpty(result?: ClipVector): ClipVector Static Create a ClipVector with an empty set of ClipShapes.  
fromJSON(json: undefined | ClipVectorProps, result?: ClipVector): ClipVector Static Parse a JSON object into a new ClipVector.  

Properties

Name Type Description
boundingRange Range3d range acting as first filter.  
clips Accessor ReadOnly ClipPrimitive[] Returns a reference to the array of ClipShapes.  
isValid Accessor ReadOnly boolean Returns true if this ClipVector contains a ClipPrimitive.  

Defined in

Last Updated: 30 November, 2023