SimplifyCurve

Simplify curve replaces the curve with a geometrically equivalent polycurve. The polycurve will have the following properties:

  1.  All the polycurve segments are lines, polylines, arcs, or NURBS curves.

  2.  The NURBS curves segments do not have fully multiple interior knots.

  3.  Rational NURBS curves do not have constant weights.

  4.  Any segment for which IsCurveLinear or IsArc is True is a line, polyline segment, or an arc.

  5.  Adjacent co-linear or co-circular segments are combined.

  6.  Segments that meet with G1-continuity have there ends tuned up so that they meet with G1-continuity to within machine precision.

Syntax

Rhino.SimplifyCurve (strObject [, intFlags])

Parameters

strObject

Required.  String.  The curve object's identifier.

intFlags

Optional.  Number.  The simplification methods to use. By default, all methods are used (intFlags = 0). The possible options are as follows:

Value

Description

0

Use all methods.

1

Do not split NURBS curves at fully multiple knots.

2

Do not replace segments with IsCurveLinear = True with line curves.

4

Do not replace segments with IsArc = True with arc curves.

8

Do not replace rational NURBS curves with constant denominator with an equivalent non-rational NURBS curve.

16

Do not adjust curves at G1-joins.

32

Do not merge adjacent co-linear lines or co-circular arcs or combine consecutive line segments into a polyline.

Returns

Boolean

True or False indicating success or failure.

Null

On error.

Example

Const rhCurveObject = 4

Dim strObject

strObject = Rhino.GetObject("Select a curve to simplify", rhCurveObject)

If Rhino.IsCurve(strObject) Then

Rhino.SimplifyCurve strObject

End If

Also See

IsArc

IsCurveLinear