RhinoCommonExtensionMethods
Some extension methods for various RhinoCommon types.
Methods
public static void AddSphere(this CustomDisplay display, Sphere sphere, Color colour, int thickness)
Parameters:
| display (CustomDisplay) | |
| sphere (Sphere) | |
| colour (Color) | |
| thickness (int) |
Parameters:
| display (CustomDisplay) | |
| sphere (Sphere) |
FindCusps
#Find parameters where cusps occur within the given interval. Note that the limits of the interval are rejected as possible cusp locations.
Parameters:
| curve (NurbsCurve) | |
| spanIndex (int) |
Find parameters where cusps occur within the interior of spans.
Parameters:
| curve (NurbsCurve) | The NURBS curve to analyse. |
public static DiscontinuityLevel GetContinuityLevel(this Curve curve, double t, double angleTolerance = 0.01, double relativeTolerance = 0.01)
Evaluate the level of discontinuity at a given curve parameter.
Gets whether this document contains any selectable (i.e. non-hidden and non-locked) object of the given type.
Parameters:
| objects (ObjectTable) | |
| type (ObjectType) |
Create a new material with inverted back and front face properties.
Parameters:
| material (DisplayMaterial) |
Close a curve by inserting a line segment from the end to the start point.
Parameters:
| curve (Curve) | Curve to close. If curve is already closed, it will be returned immediately. |
Returns: Closed curve or null.
Redraw all Rhino viewports. All GH code should use this method rather than ViewTable.Redraw().
Parameters:
| document (RhinoDoc) | Document whose viewports to redraw. |
public static int[] RegionIndices(this CurveBooleanRegions regions, int regionIndex, int[] indexMap = null)
Find all the indices of input curves that went into a specific region.
Parameters:
| regions (CurveBooleanRegions) | |
| regionIndex (int) | |
| indexMap (int[] = null) |