RhinoCommonExtensionMethods

public static class RhinoCommonExtensionMethods
Some extension methods for various RhinoCommon types.

Methods

AddSphere

#Example
public static void AddSphere(
display,
sphere,
Color
colour,
thickness
)

AddSphere

#Example
public static void AddSphere(
display,
sphere
)

FindCusps

#
Find parameters where cusps occur within the given interval. Note that the limits of the interval are rejected as possible cusp locations.
public static IEnumerable<double> FindCusps(
curve,
spanIndex
)

FindCusps

#Example
Find parameters where cusps occur within the interior of spans.
public static IEnumerable<double> FindCusps(
curve
The NURBS curve to analyse.
)

FocusWindowNAH

#Example
Make sure the Rhino window hosting the specified document has focus.
public static void FocusWindowNAH(
this RhinoDoc
doc
)

GetContinuityLevel

#Example
Evaluate the level of discontinuity at a given curve parameter.
public static DiscontinuityLevel GetContinuityLevel(
this Curve
curve,
Curve.
t,
Parameter on curve.
angleTolerance = 0.01,
Angle tolerance between normalised derivatives in radians.
relativeTolerance = 0.01
Relative tolerance between normalised derivatives.
)
Highest level of continuity.

HasSelectableObjects

#Example
Gets whether this document contains any selectable (i.e. non-hidden and non-locked) object of the given type.
public static bool HasSelectableObjects(
objects,
type
)

Invert

#Example
Create a new material with inverted back and front face properties.
public static DisplayMaterial Invert(
material
)

MakeClosedViaLine

#Example
Close a curve by inserting a line segment from the end to the start point.
public static Curve MakeClosedViaLine(
this Curve
curve
Curve to close. If curve is already closed, it will be returned immediately.
)
Closed curve or null.

RedrawAndReturnImmediately

#Example
Redraw all Rhino viewports. All GH code should use this method rather than ViewTable.Redraw().
public static void RedrawAndReturnImmediately(
this RhinoDoc
document
Document whose viewports to redraw.
)

Reflex

#Example
Get the reflex arc.
public static Arc Reflex(
this Arc
arc
)

RegionIndices

#Example
Find all the indices of input curves that went into a specific region.
public static int[] RegionIndices(
regions,
regionIndex,
int[]
indexMap = null
)