API Reference > geometry-core > CartesianGeometry > ConvexClipPlaneSet ConvexClipPlaneSet Class A ConvexClipPlaneSet is a collection of ClipPlanes, often used for bounding regions of space. Implements Clipper PolygonClipper Methods Name Description addPlaneToConvexSet(plane: undefined | ClipPlane): void Add a plane to the convex set. addZClipPlanes(invisible: boolean, zLow?: number, zHigh?: number): void Add planes for z-direction clip between low and high z levels. announceClippedArcIntervals(arc: Arc3d, announce?: AnnounceNumberNumberCurvePrimitive): boolean Find fractional parts of the arc that are within this ClipPlaneSet, and announce each as announceClippedSegmentIntervals(f0: number, f1: number, pointA: Point3d, pointB: Point3d, announce?: AnnounceNumberNumber): boolean Find the parts of the line segment (if any) that is within the convex clip volume. appendPolygonClip(xyz: GrowableXYZArray, insideFragments: GrowableXYZArray[], outsideFragments: GrowableXYZArray[], arrayCache: ): void Implement appendPolygonClip, as defined in interface PolygonClipper. classifyPointContainment(points: Point3d[], onIsOutside: boolean): ClipPlaneContainment Returns 1, 2, or 3 based on whether point array is strongly inside, ambiguous, or strongly outside respectively. clipConvexPolygonInPlace(xyz: GrowableXYZArray, work: GrowableXYZArray, tolerance: number = Geometry.smallMetricDistance): void Clip a polygon to the inside of the convex set. clipInsidePushOutside(xyz: GrowableXYZArray, outsideFragments: undefined | GrowableXYZArray[], arrayCache: ): undefined | GrowableXYZArray Clip a convex polygon to (a single) inside part and (possibly many) outside parts. clipPointsOnOrInside(points: Point3d[], inOrOn: Point3d[], out: Point3d[]): void test many points. clipUnboundedSegment(pointA: Point3d, pointB: Point3d, announce?: AnnounceNumberNumber): boolean Find the parts of the (unbounded) line segment (if any) that is within the convex clip volume. clone(result?: ConvexClipPlaneSet): ConvexClipPlaneSet Deep clone of all planes. computePlanePlanePlaneIntersections(points: undefined | Point3d[], rangeToExtend: undefined | Range3d, transform?: Transform, testContainment: boolean = true): number Compute intersections among all combinations of 3 planes in the convex set. hasIntersectionWithRay(ray: Ray3d, result?: Range1d): boolean Test if there is any intersection with a ray defined by origin and direction. isAlmostEqual(other: ConvexClipPlaneSet): boolean Return true if all members are almostEqual to corresponding members of other. isPointInside(point: Point3d): boolean Return true if point satisfies point.isPointInside for all planes isPointOnOrInside(point: Point3d, tolerance: number): boolean Return true if point satisfies point.isPointOnOrInside for all planes isSphereInside(centerPoint: Point3d, radius: number): boolean Test if a sphere is completely inside the convex set. multiplyPlanesByMatrix4d(matrix: Matrix4d, invert: boolean = true, transpose: boolean = true): boolean Multiply all the ClipPlanes DPoint4d by matrix. negateAllPlanes(): void negate all planes of the set. polygonClip(input: Point3d[] | GrowableXYZArray, output: GrowableXYZArray, work: GrowableXYZArray, planeToSkip?: ClipPlane): void Clip a polygon to the planes of the clip plane set. reloadSweptPolygon(points: Point3d[], sweepDirection: Vector3d, sideSelect: number): number * Define new planes in this ConvexClipPlaneSet so it clips to the inside of a polygon. setInvisible(invisible: boolean): void Set the invisible property on each plane of the convex set. toJSON(): ConvexClipPlaneSetProps Return an array containing all the planes of the convex set. transformInPlace(transform: Transform): void transform each plane in place. createEmpty(result?: ConvexClipPlaneSet): ConvexClipPlaneSet Static create an empty ConvexClipPlaneSet createPlanes(planes: ClipPlane[], result?: ConvexClipPlaneSet): ConvexClipPlaneSet Static create from an array of planes. createRange3dPlanes(range: Range3d, lowX: boolean = true, highX: boolean = true, lowY: boolean = true, highY: boolean = true, lowZ: boolean = true, highZ: boolean = true): ConvexClipPlaneSet Static Create new convex set using selected planes of a Range3d. createSweptPolyline(points: Point3d[], upVector: Vector3d, tiltAngle?: Angle): undefined | ConvexClipPlaneSet Static * Create a convex clip set for a polygon swept with possible tilt angle. createXYBox(x0: number, y0: number, x1: number, y1: number, result?: ConvexClipPlaneSet): ConvexClipPlaneSet Static Create a convex clip plane set that clips to x0 <= x <= x1 and y0 <= y <= y1. createXYPolyLine(points: Point3d[], interior: undefined | boolean[], leftIsInside: boolean, result?: ConvexClipPlaneSet): ConvexClipPlaneSet Static Create a convex set containing a half space for each edge between points of a polyline. createXYPolyLineInsideLeft(points: Point3d[], result?: ConvexClipPlaneSet): ConvexClipPlaneSet Static Create a convexClipPlaneSet with planes whose "inside" normal is to the left of each segment. fromJSON(json: undefined | ConvexClipPlaneSetProps, result?: ConvexClipPlaneSet): ConvexClipPlaneSet Static Extract clip planes from a json array [ clipPlane, clipPlane ]. setPlaneAndXYLoopCCW(points: GrowableXYZArray, planeOfPolygon: ClipPlane, frustum: ConvexClipPlaneSet): void Static (re)set a plane and ConvexClipPlaneSet for a convex array, such as a convex facet used for xy clip. Properties Name Type Description hugeVal StaticReadonly "1e+37" Value acting as "at infinity" for coordinates along a ray. planes Accessor ReadOnly ClipPlane[] Return the (reference to the) array of ClipPlane Defined in clipping/ConvexClipPlaneSet.ts Line 36 Last Updated: 12 June, 2024