ClipUtilities Class

Static class whose various methods are functions for clipping geometry

Methods

Name Description
constructor(): ClipUtilities    
announceLoopsOfConvexClipPlaneSetIntersectRange(convexSet: ConvexClipPlaneSet | ClipPlane, range: Range3d, loopFunction: (loopPoints: GrowableXYZArray) => void, includeConvexSetFaces: boolean = true, includeRangeFaces: boolean = true, ignoreInvisiblePlanes: boolean = false): void Static Emit point loops for intersection of a convex set with a range.  
announceNNC(intervals: Range1d[], cp: CurvePrimitive, announce?: AnnounceNumberNumberCurvePrimitive): boolean Static Announce triples of (low, high, cp) for each entry in intervals  
captureOrDrop(data: GrowableXYZArray, minLength: number, destination: GrowableXYZArray[], cache: ): void Static if data.length >= minLength threshold, push it to destination; if smaller drop it back to the cache.  
clipPolygonToClipShape(polygon: Point3d[], clipShape: ClipPrimitive): Point3d[][] Static Clip a polygon down to regions defined by each shape of a ClipShape.  
clipPolygonToClipShapeReturnGrowableXYZArrays(polygon: Point3d[], clipShape: ClipPrimitive): GrowableXYZArray[] Static Clip a polygon down to regions defined by each shape of a ClipShape.  
clipSegmentBelowPlaneXY(plane: Plane3dByOriginAndUnitNormal, segmentPoint0: Readonly<WritableXAndY>, segmentPoint1: Readonly<WritableXAndY>, interval: Range1d, absoluteTolerance: number = 1.0e-14): void Static Find the portion of a line within a half-plane clip.  
clipSegmentBelowPlanesXY(planes: Plane3dByOriginAndUnitNormal[], segment0: Readonly<WritableXAndY>, segment1: Readonly<WritableXAndY>, interval: Range1d, signedAltitude: number = 1.0e-14): void Static Clip an interval of a line segment to an array of planes  
clipSegmentToCCWTriangleXY(pointA: Readonly<WritableXAndY>, pointB: Readonly<WritableXAndY>, pointC: Readonly<WritableXAndY>, segment0: Readonly<WritableXAndY>, segment1: Readonly<WritableXAndY>, interval: Range1d, absoluteTolerance: number = 1.0e-14): void Static Clip an interval of a line segment to a triangle.  
clipSegmentToLLeftOfLineXY(linePointA: Readonly<WritableXAndY>, linePointB: Readonly<WritableXAndY>, segmentPoint0: Readonly<WritableXAndY>, segmentPoint1: Readonly<WritableXAndY>, interval: Range1d, absoluteTolerance: number = 1.0e-14): void Static Find the portion of a line within a half-plane clip.  
collectClippedCurves(curve: CurvePrimitive, clipper: Clipper): CurvePrimitive[] Static Find portions of the curve that are within the clipper.  
doesClipperIntersectRange(clipper: undefined | ConvexClipPlaneSet | ClipPrimitive | UnionOfConvexClipPlaneSets | ClipVector, range: Range3d, observeInvisibleFlag: boolean = true): boolean Static Test if various types of clippers have any intersection with a range.  
doesConvexClipPlaneSetIntersectRange(convexSet: ConvexClipPlaneSet, range: Range3d, includeConvexSetFaces: boolean = true, includeRangeFaces: boolean = true, ignoreInvisiblePlanes: boolean = false): boolean Static Emit point loops for intersection of a convex set with a range.  
isClipper(obj: any): boolean Static Test if obj is a Clipper object.  
loopsOfConvexClipPlaneIntersectionWithRange(allClippers: ConvexClipPlaneSet | ClipPlane | UnionOfConvexClipPlaneSets, range: Range3d, includeConvexSetFaces: boolean = true, includeRangeFaces: boolean = true, ignoreInvisiblePlanes: boolean = false): GeometryQuery[] Static Return a (possibly empty) array of geometry (Loops !!) which are facets of the intersection of the convex set intersecting a range.  
pointSetSingleClipStatus(points: GrowableXYZArray, planeSet: UnionOfConvexClipPlaneSets, tolerance: number): ClipStatus Static Given an array of points, test for trivial containment conditions.  
rangeOfClipperIntersectionWithRange(clipper: undefined | ConvexClipPlaneSet | ClipPrimitive | UnionOfConvexClipPlaneSets | ClipVector, range: Range3d, observeInvisibleFlag: boolean = true): Range3d Static Return the range of various types of clippers  
rangeOfConvexClipPlaneSetIntersectionWithRange(convexSet: ConvexClipPlaneSet, range: Range3d): Range3d Static Return the (possibly null) range of the intersection of the convex set with a range.  
restoreSingletonInPlaceOfMultipleShards(fragments: GrowableXYZArray[], baseCount: number, singleton: GrowableXYZArray, arrayCache: ): void Static Specialized logic for replacing clip fragments by an equivalent singleton.  
selectIntervals01(curve: CurvePrimitive, unsortedFractions: GrowableFloat64Array, clipper: Clipper, announce?: AnnounceNumberNumberCurvePrimitive): boolean Static * Augment the unsortedFractionsArray with 0 and 1  

Defined in

Last Updated: 29 November, 2022