Intersection

compute_rhino3d.Intersection.CurvePlane(curve, plane, tolerance, multiple=False)

Intersects a curve with an (infinite) plane.

Parameters:
  • curve (rhino3dm.Curve) – Curve to intersect.
  • plane (rhino3dm.Plane) – Plane to intersect with.
  • tolerance (float) – Tolerance to use during intersection.
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

A list of intersection events or None if no intersections were recorded.

Return type:

CurveIntersections

compute_rhino3d.Intersection.MeshPlane(mesh, plane, multiple=False)

Intersects a mesh with an (infinite) plane.

Parameters:
  • mesh (rhino3dm.Mesh) – Mesh to intersect.
  • plane (rhino3dm.Plane) – Plane to intersect with.
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

An array of polylines describing the intersection loops or None (Nothing in Visual Basic) if no intersections could be found.

Return type:

rhino3dm.Polyline[]

compute_rhino3d.Intersection.MeshPlane1(mesh, planes, multiple=False)

Intersects a mesh with a collection of (infinite) planes.

Parameters:
  • mesh (rhino3dm.Mesh) – Mesh to intersect.
  • planes (list[rhino3dm.Plane]) – Planes to intersect with.
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

An array of polylines describing the intersection loops or None (Nothing in Visual Basic) if no intersections could be found.

Return type:

rhino3dm.Polyline[]

compute_rhino3d.Intersection.BrepPlane(brep, plane, tolerance, multiple=False)

Intersects a Brep with an (infinite) plane.

Parameters:
  • brep (rhino3dm.Brep) – Brep to intersect.
  • plane (rhino3dm.Plane) – Plane to intersect with.
  • tolerance (float) – Tolerance to use for intersections.
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

True on success, False on failure.

Return type:

bool

compute_rhino3d.Intersection.CurveSelf(curve, tolerance, multiple=False)

Finds the places where a curve intersects itself.

Parameters:
  • curve (rhino3dm.Curve) – Curve for self-intersections.
  • tolerance (float) – Intersection tolerance. If the curve approaches itself to within tolerance, an intersection is assumed.
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

A collection of intersection events.

Return type:

CurveIntersections

compute_rhino3d.Intersection.CurveCurve(curveA, curveB, tolerance, overlapTolerance, multiple=False)

Finds the intersections between two curves.

Parameters:
  • curveA (rhino3dm.Curve) – First curve for intersection.
  • curveB (rhino3dm.Curve) – Second curve for intersection.
  • tolerance (float) – Intersection tolerance. If the curves approach each other to within tolerance, an intersection is assumed.
  • overlapTolerance (float) – The tolerance with which the curves are tested.
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

A collection of intersection events.

Return type:

CurveIntersections

compute_rhino3d.Intersection.CurveLine(curve, line, tolerance, overlapTolerance, multiple=False)

Intersects a curve and an infinite line.

Parameters:
  • curve (rhino3dm.Curve) – Curve for intersection.
  • line (Line) – Infinite line to intesect.
  • tolerance (float) – Intersection tolerance. If the curves approach each other to within tolerance, an intersection is assumed.
  • overlapTolerance (float) – The tolerance with which the curves are tested.
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

A collection of intersection events.

Return type:

CurveIntersections

compute_rhino3d.Intersection.CurveSurface(curve, surface, tolerance, overlapTolerance, multiple=False)

Intersects a curve and a surface.

Parameters:
  • curve (rhino3dm.Curve) – Curve for intersection.
  • surface (rhino3dm.Surface) – Surface for intersection.
  • tolerance (float) – Intersection tolerance. If the curve approaches the surface to within tolerance, an intersection is assumed.
  • overlapTolerance (float) – The tolerance with which the curves are tested.
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

A collection of intersection events.

Return type:

CurveIntersections

compute_rhino3d.Intersection.CurveSurface1(curve, curveDomain, surface, tolerance, overlapTolerance, multiple=False)

Intersects a (sub)curve and a surface.

Parameters:
  • curve (rhino3dm.Curve) – Curve for intersection.
  • curveDomain (rhino3dm.Interval) – Domain of surbcurve to take into consideration for Intersections.
  • surface (rhino3dm.Surface) – Surface for intersection.
  • tolerance (float) – Intersection tolerance. If the curve approaches the surface to within tolerance, an intersection is assumed.
  • overlapTolerance (float) – The tolerance with which the curves are tested.
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

A collection of intersection events.

Return type:

CurveIntersections

compute_rhino3d.Intersection.CurveBrep(curve, brep, tolerance, multiple=False)

Intersects a curve with a Brep. This function returns the 3D points of intersection and 3D overlap curves. If an error occurs while processing overlap curves, this function will return false, but it will still provide partial results.

Parameters:
  • curve (rhino3dm.Curve) – Curve for intersection.
  • brep (rhino3dm.Brep) – Brep for intersection.
  • tolerance (float) – Fitting and near miss tolerance.
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

True on success, False on failure.

Return type:

bool

compute_rhino3d.Intersection.CurveBrep1(curve, brep, tolerance, angleTolerance, multiple=False)

