Description:
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.
Syntax:
public static Rectangle3d CreateFromPolyline(
IEnumerable<Point3d> polyline,
out double deviation,
out double angleDeviation
)
IEnumerable<Point3d> polyline,
out double deviation,
out double angleDeviation
)
Parameters:
- polyline
- Type: IEnumerable<Point3d>
- Polyline to parse.
- deviation
- Type: double
- On success, the deviation will contain the largest deviation between the polyline and the rectangle.
- angleDeviation
- Type: double
- On success, the angleDeviation will contain the largest deviation (in radians) between the polyline edges and the rectangle edges.
Returns:
Type: Rectangle3d
A rectangle that is shaped similarly to the polyline or Rectangle3d.Unset if the polyline does not represent a rectangle.
Available since:
5.0
Description:
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.
Syntax:
Parameters:
- polyline
- Type: IEnumerable<Point3d>
- Polyline to parse.
Returns:
Type: Rectangle3d
A rectangle that is shaped similarly to the polyline or Rectangle3d.Unset if the polyline does not represent a rectangle.
Available since:
5.0