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: numberGeometry.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.code indicates where the intersection lies with respect to the polygon.
  • d.a is the ray intersection parameter. If d.a >= 0, the ray intersects the plane of the polygon.
  • d.edgeIndex and d.edgeParam specify the location of the closest point on the polygon to the intersection, within distTol.
Parameter Type Description
polygon IndexedXYZCollection | Point3d[] points of the polygon, closure point optional
ray Ray3d infinite line to intersect, as a ray
tolerance number optional distance tolerance to determine point-vertex and point-edge coincidence.
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.code indicates where the intersection lies with respect to the polygon.
  • d.a is the ray intersection parameter. If d.a >= 0, the ray intersects the plane of the polygon.
  • d.edgeIndex and d.edgeParam specify the location of the closest point on the polygon to the intersection, within distTol.

Defined in

Last Updated: 21 November, 2024