Intersect a curve with a Brep. This function returns the intersection parameters on the curve.

Parameters:
  • curve (rhino3dm.Curve) – Curve.
  • brep (rhino3dm.Brep) – Brep.
  • tolerance (float) – Absolute tolerance for intersections.
  • angleTolerance (float) – Angle tolerance in radians.
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

True on success, False on failure.

Return type:

bool

compute_rhino3d.Intersection.CurveBrepFace(curve, face, tolerance, multiple=False)

Intersects a curve with a Brep face.

Parameters:
  • curve (rhino3dm.Curve) – A curve.
  • face (rhino3dm.BrepFace) – A brep face.
  • tolerance (float) – Fitting and near miss tolerance.
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

True on success, False on failure.

Return type:

bool

compute_rhino3d.Intersection.SurfaceSurface(surfaceA, surfaceB, tolerance, multiple=False)

Intersects two Surfaces.

Parameters:
  • surfaceA (rhino3dm.Surface) – First Surface for intersection.
  • surfaceB (rhino3dm.Surface) – Second Surface for intersection.
  • tolerance (float) – Intersection tolerance.
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

True on success, False on failure.

Return type:

bool

compute_rhino3d.Intersection.BrepBrep(brepA, brepB, tolerance, multiple=False)

Intersects two Breps.

Parameters:
  • brepA (rhino3dm.Brep) – First Brep for intersection.
  • brepB (rhino3dm.Brep) – Second Brep for intersection.
  • tolerance (float) – Intersection tolerance.
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

True on success; False on failure.

Return type:

bool

compute_rhino3d.Intersection.BrepSurface(brep, surface, tolerance, multiple=False)

Intersects a Brep and a Surface.

Parameters:
  • brep (rhino3dm.Brep) – A brep to be intersected.
  • surface (rhino3dm.Surface) – A surface to be intersected.
  • tolerance (float) – A tolerance value.
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

True on success; False on failure.

Return type:

bool

compute_rhino3d.Intersection.MeshMeshFast(meshA, meshB, multiple=False)

This is an old overload kept for compatibility. Overlaps and near misses are ignored.

Parameters:
  • meshA (rhino3dm.Mesh) – First mesh for intersection.
  • meshB (rhino3dm.Mesh) – Second mesh for intersection.
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

An array of intersection line segments, or null.

Return type:

Line[]

compute_rhino3d.Intersection.MeshMesh(meshes, tolerance, preprocessing, sets, overlaps, textLog, cancel, progress, multiple=False)

Intersects meshes. Overlaps and perforations are provided in the output list.

Parameters:
  • meshes (list[rhino3dm.Mesh]) – The mesh input list. This cannot be null. Null entries are tolerated.
  • tolerance (float) – A tolerance value. If negative, the positive value will be used. WARNING! Good tolerance values are in the magnitude of 10^-7, or RhinoMath.SqrtEpsilon*10.
  • preprocessing (bool) – Indicates if a preprocessing step can be executed. Some groups of meshes have distances between vertices and edges that are below the tolerance indicated. In this case, this parameter allows the function to improve the mesh in order to increase likelihood of intersection success. The mesh topology might change slightly, but not the overall shape.If meshes have no distances between vertices and edges laying below the tolerance that is indicated, this parameter will do nothing.
  • sets (SetsCombinations) – Determines which sets of intersections are considered. See SetsCombinations for definitions.
  • overlaps (bool) – If true, overlaps are computed and returned.
  • textLog (FileIO.TextLog) – A text log, or null.
  • cancel (System.Threading.CancellationToken) – A cancellation token to stop the computation at a given point.
  • progress (IProgress<double>) – A progress reporter to inform the user about progress. The reported value is indicative.
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

True, if the operation succeeded, otherwise false.

Return type:

bool

compute_rhino3d.Intersection.MeshMesh1(meshes, tolerance, preprocessing, sets, textLog, cancel, progress, multiple=False)

Intersects meshes. Overlaps and perforations are provided in the output list.

Parameters:
  • meshes (list[rhino3dm.Mesh]) – The mesh input list. This cannot be null. Null entries are tolerated.
  • tolerance (float) – A tolerance value. If negative, the positive value will be used. WARNING! Good tolerance values are in the magnitude of 10^-7, or RhinoMath.SqrtEpsilon*10.
  • preprocessing (bool) – Indicates if a preprocessing step can be executed. Some groups of meshes have distances between vertices and edges that are below the tolerance indicated. In this case, this parameter allows the function to improve the mesh in order to increase likelihood of intersection success. The mesh topology might change slightly, but not the overall shape.If meshes have no distances between vertices and edges laying below the tolerance that is indicated, this parameter will do nothing.
  • sets (SetsCombinations) – Determines which sets of intersections are considered. See SetsCombinations for definitions.
  • textLog (FileIO.TextLog) – A text log, or null.
  • cancel (System.Threading.CancellationToken) – A cancellation token to stop the computation at a given point.
  • progress (IProgress<double>) – A progress reporter to inform the user about progress. The reported value is indicative.
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

