﻿Rectangle3d.CreateFromPolyline Method (IEnumerable(Point3d), Double, Double)  # Rectangle3dAddLanguageSpecificTextSet("LSTC7BAA4AE_0?cpp=::|nu=.");CreateFromPolyline Method (IEnumerableAddLanguageSpecificTextSet("LSTC7BAA4AE_1?cs=&lt;|vb=(Of |cpp=&lt;|fs=&lt;'|nu=(");Point3dAddLanguageSpecificTextSet("LSTC7BAA4AE_2?cs=&gt;|vb=)|cpp=&gt;|fs=&gt;|nu=)");, DoubleAddLanguageSpecificTextSet("LSTC7BAA4AE_3?cpp=%");, DoubleAddLanguageSpecificTextSet("LSTC7BAA4AE_4?cpp=%");)

Attempts to create a rectangle from a polyline. This method only works well for polylines that already closely resemble rectangles. If the polyline contains more than four vertices, the least significant ones will be ignored. If the polylines is non-orthogonal, the discrepancies will be averaged away. This method should not be used as a Rectangle fitter.

Namespace:  Rhino.Geometry
Assembly:  RhinoCommon (in RhinoCommon.dll)
Since: 5.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