intersectRay3d MethodStatic
Compute the intersection of a line (parameterized as a ray) with the plane of this polygon.
intersectRay3d(polygon: IndexedXYZCollection | Point3d[], ray: Ray3d, tolerance: number | [number, number] = Geometry.smallMetricDistance, result?: PolygonLocationDetail): PolygonLocationDetail
@returns details d of the line-plane intersection d.point:
d.isValid()returns true if and only if the line intersects the plane.d.codeindicates where the intersection lies with respect to the polygon.d.ais the ray intersection parameter. Ifd.a>= 0, the ray intersects the plane of the polygon.d.edgeIndexandd.edgeParamspecify the location of the closest point on the polygon to the intersection, withindistTol.
| Parameter | Type | Description |
|---|---|---|
| polygon | IndexedXYZCollection | Point3d[] | points of the polygon, closure point optional |
| ray | Ray3d | infinite line to intersect, as a ray |
| tolerance | number | [number, number] | optional tolerance(s) to determine point-vertex and point-edge coincidence. A single number is interpreted as distance tolerance. If an array is given, the first number is interpreted as distance tolerance; the second, as parametric tolerance. Default values are smallMetricDistance for distance tolerance and 0.0 for parameter tolerance. |
| result | PolygonLocationDetail | optional pre-allocated object to fill and return |
Returns - PolygonLocationDetail
details d of the line-plane intersection d.point:
d.isValid()returns true if and only if the line intersects the plane.d.codeindicates where the intersection lies with respect to the polygon.d.ais the ray intersection parameter. Ifd.a>= 0, the ray intersects the plane of the polygon.d.edgeIndexandd.edgeParamspecify the location of the closest point on the polygon to the intersection, withindistTol.
Defined in
- geometry3d/PolygonOps.ts Line 1215
Last Updated: 24 October, 2025
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.