API Reference > geometry-core > CartesianGeometry > ClipPlane ClipPlane Class A ClipPlane is a single plane represented as An inward unit normal (u,v,w) A signedDistance Hence The halfspace function evaluation for "point" [x,y,z,] is: ([x,y,z] DOT (u,v,w)l - signedDistance) POSITIVE values of the halfspace function are "inside" ZERO value of the halfspace function is "on" NEGATIVE value of the halfspace function is "outside" A representative point on the plane is (signedDistance*u, signedDistance * v, signedDistance *w) Given a point and inward normal, the signedDistance is (point DOT normal) Implements Clipper PlaneAltitudeEvaluator Methods Name Description altitude(point: Point3d): number Evaluate the distance from the plane to a point in space, i.e. altitudeXYZ(x: number, y: number, z: number): number Evaluate the distance from the plane to a point in space with point given as x,y,z, i.e. announceClippedArcIntervals(arc: Arc3d, announce?: AnnounceNumberNumberCurvePrimitive): boolean Announce fractional intervals of arc clip. announceClippedSegmentIntervals(f0: number, f1: number, pointA: Point3d, pointB: Point3d, announce?: (fraction0: number, fraction1: number) => void): boolean announce the interval (if any) where a line is within the clip plane half space. appendIntersectionRadians(arc: Arc3d, intersectionRadians: GrowableFloat64Array): void Compute intersections of an (UNBOUNDED) arc with the plane. clipConvexPolygonInPlace(xyz: GrowableXYZArray, work: GrowableXYZArray, inside: boolean = true, tolerance: number = Geometry.smallMetricDistance): number Clip a polygon to the inside or outside of the plane. clone(): ClipPlane return a cloned plane cloneNegated(): ClipPlane return Return a cloned plane with coordinate data negated. convexPolygonClipInPlace(xyz: Point3d[], work: Point3d[], tolerance: number = Geometry.smallMetricDistance): void Clip a polygon, returning the clip result in the same object. Deprecated convexPolygonSplitInsideOutside(xyz: Point3d[], xyzIn: Point3d[], xyzOut: Point3d[], altitudeRange: Range1d): void Split a (convex) polygon into 2 parts. Deprecated convexPolygonSplitInsideOutsideGrowableArrays(xyz: GrowableXYZArray, xyzIn: GrowableXYZArray, xyzOut: GrowableXYZArray, altitudeRange: Range1d): void Split a (convex) polygon into 2 parts. Deprecated dotProductPlaneNormalPoint(point: Point3d): number Return the dot product of the plane normal with the point (treating the point xyz as a vector, and NOT using the plane's distanceFromOrigin). dotProductVector(vector: Vector3d): number Return the dot product of the plane normal with the vector (NOT using the plane's distanceFromOrigin). Deprecated evaluatePoint(point: Point3d): number Evaluate the distance from the plane to a point in space, i.e. Deprecated getBoundedSegmentSimpleIntersection(pointA: Point3d, pointB: Point3d): number | undefined * Compute intersection of (unbounded) segment with the plane. getFrame(): Transform Return a coordinate frame with getPlane3d(): Plane3dByOriginAndUnitNormal Return the Plane3d form of the plane. getPlane4d(): Point4d Return the Point4d d form of the plane. intersectRange(range: Range3d, addClosurePoint: boolean = false): GrowableXYZArray | undefined Return the intersection of the plane with a range cube. isAlmostEqual(other: ClipPlane): boolean Return true if all members are almostEqual to corresponding members of other. isPointInside(point: Point3d, tolerance: number = Geometry.smallMetricDistance): boolean Return true if spacePoint is strictly inside the halfspace, with tolerance applied to "on". isPointOn(point: Point3d, tolerance: number = Geometry.smallMetricDistance): boolean Return true if spacePoint is strictly on the plane, within tolerance isPointOnOrInside(spacePoint: Point3d, tolerance: number = Geometry.smallMetricDistance): boolean Return true if spacePoint is inside or on the plane, with tolerance applied to "on". multiplyPlaneByMatrix4d(matrix: Matrix4d, invert: boolean = true, transpose: boolean = true): boolean Multiply the ClipPlane's DPoint4d by matrix. negateInPlace(): void reverse the sign of all coefficients, so outside and inside reverse offsetDistance(offset: number): void Move the plane INWARD by given distance polygonCrossings(xyz: Point3d[], crossings: Point3d[]): void Return an array containing Deprecated setFlags(invisible: boolean, interior: boolean): void Set both the invisible and interior flags. setInvisible(invisible: boolean): void Set the invisible flag. setPlane4d(plane: Point4d): void Set the plane from DPoint4d style plane. toJSON(): any return a json object of the form transformInPlace(transform: Transform): boolean Apply transform to the origin. velocity(vector: Vector3d): number Return the dot product of the plane normal with the vector (NOT using the plane's distanceFromOrigin). velocityXYZ(x: number, y: number, z: number): number Return the dot product of the plane normal with the x,yz, vector components (NOT using the plane's distanceFromOrigin). weightedAltitude(point: Point4d): number Evaluate the altitude in weighted space, i.e. createEdgeAndUpVector(point0: Point3d, point1: Point3d, upVector: Vector3d, tiltAngle?: Angle, result?: ClipPlane): ClipPlane | undefined Static Create a plane defined by two points, an up vector, and a tilt angle relative to the up vector. createEdgeXY(point0: Point3d, point1: Point3d, result?: ClipPlane): ClipPlane | undefined Static Create a plane perpendicular to the edge between the xy parts of point0 and point1 createNormalAndDistance(normal: Vector3d, distance: number, invisible: boolean = false, interior: boolean = false, result?: ClipPlane): ClipPlane | undefined Static * Create a ClipPlane with direct normal and signedDistance. createNormalAndPoint(normal: Vector3d, point: Point3d, invisible: boolean = false, interior: boolean = false, result?: ClipPlane): ClipPlane | undefined Static Create a ClipPlane createNormalAndPointXYZXYZ(normalX: number, normalY: number, normalZ: number, originX: number, originY: number, originZ: number, invisible: boolean = false, interior: boolean = false, result?: ClipPlane): ClipPlane | undefined Static Create a ClipPlane createPlane(plane: Plane3dByOriginAndUnitNormal, invisible: boolean = false, interior: boolean = false, result?: ClipPlane): ClipPlane Static Create a ClipPlane from Plane3dByOriginAndUnitNormal. fromJSON(json: any, result?: ClipPlane): ClipPlane | undefined Static parse json object to ClipPlane instance intersectRangeConvexPolygonInPlace(range: Range3d, xyz: GrowableXYZArray): undefined | GrowableXYZArray Static Return the intersection of the plane with a range cube. Deprecated Properties Name Type Description distance Accessor ReadOnly number Return the stored distanceFromOrigin property. interior Accessor ReadOnly boolean Return the "interior" property bit invisible Accessor ReadOnly boolean Return the "invisible" property bit. inwardNormalRef Accessor ReadOnly Vector3d Return the stored inward normal property. Defined in core/geometry/src/clipping/ClipPlane.ts Line 40 Last Updated: 13 June, 2024