GetCurve

public class GetCurve : IDisposable
Use to interactively get a control point curve or an interpolated curve. These are the getters behind the Rhino Curve and InterpCrv commands.

Constructors

GetCurve

#Since v9.0
public GetCurve()
Initializes a new instance with the default prompts and options.

Finalizer

~GetCurve

#
~GetCurve()
Passively reclaims unmanaged resources when the class user did not explicitly call Dispose().

Properties

Degree

#Since v9.0
public int Degree { get; set; }
Degree of the resulting curve. Default is 3. Setting any value other than 3 clears SubDFriendly.

EndTangent

#Since v9.0
public Vector3d EndTangent { get; set; }
End tangent of an interpolated curve. Only used when UseEndTangent is true.

FirstPointPrompt

#Since v9.0
public string FirstPointPrompt { get; set; }
Prompt used when getting the first point. The default is the localized "Start of curve".

KnotSpacing

#Since v9.0
public CurveKnotStyle KnotSpacing { get; set; }
Knot spacing used when interpolating. Default is Chord. Only Uniform, Chord and ChordSquareRoot are accepted. Closing the curve selects the periodic form of the value set here, so passing a periodic value would take the knot style out of range. Ignored when SubDFriendly is true.
ArgumentOutOfRangeExceptionThrown when the value is not Uniform, Chord or ChordSquareRoot.

Points

#Since v9.0
public Point3d[] Points { get; }
The points picked during the most recent call to GetControlPointCurve or GetInterpolatedCurve. Empty before the first call. When the curve was closed, the first point is repeated at the end.

SecondPointPrompt

#Since v9.0
public string SecondPointPrompt { get; set; }
Prompt used when getting the second point. The default is the localized "Next point".

Sharp

#Since v9.0
public bool Sharp { get; set; }
When true, closing the curve produces a sharp corner at the seam instead of a periodic curve. Default is false.

StartTangent

#Since v9.0
public Vector3d StartTangent { get; set; }
Start tangent of an interpolated curve. Only used when UseStartTangent is true.

SubDFriendly

#Since v9.0
public bool SubDFriendly { get; set; }
When true, the result is a cubic, uniform, non-rational curve that is either periodic or has zero second derivatives at both ends. Default is false. Setting this to true sets Degree to 3, because a SubD friendly curve is always cubic. While this is true, KnotSpacing, StartTangent and EndTangent are ignored.

ThirdPointPrompt

#Since v9.0
public string ThirdPointPrompt { get; set; }
Prompt used when getting the third and following points. The default is the localized "Next point. Press Enter when done".

UseActiveLayerLinetype

#Since v9.0
public bool UseActiveLayerLinetype { get; set; }
When true, the linetype of the active layer is used for the dynamic drawing. Default is false.

UseEndTangent

#Since v9.0
public bool UseEndTangent { get; set; }
When true, an interpolated curve ends tangent to EndTangent. Default is false. Ignored on a closed curve unless Sharp is true, and ignored while SubDFriendly is true. The getter offers its EndTangent option to the user only at degree 3 with SubDFriendly off; a tangent set here still applies at any degree.

UseStartTangent

#Since v9.0
public bool UseStartTangent { get; set; }
When true, an interpolated curve starts tangent to StartTangent. Default is false. Ignored on a closed curve unless Sharp is true, and ignored while SubDFriendly is true. The getter offers its StartTangent option to the user only at degree 3 with SubDFriendly off; a tangent set here still applies at any degree.

Methods

Dispose

#Since v9.0
public void Dispose()
Actively reclaims unmanaged resources that this instance uses.

Dispose

#
protected virtual void Dispose(bool disposing)
For derived class implementers.

This method is called with argument true when class user calls Dispose(), while with argument false when the Garbage Collector invokes the finalizer, or Finalize() method.

You must reclaim all used unmanaged resources in both cases, and can use this chance to call Dispose on disposable fields if the argument is true.

Also, you must call the base virtual method within your overriding method.

disposing (bool)true if the call comes from the Dispose() method; false if it comes from the Garbage Collector finalizer.

GetControlPointCurve

#Since v9.0
public Result GetControlPointCurve(out NurbsCurve curve)
Interactively picks the control points of a curve. This is what the Rhino Curve command uses.
curve (out NurbsCurve)The resulting curve, or null when the result is not Success.
The command result.

GetInterpolatedCurve

#Since v9.0
public Result GetInterpolatedCurve(out NurbsCurve curve)
Interactively picks the points an interpolated curve passes through. This is what the Rhino InterpCrv command uses.
curve (out NurbsCurve)The resulting curve, or null when the result is not Success.
The command result.

See also