Click or drag to resize
CurveToPolyline 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: 5.1.50000.0 (5.0.20693.0)
public PolylineCurve ToPolyline(
	int mainSegmentCount,
	int subSegmentCount,
	double maxAngleRadians,
	double maxChordLengthRatio,
	double maxAspectRatio,
	double tolerance,
	double minEdgeLength,
	double maxEdgeLength,
	bool keepStartPoint


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

Return Value

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