True, if the operation succeeded, otherwise false.

Return type:

bool

compute_rhino3d.Intersection.MeshMeshAccurate(meshA, meshB, tolerance, multiple=False)

Intersects two meshes. Overlaps and near misses are handled. This is an old method kept for compatibility.

Parameters:
  • meshA (rhino3dm.Mesh) – First mesh for intersection.
  • meshB (rhino3dm.Mesh) – Second mesh for intersection.
  • tolerance (float) – A tolerance value. If negative, the positive value will be used. WARNING! Good tolerance values are in the magnitude of 10^-7, or RhinoMath.SqrtEpsilon*10.
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

An array of intersection and overlaps polylines.

Return type:

rhino3dm.Polyline[]

compute_rhino3d.Intersection.MeshRay(mesh, ray, multiple=False)

Finds the first intersection of a ray with a mesh.

Parameters:
  • mesh (rhino3dm.Mesh) – A mesh to intersect.
  • ray (Ray3d) – A ray to be casted.
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

>= 0.0 parameter along ray if successful. < 0.0 if no intersection found.

Return type:

float

compute_rhino3d.Intersection.MeshRay1(mesh, ray, multiple=False)

Finds the first intersection of a ray with a mesh.

Parameters:
  • mesh (rhino3dm.Mesh) – A mesh to intersect.
  • ray (Ray3d) – A ray to be casted.
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

>= 0.0 parameter along ray if successful. < 0.0 if no intersection found.

Return type:

float

compute_rhino3d.Intersection.MeshPolyline(mesh, curve, multiple=False)

Finds the intersection of a mesh and a polyline.

Parameters:
  • mesh (rhino3dm.Mesh) – A mesh to intersect.
  • curve (PolylineCurve) – A polyline curves to intersect.
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

An array of points: one for each face that was passed by the faceIds out reference.

Return type:

rhino3dm.Point3d[]

compute_rhino3d.Intersection.MeshLine(mesh, line, multiple=False)

Finds the intersection of a mesh and a line

Parameters:
  • mesh (rhino3dm.Mesh) – A mesh to intersect
  • line (Line) – The line to intersect with the mesh
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

An array of points: one for each face that was passed by the faceIds out reference.

Return type:

rhino3dm.Point3d[]

compute_rhino3d.Intersection.RayShoot(ray, geometry, maxReflections, multiple=False)

Computes point intersections that occur when shooting a ray to a collection of surfaces.

Parameters:
  • ray (Ray3d) – A ray used in intersection.
  • geometry (list[rhino3dm.GeometryBase]) – Only Surface and Brep objects are currently supported. Trims are ignored on Breps.
  • maxReflections (int) – The maximum number of reflections. This value should be any value between 1 and 1000, inclusive.
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

An array of points: one for each face that was passed by the faceIds out reference.

Return type:

rhino3dm.Point3d[]

compute_rhino3d.Intersection.ProjectPointsToMeshes(meshes, points, direction, tolerance, multiple=False)

Projects points onto meshes.

Parameters:
  • meshes (list[rhino3dm.Mesh]) – the meshes to project on to.
  • points (list[rhino3dm.Point3d]) – the points to project.
  • direction (rhino3dm.Vector3d) – the direction to project.
  • tolerance (float) – Projection tolerances used for culling close points and for line-mesh intersection.
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

Array of projected points, or None in case of any error or invalid input.

Return type:

rhino3dm.Point3d[]

compute_rhino3d.Intersection.ProjectPointsToMeshesEx(meshes, points, direction, tolerance, multiple=False)

Projects points onto meshes.

Parameters:
  • meshes (list[rhino3dm.Mesh]) – the meshes to project on to.
  • points (list[rhino3dm.Point3d]) – the points to project.
  • direction (rhino3dm.Vector3d) – the direction to project.
  • tolerance (float) – Projection tolerances used for culling close points and for line-mesh intersection.
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

Array of projected points, or None in case of any error or invalid input.

Return type:

rhino3dm.Point3d[]

compute_rhino3d.Intersection.ProjectPointsToBreps(breps, points, direction, tolerance, multiple=False)

Projects points onto breps.

Parameters:
  • breps (list[rhino3dm.Brep]) – The breps projection targets.
  • points (list[rhino3dm.Point3d]) – The points to project.
  • direction (rhino3dm.Vector3d) – The direction to project.
  • tolerance (float) – The tolerance used for intersections.
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

Array of projected points, or None in case of any error or invalid input.

Return type:

rhino3dm.Point3d[]

compute_rhino3d.Intersection.ProjectPointsToBrepsEx(breps, points, direction, tolerance, multiple=False)

Projects points onto breps.

Parameters:
  • breps (list[rhino3dm.Brep]) – The breps projection targets.
  • points (list[rhino3dm.Point3d]) – The points to project.
  • direction (rhino3dm.Vector3d) – The direction to project.
  • tolerance (float) – The tolerance used for intersections.
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

Array of projected points, or None in case of any error or invalid input.

Return type:

rhino3dm.Point3d[]