Click or drag to resize
CurveToPolyline Method (Int32, Int32, Double, Double, Double, Double, Double, Double, Boolean, Interval)
Gets a polyline approximation of a curve.

Namespace: Rhino.Geometry
Assembly: RhinoCommon (in RhinoCommon.dll) Version: 5.1.50000.0 (5.0.20693.0)
Syntax
public PolylineCurve ToPolyline(
	int mainSegmentCount,
	int subSegmentCount,
	double maxAngleRadians,
	double maxChordLengthRatio,
	double maxAspectRatio,
	double tolerance,
	double minEdgeLength,
	double maxEdgeLength,
	bool keepStartPoint,
	Interval curveDomain
)

Parameters

mainSegmentCount
Type: SystemInt32
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: SystemInt32
An amount of subsegments.
maxAngleRadians
Type: SystemDouble
( 0 to pi ) Maximum angle (in radians) between unit tangents at adjacent vertices.
maxChordLengthRatio
Type: SystemDouble
Maximum permitted value of (distance chord midpoint to curve) / (length of chord).
maxAspectRatio
Type: SystemDouble
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: SystemDouble
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: SystemDouble
The minimum permitted edge length.
maxEdgeLength
Type: SystemDouble
If maxEdgeLength = 0, the parameter is ignored. This parameter controls the maximum permitted edge length.
keepStartPoint
Type: SystemBoolean
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.
curveDomain
Type: Rhino.GeometryInterval
This subdomain of the NURBS curve is approximated.

Return Value

Type: PolylineCurve
PolylineCurve on success, null on error.
See Also