ClipUtilities Class
Class whose various static methods are functions for clipping geometry
Methods
Name | Description | |
---|---|---|
constructor(): ClipUtilities | ||
announceLoopsOfConvexClipPlaneSetIntersectRange(convexSet: ClipPlane | ConvexClipPlaneSet, range: Range3d, loopFunction: (loopPoints: GrowableXYZArray) => void, includeConvexSetFaces: booleantrue, includeRangeFaces: booleantrue, ignoreInvisiblePlanes: booleanfalse): 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. | |
announcePolylineClip(clipper: Clipper, points: Point3d[], announce: (point0: Point3d, point1: Point3d) => void): void Static | Pass line segments from a polyline to the clipper. | |
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. | |
clipAnyCurve(curve: AnyCurve, clipper: Clipper): AnyCurve[] Static | Compute and return portions of the input curve or region that are within the clipper. | |
clipAnyRegion(region: AnyRegion, clipper: Clipper): undefined | AnyRegion Static | Compute and return the portions of the input region that are within the clipper. | |
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. | |
clipSegmentBelowPlanesXY(planes: Plane3dByOriginAndUnitNormal[], segment0: Readonly<WritableXAndY>, segment1: Readonly<WritableXAndY>, interval: Range1d, signedAltitude: number1.0e-14): void Static | Clip an interval of a line segment to an array of planes | |
clipSegmentBelowPlaneXY(plane: Plane3dByOriginAndUnitNormal, segmentPoint0: Readonly<WritableXAndY>, segmentPoint1: Readonly<WritableXAndY>, interval: Range1d, absoluteTolerance: number1.0e-14): void Static | Find the portion of a line within a half-plane clip. | |
clipSegmentToCCWTriangleXY(pointA: Readonly<WritableXAndY>, pointB: Readonly<WritableXAndY>, pointC: Readonly<WritableXAndY>, segment0: Readonly<WritableXAndY>, segment1: Readonly<WritableXAndY>, interval: Range1d, absoluteTolerance: number1.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: number1.0e-14): void Static | Find the portion of a line within a half-plane clip. | |
collectClippedCurves(curve: CurvePrimitive, clipper: Clipper): CurvePrimitive[] Static | Compute and return portions of the input curve that are within the clipper. | |
createComplementaryClips(clipper: ConvexClipPlaneSet): UnionOfConvexClipPlaneSets Static | For each plane of clipper, construct a UnionOfConvexClipPlaneSets for an outer (infinite) convex volume that | |
doesClipperIntersectRange(clipper: ConvexClipPlaneSet | UnionOfConvexClipPlaneSets | ClipPrimitive | ClipVector, range: Range3d, observeInvisibleFlag: booleantrue): boolean Static | Test if various types of clippers have any intersection with a range. | |
doesConvexClipPlaneSetIntersectRange(convexSet: ConvexClipPlaneSet, range: Range3d, includeConvexSetFaces: booleantrue, includeRangeFaces: booleantrue, ignoreInvisiblePlanes: booleanfalse): boolean Static | Emit point loops for intersection of a convex set with a range. | |
doLocalRangesIntersect(range0: Range3d, local0ToWorld: Transform, range1: Range3d, local1ToWorld: Transform, range1Margin?: number): boolean Static | Test for intersection of two ranges in different local coordinates. | |
doPolygonClipParitySequence(xyz: IndexedXYZCollection, clippers: Clipper[], acceptedIn: GrowableXYZArray[], acceptedOut: GrowableXYZArray[], arrayCache: ): void Static | Pass polygon xyz through a sequence of PolygonClip steps with "parity" rules |
|
doPolygonClipSequence(xyz: IndexedXYZCollection, clippers: Clipper[], acceptedIn: GrowableXYZArray[], acceptedOut: GrowableXYZArray[], finalCandidates: GrowableXYZArray[], inAction: ClipStepAction, outAction: ClipStepAction, finalFragmentAction: ClipStepAction, arrayCache: ): void Static | Pass polygon xyz through a sequence of PolygonClip steps. |
|
isClipper(obj: any): boolean Static | Test if obj is a Clipper object. |
|
loopsOfConvexClipPlaneIntersectionWithRange(allClippers: ClipPlane | ConvexClipPlaneSet | UnionOfConvexClipPlaneSets, range: Range3d, includeConvexSetFaces: booleantrue, includeRangeFaces: booleantrue, ignoreInvisiblePlanes: booleanfalse): GeometryQuery[] Static | Return a (possibly empty) array of geometry (Loops !!) which are facets of the intersection of the convex set | |
pointSetSingleClipStatus(points: GrowableXYZArray, planeSet: UnionOfConvexClipPlaneSets, tolerance: number): ClipStatus Static | Given an array of points, test for trivial containment conditions. | |
rangeOfClipperIntersectionWithRange(clipper: ConvexClipPlaneSet | UnionOfConvexClipPlaneSets | ClipPrimitive | ClipVector, range: Range3d, observeInvisibleFlag: booleantrue): 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. | |
rangeOfIntersectionOfLocalRanges(range0: Range3d, local0ToWorld: Transform, range1: Range3d, local1ToWorld: Transform, result?: Range3d): Range3d Static | Compute the range of the intersection between two local (e.g., element-aligned) ranges. | |
restoreSingletonInPlaceOfMultipleShards(fragments: GrowableXYZArray[], baseCount: number, singleton: IndexedXYZCollection, 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 | |
sumPolylineClipLength(clipper: Clipper, points: Point3d[]): number Static | Pass line segments from a polyline to the clipper. |
Defined in
- clipping/ClipUtils.ts Line 149
Last Updated: 14 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.