IntersectionGeometryPlane Method (GeometryBase, Plane, Double, Boolean, RhinoDoc, Curve, Point3d) |
Intersects geometry with an (infinite) plane.
Namespace:
Rhino.Geometry.Intersect
Assembly:
RhinoCommon (in RhinoCommon.dll)
Since: 9.0
Syntaxpublic static bool GeometryPlane(
GeometryBase geometry,
Plane plane,
double tolerance,
bool joinCurves,
RhinoDoc doc,
out Curve[] intersectionCurves,
out Point3d[] intersectionPoints
)
Public Shared Function GeometryPlane (
geometry As GeometryBase,
plane As Plane,
tolerance As Double,
joinCurves As Boolean,
doc As RhinoDoc,
<OutAttribute> ByRef intersectionCurves As Curve(),
<OutAttribute> ByRef intersectionPoints As Point3d()
) As Boolean
Parameters
- geometry
- Type: Rhino.GeometryGeometryBase
GeometryBase object to intersect. - plane
- Type: Rhino.GeometryPlane
Plane to intersect with. - tolerance
- Type: SystemDouble
Tolerance to use for intersections. - joinCurves
- Type: SystemBoolean
If true, join the resulting curves where possible, for every geometry type and across the objects of an instance definition. - doc
- Type: RhinoRhinoDoc
The document that has the instance definition when geometry is an InstanceReferenceGeometry. Can be null for other geometry. - intersectionCurves
- Type: Rhino.GeometryCurve
The intersection curves will be returned here. - intersectionPoints
- Type: Rhino.GeometryPoint3d
The intersection points will be returned here.
Return Value
Type:
Boolean
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 geometry type is not supported or the intersection failed. Curves and points found
before a failure are still returned.
Remarks
The curves and points are projected onto the plane. Curves that are not valid after the
projection are not returned.
For an InstanceReferenceGeometry, curves are fitted inside the instance definition with tolerance
divided by the largest scale factor of the transform, so they are within tolerance in world
coordinates, also for non-uniform scale. Points are tested with their distance to the plane in
world coordinates. With non-uniform scale, overlaps of curves with the plane are detected with the
stricter curve tolerance, so a curve closer than tolerance to the plane can be missed as an overlap.
When joinCurves is true, open curves can be reversed, very short curves can be dropped, and joined
curves are PolyCurve.
For point clouds, the points within tolerance of the plane are returned as one polyline in
intersectionCurves, or in intersectionPoints when there is only one. Points closer together
than tolerance are merged.
See Also