Intersection

class rhino3dm.Intersection
static LineLine(lineA, lineB)

[todo] add documentation

static LineLine(lineA, lineB, tolerance, finiteSegments)

[todo] add documentation

static LinePlane(line, plane)

Intersects a line and a plane. This function only returns True if the intersection result is a single point (i.e. if the line is coincident with the plane then no intersection is assumed).

Parameters:
Returns:

tuple (bool, float)

  • True on success, False on failure.
  • Parameter on line where intersection occurs. If the parameter is not within the {0, 1} Interval then the finite segment does not intersect the plane.

Return type:

(bool, float)

static PlanePlane(planeA, planeB)

Intersects two planes and return the intersection line. If the planes are parallel or coincident, no intersection is assumed.

Parameters:
Returns:

tuple (bool, Line)

  • True on success, False on failure.
  • If this function returns true, the intersectionLine parameter will return the line where the planes intersect.

Return type:

(bool, Line)

static PlanePlanePlane(planeA, planeB, planeC)

Intersects three planes to find the single point they all share.

Parameters:
Returns:

tuple (bool, rhino3dm.Point3d)

  • True on success, False on failure. If at least two out of the three planes are parallel or coincident, failure is assumed.
  • Point where all three planes converge.

Return type:

(bool, rhino3dm.Point3d)

static PlaneSphere(plane, sphere)

Intersects a plane with a sphere using exact calculations.

Parameters:
Returns:

tuple (PlaneSphereIntersection, Circle)

  • If is returned, the intersectionCircle has a radius of zero and the center point is the point on the plane closest to the sphere.
  • Intersection result.

Return type:

(PlaneSphereIntersection, Circle)

static LineCircle(line, circle)

[todo] add documentation

static LineSphere(line, sphere)

[todo] add documentation

static LineCylinder(line, cylinder)

[todo] add documentation

static SphereSphere(sphereA, sphereB)

Intersects two spheres using exact calculations.

Parameters:
Returns:

tuple (SphereSphereIntersection, Circle)

  • The intersection type.
  • If intersection is a point, then that point will be the center, radius 0.

Return type:

(SphereSphereIntersection, Circle)

static LineBox(line, box, tolerance)

Intersects an infinite line and an axis aligned bounding box.

Parameters:
  • box (rhino3dm.BoundingBox) – BoundingBox to intersect.
  • line (Line) – Line for intersection.
  • tolerance (float) – If tolerance > 0.0, then the intersection is performed against a box that has each side moved out by tolerance.
Returns:

tuple (bool, rhino3dm.Interval)

  • True if the line intersects the box, False if no intersection occurs.
  • The chord from line.PointAt(lineParameters.T0) to line.PointAt(lineParameters.T1) is the intersection.

Return type:

(bool, rhino3dm.Interval)