Click or drag to resize
Rectangle3dCreateFromPolyline Method (IEnumerablePoint3d, Double, Double)
Attempts to create a Rectangle from a Polyline. In order for a polyline to qualify as a rectangle, it must have 4 or 5 corner points (i.e. it need not be closed).

This overload also returns deviations.

Namespace: Rhino.Geometry
Assembly: RhinoCommon (in RhinoCommon.dll) Version: 5.1.50000.0 (5.0.20693.0)
Syntax
public static Rectangle3d CreateFromPolyline(
	IEnumerable<Point3d> polyline,
	out double deviation,
	out double angleDeviation
)

Parameters

polyline
Type: System.Collections.GenericIEnumerablePoint3d
Polyline to parse.
deviation
Type: SystemDouble
On success, the deviation will contain the largest deviation between the polyline and the rectangle.
angleDeviation
Type: SystemDouble
On success, the angleDeviation will contain the largest deviation (in radians) between the polyline edges and the rectangle edges.

Return Value

Type: Rectangle3d
A rectangle that is shaped similarly to the polyline or Rectangle3d.Unset if the polyline does not represent a rectangle.
See Also