Skip to content

M_Rhino_Geometry_Rectangle3d_CreateFromPolyline_1

Will Pearson edited this page Aug 12, 2016 · 2 revisions

Rectangle3d.CreateFromPolyline Method (IEnumerable(Point3d), 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: Rhino 6.0

Syntax

C#

public static Rectangle3d CreateFromPolyline(
	IEnumerable<Point3d> polyline,
	out double deviation,
	out double angleDeviation
)

VB

Public Shared Function CreateFromPolyline ( 
	polyline As IEnumerable(Of Point3d),
	<OutAttribute> ByRef deviation As Double,
	<OutAttribute> ByRef angleDeviation As Double
) As Rectangle3d

Parameters

 

polyline
Type: System.Collections.Generic.IEnumerable(Point3d)
Polyline to parse.
deviation
Type: System.Double
On success, the deviation will contain the largest deviation between the polyline and the rectangle.
angleDeviation
Type: System.Double
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.

Version Information

Supported in: 6.0.16224.21491, 5D58w

See Also

Reference

Rectangle3d Structure
CreateFromPolyline Overload
Rhino.Geometry Namespace

Clone this wiki locally