Class PlaneRef
- Namespace
- CADability
- Assembly
- CADability.dll
A reference to a plane. The Plane is implemented as a struct, i.e. a value type. Sometimes it is necessary to have a parameter or member, which designates a plane but may be null (when the plane is not yet computed or not valid). This class works as an object replacement of the struct Plane.
public class PlaneRef
- Inheritance
-
PlaneRef
- Inherited Members
Constructors
PlaneRef(Plane)
Standard and only constructor, wrapping the given Plane.
public PlaneRef(Plane p)
Parameters
pPlaneThe Plane to wrap
Methods
FindCommonPlane(GeoPoint[], out Plane)
Yields a common plane of the cloud of points, if there is one. If there is no common plane the result may be not optimal (residual is not minimal)
public static bool FindCommonPlane(GeoPoint[] Cloud, out Plane commonPlane)
Parameters
CloudGeoPoint[]the cloud of points
commonPlanePlanethe common plane of the points, if one was found, otherwise the XY plane
Returns
- bool
true, if all points lie on the plane
Operators
implicit operator PlaneRef(Plane)
Operator to seamlessly use a Plane as a PlaneRef
public static implicit operator PlaneRef(Plane p)
Parameters
pPlaneThe Plane to convert
Returns
- PlaneRef
The resulting PlaneRef
implicit operator Plane(PlaneRef)
Operator to seamlessly use a PlaneRef as a Plane
public static implicit operator Plane(PlaneRef pr)
Parameters
prPlaneRefThe PlaneRef to convert
Returns
- Plane
The resulting Plane