M_Rhino_Geometry_Curve_ToPolyline - mcneel/rhinocommon-api-docs GitHub Wiki

Curve.ToPolyline Method (Int32, Int32, Double, Double, Double, Double, Double, Double, Boolean)

Gets a polyline approximation of a curve.

Namespace: Rhino.Geometry
Assembly: RhinoCommon (in RhinoCommon.dll) Version: Rhino 6.0

Syntax

C#

public PolylineCurve ToPolyline(
	int mainSegmentCount,
	int subSegmentCount,
	double maxAngleRadians,
	double maxChordLengthRatio,
	double maxAspectRatio,
	double tolerance,
	double minEdgeLength,
	double maxEdgeLength,
	bool keepStartPoint
)

VB

Public Function ToPolyline ( 
	mainSegmentCount As Integer,
	subSegmentCount As Integer,
	maxAngleRadians As Double,
	maxChordLengthRatio As Double,
	maxAspectRatio As Double,
	tolerance As Double,
	minEdgeLength As Double,
	maxEdgeLength As Double,
	keepStartPoint As Boolean
) As PolylineCurve

Parameters

 

mainSegmentCount
Type: System.Int32
If mainSegmentCount <= 0, then both subSegmentCount and mainSegmentCount are ignored. If mainSegmentCount > 0, then subSegmentCount must be >= 1. In this case the nurb will be broken into mainSegmentCount equally spaced chords. If needed, each of these chords can be split into as many subSegmentCount sub-parts if the subdivision is necessary for the mesh to meet the other meshing constraints. In particular, if subSegmentCount = 0, then the curve is broken into mainSegmentCount pieces and no further testing is performed.
subSegmentCount
Type: System.Int32
An amount of subsegments.
maxAngleRadians
Type: System.Double
( 0 to pi ) Maximum angle (in radians) between unit tangents at adjacent vertices.
maxChordLengthRatio
Type: System.Double
Maximum permitted value of (distance chord midpoint to curve) / (length of chord).
maxAspectRatio
Type: System.Double
If maxAspectRatio < 1.0, the parameter is ignored. If 1 <= maxAspectRatio < sqrt(2), it is treated as if maxAspectRatio = sqrt(2). This parameter controls the maximum permitted value of (length of longest chord) / (length of shortest chord).
tolerance
Type: System.Double
If tolerance = 0, the parameter is ignored. This parameter controls the maximum permitted value of the distance from the curve to the polyline.
minEdgeLength
Type: System.Double
The minimum permitted edge length.
maxEdgeLength
Type: System.Double
If maxEdgeLength = 0, the parameter is ignored. This parameter controls the maximum permitted edge length.
keepStartPoint
Type: System.Boolean
If true the starting point of the curve is added to the polyline. If false the starting point of the curve is not added to the polyline.

Return Value

Type: PolylineCurve
PolylineCurve on success, null on error.

Version Information

Supported in: 6.0.16224.21491, 5D58w

See Also

Reference

Curve Class
ToPolyline Overload
Rhino.Geometry Namespace

⚠️ **GitHub.com Fallback** ⚠️