Intersects two arcs using exact calculations.
Parameters:| arcA (Arc) | First arc to intersect. |
| arcB (Arc) | Second arc to intersect. |
| intersectionPoint1 (out Point3d) | First intersection point. |
| intersectionPoint2 (out Point3d) | Second intersection point. |
Returns: The intersection type.
Intersects two Breps.
Parameters:| brepA (Brep) | First Brep for intersection. |
| brepB (Brep) | Second Brep for intersection. |
| tolerance (double) | Intersection tolerance. |
| joinCurves (bool) | If true, join the resulting curves where possible. |
| intersectionCurves (out Curve[]) | The intersection curves will be returned here. |
| intersectionPoints (out Point3d[]) | The intersection points will be returned here. |
Returns: true if the operation was success, false otherwise. Check the output arrays to determine how the input intersects.
Intersects two Breps.
Parameters:| brepA (Brep) | First Brep for intersection. |
| brepB (Brep) | Second Brep for intersection. |
| tolerance (double) | Intersection tolerance. |
| intersectionCurves (out Curve[]) | The intersection curves will be returned here. |
| intersectionPoints (out Point3d[]) | The intersection points will be returned here. |
Returns: true if the operation was success, false otherwise. Check the output arrays to determine how the input intersects.
Intersects a Brep with an (infinite) plane.
Parameters:| brep (Brep) | Brep to intersect. |
| plane (Plane) | Plane to intersect with. |
| tolerance (double) | Tolerance to use for intersections. |
| joinCurves (bool) | If true, join the resulting curves where possible. |
| intersectionCurves (out Curve[]) | The intersection curves will be returned here. |
| intersectionPoints (out Point3d[]) | The intersection points will be returned here. |
Returns: true on success, false on failure.
Intersects a Brep with an (infinite) plane.
Parameters:| brep (Brep) | Brep to intersect. |
| plane (Plane) | Plane to intersect with. |
| tolerance (double) | Tolerance to use for intersections. |
| intersectionCurves (out Curve[]) | The intersection curves will be returned here. |
| intersectionPoints (out Point3d[]) | The intersection points will be returned here. |
Returns: true on success, false on failure.
Intersects a Brep and a Surface.
Parameters:| brep (Brep) | A brep to be intersected. |
| surface (Surface) | A surface to be intersected. |
| tolerance (double) | A tolerance value. |
| joinCurves (bool) | If true, join the resulting curves where possible. |
| intersectionCurves (out Curve[]) | The intersection curves array argument. This out reference is assigned during the call. |
| intersectionPoints (out Point3d[]) | The intersection points array argument. This out reference is assigned during the call. |
Returns: true if the operation was success, false otherwise. Check the output arrays to determine how the input intersects.
Intersects a Brep and a Surface.
Parameters:| brep (Brep) | A brep to be intersected. |
| surface (Surface) | A surface to be intersected. |
| tolerance (double) | A tolerance value. |
| intersectionCurves (out Curve[]) | The intersection curves array argument. This out reference is assigned during the call. |
| intersectionPoints (out Point3d[]) | The intersection points array argument. This out reference is assigned during the call. |
Returns: true if the operation was success, false otherwise. Check the output arrays to determine how the input intersects.
Intersects two circles using exact calculations.
Parameters:| circleA (Circle) | First circle to intersect. |
| circleB (Circle) | Second circle to intersect. |
| intersectionPoint1 (out Point3d) | First intersection point. |
| intersectionPoint2 (out Point3d) | Second intersection point. |
Returns: The intersection type.
Intersect a curve with a Brep. This function returns the intersection parameters on the curve.
Parameters:| curve (Curve) | Curve. |
| brep (Brep) | Brep. |
| tolerance (double) | Absolute tolerance for intersections. |
| angleTolerance (double) | Angle tolerance in radians. |
| t (out double[]) | Curve parameters at intersections. |
Returns: True on success, false on failure.
Intersects a curve with a Brep. This function returns the 3D points of intersection, curve parameters at the intersection locations, 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 (Curve) | Curve for intersection. |
| brep (Brep) | Brep for intersection. |
| tolerance (double) | Fitting and near miss tolerance. |
| overlapCurves (out Curve[]) | The overlap curves will be returned here. |
| intersectionPoints (out Point3d[]) | The intersection points will be returned here. |
| curveParameters (out double[]) | The intersection curve parameters will be returned here. |
Returns: true on success, false on failure.
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 (Curve) | Curve for intersection. |
| brep (Brep) | Brep for intersection. |
| tolerance (double) | Fitting and near miss tolerance. |
| overlapCurves (out Curve[]) | The overlap curves will be returned here. |
| intersectionPoints (out Point3d[]) | The intersection points will be returned here. |
Returns: true on success, false on failure.
Intersects a curve with a Brep face.
Parameters:| curve (Curve) | A curve. |
| face (BrepFace) | A brep face. |
| tolerance (double) | Fitting and near miss tolerance. |
| overlapCurves (out Curve[]) | A overlap curves array argument. This out reference is assigned during the call. |
| intersectionPoints (out Point3d[]) | A points array argument. This out reference is assigned during the call. |
Returns: true on success, false on failure.
Finds the intersections between two curves.
Parameters:| curveA (Curve) | First curve for intersection. |
| curveB (Curve) | Second curve for intersection. |
| tolerance (double) | Intersection tolerance. If the curves approach each other to within tolerance, an intersection is assumed. |
| overlapTolerance (double) | The tolerance with which the curves are tested. |
Returns: A collection of intersection events.
Finds the intersections between two curves.
Parameters:| curveA (Curve) | First curve for intersection. |
| curveB (Curve) | Second curve for intersection. |
| tolerance (double) | Intersection tolerance. If the curves approach each other to within tolerance, an intersection is assumed. |
| overlapTolerance (double) | The tolerance with which the curves are tested. |
| invalidIndices (out int[]) | The indices in the resulting CurveIntersections collection that are invalid. |
| textLog (out TextLog) | A text log that contains tails about the invalid intersection events. |
Returns: A collection of intersection events.
Intersects a curve and an infinite line.
Parameters:| curve (Curve) | Curve for intersection. |
| line (Line) | Infinite line to intersect. |
| tolerance (double) | Intersection tolerance. If the curves approach each other to within tolerance, an intersection is assumed. |
| overlapTolerance (double) | The tolerance with which the curves are tested. |
Returns: A collection of intersection events.
Intersects a curve with an (infinite) plane.
Parameters:| curve (Curve) | Curve to intersect. |
| plane (Plane) | Plane to intersect with. |
| tolerance (double) | Tolerance to use during intersection. |
Returns: A list of intersection events or null if no intersections were recorded.
Finds the places where a curve intersects itself.
Parameters:| curve (Curve) | Curve for self-intersections. |
| tolerance (double) | Intersection tolerance. If the curve approaches itself to within tolerance, an intersection is assumed. |
Returns: A collection of intersection events.
Intersects a sub-curve and a surface.
Parameters:| curve (Curve) | Curve for intersection. |
| curveDomain (Interval) | Domain of sub-curve to take into consideration for Intersections. |
| surface (Surface) | Surface for intersection. |
| tolerance (double) | Intersection tolerance. If the curve approaches the surface to within tolerance, an intersection is assumed. |
| overlapTolerance (double) | The tolerance with which the curves are tested. |
Returns: A collection of intersection events.
Intersects a curve and a surface.
Parameters:| curve (Curve) | Curve for intersection. |
| surface (Surface) | Surface for intersection. |
| tolerance (double) | Intersection tolerance. If the curve approaches the surface to within tolerance, an intersection is assumed. |
| overlapTolerance (double) | The tolerance with which the curves are tested. |
Returns: A collection of intersection events.
Intersects a sub-curve and a surface.
Parameters:| curve (Curve) | Curve for intersection. |
| curveDomain (Interval) | Domain of sub-curve to take into consideration for Intersections. |
| surface (Surface) | Surface for intersection. |
| tolerance (double) | Intersection tolerance. If the curve approaches the surface to within tolerance, an intersection is assumed. |
| overlapTolerance (double) | The tolerance with which the curves are tested. |
| invalidIndices (out int[]) | The indices in the resulting CurveIntersections collection that are invalid. |
| textLog (out TextLog) | A text log that contains tails about the invalid intersection events. |
Returns: A collection of intersection events.
Intersects a curve and a surface.
Parameters:| curve (Curve) | Curve for intersection. |
| surface (Surface) | Surface for intersection. |
| tolerance (double) | Intersection tolerance. If the curve approaches the surface to within tolerance, an intersection is assumed. |
| overlapTolerance (double) | The tolerance with which the curves are tested. |
| invalidIndices (out int[]) | The indices in the resulting CurveIntersections collection that are invalid. |
| textLog (out TextLog) | A text log that contains tails about the invalid intersection events. |
Returns: A collection of intersection events.
Intersects geometry with an (infinite) plane.
Parameters:| geometry (GeometryBase) | GeometryBase object to intersect. |
| plane (Plane) | Plane to intersect with. |
| tolerance (double) | Tolerance to use for intersections. |
| joinCurves (bool) | If true, join the resulting curves of each object where possible, for every geometry type. Curves of different objects, such as the objects of an instance definition, are never joined. |
| doc (RhinoDoc) | The document that has the instance definition when geometry is an InstanceReferenceGeometry. Can be null for other geometry. |
| intersectionCurves (out Curve[]) | The intersection curves will be returned here. |
| intersectionPoints (out Point3d[]) | The intersection points will be returned here. |
Returns: true if the intersection was computed, including when the plane misses the geometry. For an InstanceReferenceGeometry, true if it was computed for any object in the instance definition. false if the plane is not valid, tolerance is negative or not a number, the geometry type is not supported or the intersection failed. Curves and points found before a failure are still returned.
Intersects an infinite line and an axis aligned bounding box.
Parameters:| line (Line) | Line for intersection. |
| box (BoundingBox) | BoundingBox to intersect. |
| tolerance (double) | If tolerance > 0.0, then the intersection is performed against a box that has each side moved out by tolerance. |
| lineParameters (out Interval) | The chord from line.PointAt(lineParameters.T0) to line.PointAt(lineParameters.T1) is the intersection. |
Returns: true if the line intersects the box, false if no intersection occurs.
Intersects an infinite line with a box volume.
Parameters:| line (Line) | Line for intersection. |
| box (Box) | Box to intersect. |
| tolerance (double) | If tolerance > 0.0, then the intersection is performed against a box that has each side moved out by tolerance. |
| lineParameters (out Interval) | The chord from line.PointAt(lineParameters.T0) to line.PointAt(lineParameters.T1) is the intersection. |
Returns: true if the line intersects the box, false if no intersection occurs.
Intersects a line with a circle using exact calculations.
Parameters:| line (Line) | Line for intersection. |
| circle (Circle) | Circle for intersection. |
| t1 (out double) | Parameter on line for first intersection. |
| point1 (out Point3d) | Point on circle closest to first intersection. |
| t2 (out double) | Parameter on line for second intersection. |
| point2 (out Point3d) | Point on circle closest to second intersection. |
Intersects a line with a cylinder using exact calculations.
Parameters:| line (Line) | Line for intersection. |
| cylinder (Cylinder) | Cylinder for intersection. |
| intersectionPoint1 (out Point3d) | First intersection point. |
| intersectionPoint2 (out Point3d) | Second intersection point. |
Returns: If None is returned, the first point is the point on the line closest to the cylinder and the second point is the point on the cylinder closest to the line.
If LineCylinderIntersection.Single is returned, the first point is the point on the line and the second point is the same point on the cylinder.
Intersects two lines.
Parameters:| lineA (Line) | First line for intersection. |
| lineB (Line) | Second line for intersection. |
| a (out double) | Parameter on lineA that is closest to LineB. The shortest distance between the lines is the chord from lineA.PointAt(a) to lineB.PointAt(b) |
| b (out double) | Parameter on lineB that is closest to LineA. The shortest distance between the lines is the chord from lineA.PointAt(a) to lineB.PointAt(b) |
| tolerance (double) | If tolerance > 0.0, then an intersection is reported only if the distance between the points is <= tolerance. If tolerance <= 0.0, then the closest point between the lines is reported. |
| finiteSegments (bool) | If true, the input lines are treated as finite segments. If false, the input lines are treated as infinite lines. |
Returns: true if a closest point can be calculated and the result passes the tolerance parameter test; otherwise false.
Find the unique closest-points pair between two infinite lines, if it exists.
Parameters:| lineA (Line) | First line. |
| lineB (Line) | Second line. |
| a (out double) | Parameter on lineA that is closest to lineB. |
| b (out double) | Parameter on lineB that is closest to lineA. The shortest distance between the lines is the chord from lineA.PointAt(a) to lineB.PointAt(b) |
Returns: true if points are found and false if the lines are numerically parallel. Numerically parallel means the 2x2 matrix:
+AoA -AoB
-AoB +BoB
is numerically singular, where A = (lineA.To - lineA.From) and B = (lineB.To-lineB.From).
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:| line (Line) | Line for intersection. |
| plane (Plane) | Plane to intersect. |
| lineParameter (out double) | 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. |
Returns: true on success, false on failure.
Intersects a line with a sphere using exact calculations.
Parameters:| line (Line) | Line for intersection. |
| sphere (Sphere) | Sphere for intersection. |
| intersectionPoint1 (out Point3d) | First intersection point. |
| intersectionPoint2 (out Point3d) | Second intersection point. |
Returns: If
LineSphereIntersection.None is returned, the first point is the point on the line closest to the sphere and the second point is the point on the sphere closest to the line. If
LineSphereIntersection.Single is returned, the first point is the point on the line and the second point is the same point on the sphere.
public static Point3d[] MeshLine(Mesh mesh
, Line line
, out int[] faceIds
) Finds the intersections of a mesh and a line. The points are not necessarily sorted.
Parameters:| mesh (Mesh) | A mesh to intersect |
| line (Line) | The line to intersect with the mesh |
| faceIds (out int[]) | The indices of the intersecting faces. This out reference is assigned during the call. Empty if nothing is found. |
Returns: An array of points: one for each face that was passed by the faceIds out reference. Empty if no items are found.
Finds the intersections of a mesh and a line.
Parameters:| mesh (Mesh) | A mesh to intersect |
| line (Line) | The line to intersect with the mesh |
Returns: An array of points: one for each face that was passed by the faceIds out reference. Empty if no items are found.
public static Point3d[] MeshLineSorted(Mesh mesh
, Line line
, out int[] faceIds
) Finds the intersections of a mesh and a line. Points are sorted along the line.
Parameters:| mesh (Mesh) | A mesh to intersect |
| line (Line) | The line to intersect with the mesh |
| faceIds (out int[]) | The indices of the intersecting faces. This out reference is assigned during the call. Empty if nothing is found. |
Returns: An array of points: one for each face that was passed by the faceIds out reference. Empty if no items are found.
Intersects meshes. Overlaps and perforations are provided in the output list.
Tolerance can be specified.
We suggest to use the document tolerance multiplied by MeshIntersectionsTolerancesCoefficient.
Parameters:| meshes (IEnumerable<Mesh>) | The mesh input list. This cannot be null. Null entries are tolerated. |
| tolerance (double) | 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. |
| intersections (out Polyline[]) | Returns the intersections. |
| overlapsPolylines (bool) | If true, overlaps are computed and returned. |
| overlapsPolylinesResult (out Polyline[]) | If requested, overlaps are returned here. |
| overlapsMesh (bool) | If true, an overlaps mesh is computed and returned. |
| overlapsMeshResult (out Mesh) | If requested, overlaps are returned here. |
| textLog (TextLog) | A text log, or null. |
| cancel (CancellationToken) | A cancellation token to stop the computation at a given point. |
| progress (IProgress<double>) | A progress reporter to inform the user about progress, or null. The reported value is indicative. |
Returns: True, if the operation succeeded, otherwise false.
public static Polyline[] MeshMeshAccurate(Mesh meshA
, Mesh meshB
, double tolerance
) Intersects two meshes. Overlaps and near misses are handled. This is an old method kept for compatibility.
Tolerance can be specified.
We suggest to use the document tolerance multiplied by MeshIntersectionsTolerancesCoefficient.
Parameters:| meshA (Mesh) | First mesh for intersection. |
| meshB (Mesh) | Second mesh for intersection. |
| tolerance (double) | 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. |
Returns: An array of intersection and overlaps polylines.
public static Line[] MeshMeshFast(Mesh meshA
, Mesh meshB
) Fast intersection of two meshes, returned as loose line segments rather than assembled polylines.
Vertices are read in double precision when the mesh has them. Faces that cross or touch within tolerance produce segments; coplanar overlaps are ignored. Use MeshMesh(IEnumerable<Mesh>, double, Polyline[], bool, Polyline[], bool, Mesh, TextLog, CancellationToken, IProgress<double>) when overlaps or joined curves are needed, and MeshMeshPredicate(IEnumerable<Mesh>, IEnumerable<Mesh>, double, bool, TextLog, CancellationToken) when only the yes/no answer is needed.
Parameters:| meshA (Mesh) | First mesh for intersection. |
| meshB (Mesh) | Second mesh for intersection. |
Returns: An array of intersection line segments, empty if no intersections were found.
Parameters:| meshes (IEnumerable<Mesh>) | The mesh input list. This cannot be null. Null entries are tolerated. |
| tolerance (double) | 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. |
| pairs (out int[]) | An array containing pairs of meshes that intersect. |
| textLog (TextLog) | A text log, or null. |
Returns: True, if meshes intersect, otherwise false. False is also returned on error, but textLog will start with Error: and contain the error.
Determines which meshes intersect, and reports one intersecting face couple for each pair found. No geometry is computed: each pair of meshes is tested only until its first hit.
Parameters:| meshesA (IEnumerable<Mesh>) | The first mesh list. This cannot be null. Null entries are skipped but keep their index. |
| meshesB (IEnumerable<Mesh>) | A second mesh list, or null. When null, every pair within meshesA is tested once; otherwise every mesh of meshesA is tested against every mesh of meshesB. Null entries are skipped but keep their index. |
| tolerance (double) | 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. |
| fast (bool) | True uses the fast intersector behind MeshMeshFast(Mesh, Mesh): faces that cross or touch within tolerance count, coplanar overlap without a crossing does not. False uses the accurate intersector, which also reports coplanar overlap and costs about as much as MeshMeshFast(Mesh, Mesh). |
| intersectingPairs (out IntersectingMeshPair[]) | The pairs of meshes that intersect, each with the first intersecting faces found. IntersectingMeshPair.MeshIndexA indexes meshesA and IntersectingMeshPair.MeshIndexB indexes meshesB, or both index meshesA with MeshIndexA less than MeshIndexB. Empty when nothing intersects. |
| textLog (TextLog) | A text log, or null. |
| cancel (CancellationToken) | A cancellation token to stop the computation at a given point. |
Returns: True if any pair intersects, otherwise false. False is also returned on error or cancellation.
Determines whether any of the meshes intersect. No geometry is computed, and the search stops at the first pair of meshes that intersect: this is the quickest answer when the intersecting pairs are not needed.
Parameters:| meshesA (IEnumerable<Mesh>) | The first mesh list. This cannot be null. Null entries are skipped. |
| meshesB (IEnumerable<Mesh>) | A second mesh list, or null. When null, every pair within meshesA is tested once; otherwise every mesh of meshesA is tested against every mesh of meshesB. Null entries are skipped. |
| tolerance (double) | 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. |
| fast (bool) | True uses the fast intersector behind MeshMeshFast(Mesh, Mesh): faces that cross or touch within tolerance count, coplanar overlap without a crossing does not. False uses the accurate intersector, which also reports coplanar overlap and costs about as much as MeshMeshFast(Mesh, Mesh). |
| textLog (TextLog) | A text log, or null. |
| cancel (CancellationToken) | A cancellation token to stop the computation at a given point. |
Returns: True if any pair intersects, otherwise false. False is also returned on error or cancellation.
public static bool MeshMeshTwoSets(IEnumerable<Mesh> setA
, IEnumerable<Mesh> setB
, double tolerance
, out Polyline[] intersections
, bool overlapsPolylines
, out Polyline[] overlapsPolylinesResult
, bool overlapsMesh
, out Mesh overlapsMeshResult
, TextLog textLog
, CancellationToken cancel
, IProgress<double> progress
) Intersects two sets of meshes with each other. Overlaps and perforations are provided in the output list.
Only events between a mesh of the first set and a mesh of the second set are computed. Intersections among meshes of the same set, and self-intersections within a single mesh, are ignored.
Tolerance can be specified.
We suggest to use the document tolerance multiplied by MeshIntersectionsTolerancesCoefficient.
Parameters:| setA (IEnumerable<Mesh>) | The first mesh input list. This cannot be null. Null entries are tolerated. |
| setB (IEnumerable<Mesh>) | The second mesh input list. This cannot be null. Null entries are tolerated. |
| tolerance (double) | 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. |
| intersections (out Polyline[]) | Returns the intersections. |
| overlapsPolylines (bool) | If true, overlaps are computed and returned. |
| overlapsPolylinesResult (out Polyline[]) | If requested, overlaps are returned here. |
| overlapsMesh (bool) | If true, an overlaps mesh is computed and returned. |
| overlapsMeshResult (out Mesh) | If requested, overlaps are returned here. |
| textLog (TextLog) | A text log, or null. |
| cancel (CancellationToken) | A cancellation token to stop the computation at a given point. |
| progress (IProgress<double>) | A progress reporter to inform the user about progress, or null. The reported value is indicative. |
Returns: True, if the operation succeeded, otherwise false.
Returns: An array of polylines describing the intersection loops, or null if no intersections could be found.
Parameters:| mesh (Mesh) | Mesh to intersect. |
| cache (MeshIntersectionCache) | Intersection cache for the mesh. |
| planes (IEnumerable<Plane>) | Planes to intersect with. |
| tolerance (double) | Intersection tolerance. |
| overlaps (bool) | If true, overlaps are computed and will be part of the output. |
Returns: An array of polylines describing the intersection loops, or null if no intersections could be found.
Intersects a mesh with a collection of infinite planes, providing both overlaps and perforations.
Tolerance can be specified.
We suggest to use the document tolerance multiplied by MeshIntersectionsTolerancesCoefficient.
Returns: An array of polylines describing the intersection loops, or null if no intersections could be found.
Parameters:| mesh (Mesh) | Mesh to intersect. |
| cache (MeshIntersectionCache) | Intersection cache for mesh. |
| plane (Plane) | Plane to intersect with. |
| tolerance (double) | Intersection tolerance. |
| overlaps (bool) | If true, overlaps are computed and will be part of the output. |
Returns: An array of polylines describing the intersection loops, or null if no intersections could be found.
Returns: An array of polylines describing the intersection loops, or null if no intersections could be found.
Parameters:| mesh (Mesh) | Mesh to intersect. |
| plane (Plane) | Plane to intersect with. |
Returns: An array of polylines describing the intersection loops, or null if no intersections could be found.
Finds the intersection of a mesh and a polyline. Starting from version 7, points are always sorted along the polyline.
Parameters:| mesh (Mesh) | A mesh to intersect. |
| curve (PolylineCurve) | A polyline curves to intersect. |
| faceIds (out int[]) | The indices of the intersecting faces. This out reference is assigned during the call. |
Returns: An array of points: one for each face that was passed by the faceIds out reference.
Finds the intersection of a mesh and a polyline. Points are guaranteed to be sorted along the polyline.
Parameters:| mesh (Mesh) | A mesh to intersect. |
| curve (PolylineCurve) | A polyline curves to intersect. |
| faceIds (out int[]) | The indices of the intersecting faces. This out reference is assigned during the call. |
Returns: An array of points: one for each face that was passed by the faceIds out reference.
public static double MeshRay(Mesh mesh
, Ray3d ray
, out int[] meshFaceIndices
) Finds the first intersection of a ray with a mesh.
Parameters:| mesh (Mesh) | A mesh to intersect. |
| ray (Ray3d) | A ray to be casted. |
| meshFaceIndices (out int[]) | faces on mesh that ray intersects. |
Returns: >= 0.0 parameter along ray if successful. < 0.0 if no intersection found.
Finds the first intersection of a ray with a mesh.
Parameters:| mesh (Mesh) | A mesh to intersect. |
| ray (Ray3d) | A ray to be casted. |
Returns: >= 0.0 parameter along ray if successful. < 0.0 if no intersection found.
Finds the first intersection of each one of a set of rays with a mesh.
Parameters:| mesh (Mesh) | A mesh to intersect. |
| rays (IEnumerable<Ray3d>) | The rays to cast. |
| multithreaded (bool) | True to cast the rays on several threads. |
Returns: One value for each ray, in the order of the rays: the parameter along that ray of its first intersection with the mesh, or a value smaller than 0.0 where that ray does not meet the mesh. Null when the mesh or the set of rays is null.
Finds the first intersection of each one of a set of rays with a mesh.
Returns: One value for each ray, in the order of the rays: the parameter along that ray of its first intersection with the mesh, or a value smaller than 0.0 where that ray does not meet the mesh. Null when the mesh or the set of rays is null.
Intersects a plane and a bounding box.
Parameters:| plane (Plane) | The plane. |
| boundingBox (BoundingBox) | The bounding box. |
| polyline (out Polyline) | The output polyline if successful. |
Returns: True if successful, false otherwise.
Intersects a plane with a circle using exact calculations.
Parameters:| plane (Plane) | Plane to intersect. |
| circle (Circle) | Circe to intersect. |
| firstCircleParameter (out double) | First intersection parameter on circle if successful or RhinoMath.UnsetValue if not. |
| secondCircleParameter (out double) | Second intersection parameter on circle if successful or RhinoMath.UnsetValue if not. |
Returns: The type of intersection that occurred.
Intersects two planes and return the intersection line. If the planes are parallel or coincident, no intersection is assumed.
Parameters:| planeA (Plane) | First plane for intersection. |
| planeB (Plane) | Second plane for intersection. |
| intersectionLine (out Line) | If this function returns true, the intersectionLine parameter will return the line where the planes intersect. |
Returns: true on success, false on failure.
Intersects three planes to find the single point they all share.
Parameters:| planeA (Plane) | First plane for intersection. |
| planeB (Plane) | Second plane for intersection. |
| planeC (Plane) | Third plane for intersection. |
| intersectionPoint (out Point3d) | Point where all three planes converge. |
Returns: true on success, false on failure. If at least two out of the three planes are parallel or coincident, failure is assumed.
Intersects a plane with a sphere using exact calculations.
Parameters:| plane (Plane) | Plane to intersect. |
| sphere (Sphere) | Sphere to intersect. |
| intersectionCircle (out Circle) | Intersection result. |
Returns: If
PlaneSphereIntersection.None is returned, the intersectionCircle has a radius of zero and the center point is the point on the plane closest to the sphere.
Projects points onto breps.
Returns: Array of projected points, or null in case of any error or invalid input.
Projects points onto breps.
Parameters:| breps (IEnumerable<Brep>) | The breps projection targets. |
| points (IEnumerable<Point3d>) | The points to project. |
| direction (Vector3d) | The direction to project. |
| tolerance (double) | The tolerance used for intersections. |
| indices (out int[]) | Return points[i] is a projection of points[indices[i]] |
Returns: Array of projected points, or null in case of any error or invalid input.
Projects points onto meshes.
Parameters:| meshes (IEnumerable<Mesh>) | the meshes to project on to. |
| points (IEnumerable<Point3d>) | the points to project. |
| direction (Vector3d) | the direction to project. |
| tolerance (double) | Projection tolerances used for culling close points and for line-mesh intersection. |
Returns: Array of projected points, or null in case of any error or invalid input.
Projects points onto meshes.
Parameters:| meshes (IEnumerable<Mesh>) | the meshes to project on to. |
| points (IEnumerable<Point3d>) | the points to project. |
| direction (Vector3d) | the direction to project. |
| tolerance (double) | Projection tolerances used for culling close points and for line-mesh intersection. |
| indices (out int[]) | Return points[i] is a projection of points[indices[i]] |
Returns: Array of projected points, or null in case of any error or invalid input.
Computes point intersections that occur when shooting a ray to a collection of surfaces and Breps.
Parameters:| ray (Ray3d) | A ray used in intersection. |
| geometry (IEnumerable<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. |
Returns: An array of points: one for each surface or Brep face that was hit, or an empty array on failure.
Computes point intersections that occur when shooting a ray to a collection of surfaces and Breps.
Parameters:| geometry (IEnumerable<GeometryBase>) | The collection of surfaces and Breps to intersect. |
| ray (Ray3d) | A ray used in intersection. |
| maxReflections (int) | The maximum number of reflections. This value should be any value between 1 and 1000, inclusive. |
| honorTrims (bool) | When true, hits that land outside a Brep face's trimming loops are skipped and the ray continues. When false, Breps are treated as their untrimmed surfaces, which is what Rhino 8 and earlier did. |
Returns: An array of RayShootEvent structs if successful, or an empty array on failure.
Computes point intersections that occur when shooting a ray to a collection of surfaces and Breps.
Parameters:| geometry (IEnumerable<GeometryBase>) | The collection of surfaces and Breps to intersect. Trims are ignored on Breps. |
| ray (Ray3d) | >A ray used in intersection. |
| maxReflections (int) | The maximum number of reflections. This value should be any value between 1 and 1000, inclusive. |
Returns: An array of RayShootEvent structs if successful, or an empty array on failure.
Intersects two spheres using exact calculations.
Parameters:| sphereA (Sphere) | First sphere to intersect. |
| sphereB (Sphere) | Second sphere to intersect. |
| intersectionCircle (out Circle) | If intersection is a point, then that point will be the center, radius 0. |
Returns: The intersection type.
Intersects two Surfaces.
Parameters:| surfaceA (Surface) | First Surface for intersection. |
| surfaceB (Surface) | Second Surface for intersection. |
| tolerance (double) | Intersection tolerance. |
| intersectionCurves (out Curve[]) | The intersection curves will be returned here. |
| intersectionPoints (out Point3d[]) | The intersection points will be returned here. |
Returns: true on success, false on failure.