Skip to content

.NET API

AdvancedGemsOnCurveApi

Runs of stones along a curve with per-stone sizes, shapes and rotations.

from ArtisanPlugin.Scripting import AdvancedGemsOnCurveApi

See also the Python package, ra.advanced_gems_on_curve.

Methods

Method
AllIAdvancedGemsOnCurve handles for every object of this kind in the active document (empty when there is no document).
ByLayerIAdvancedGemsOnCurve handles on the layer with the given full path (empty when the layer does not exist).
CountNumber of objects of this kind in the active document.
CreateLays a PATTERN of gem groups along a curve — the ArtisanAdvancedGemsOnCurve tool, headless.
FindThe handle for id, or null when the id does not belong to an object of this kind.
SelectedIAdvancedGemsOnCurve handles for the objects of this kind currently selected in the active document.

All

IReadOnlyList<IAdvancedGemsOnCurve> AdvancedGemsOnCurveApi.All()

IAdvancedGemsOnCurve handles for every object of this kind in the active document (empty when there is no document).

Returns IReadOnlyList<IAdvancedGemsOnCurve>.

ByLayer

IReadOnlyList<IAdvancedGemsOnCurve> AdvancedGemsOnCurveApi.ByLayer(string layerName)

IAdvancedGemsOnCurve handles on the layer with the given full path (empty when the layer does not exist).

ParameterTypeDefault
layerNamestringrequired

Returns IReadOnlyList<IAdvancedGemsOnCurve>.

Count

int AdvancedGemsOnCurveApi.Count()

Number of objects of this kind in the active document.

Returns int.

Create

AdvancedGemsOnCurveResult AdvancedGemsOnCurveApi.Create(
    Guid curveId,
    IEnumerable<double> sizes,
    IEnumerable<int> quantities = null,
    IEnumerable<double> sizes2 = null,
    IEnumerable<string> shapes = null,
    IEnumerable<double> rotations = null,
    double distance = 0,
    double moveByZ = double.NaN,
    double rotationOnCurve = double.NaN,
    string alignmentOnCurve = null,
    string alignmentVertical = null,
    bool? startCentered = null,
    bool? upsideDown = null,
    bool flipCurve = false,
    IEnumerable<Guid> orientationIds = null,
    double t0 = double.NaN,
    double t1 = double.NaN)

Lays a PATTERN of gem groups along a curve — the ArtisanAdvancedGemsOnCurve tool, headless. Unlike GemsOnCurveApi (one size, one shape) each group i has quantities[i] gems graduating from sizes[i] to sizes2[i] mm (same size when omitted), of shapes[i] (default ROUND) rotated rotations[i] degrees; the groups run one after another from the curve start. Diamonds only (the tool has no material choice). Millimetres; 0 keeps the tool default (or the user’s saved defaults): distance 0.2 between gems. alignmentOnCurve START (default) / CENTER / END, alignmentVertical ON_GIRDLE (default) / TOP. t0/t1 limit the run to a curve parameter range. Returns the group id plus the gem ids.

ParameterTypeDefault
curveIdGuidrequired
sizesIEnumerable<double>required
quantitiesIEnumerable<int>null
sizes2IEnumerable<double>null
shapesIEnumerable<string>null
rotationsIEnumerable<double>null
distancedouble0
moveByZdoubledouble.NaN
rotationOnCurvedoubledouble.NaN
alignmentOnCurvestringnull
alignmentVerticalstringnull
startCenteredbool?null
upsideDownbool?null
flipCurveboolfalse
orientationIdsIEnumerable<Guid>null
t0doubledouble.NaN
t1doubledouble.NaN

Returns AdvancedGemsOnCurveResult.

Find

IAdvancedGemsOnCurve AdvancedGemsOnCurveApi.Find(Guid id)

The handle for id, or null when the id does not belong to an object of this kind.

ParameterTypeDefault
idGuidrequired

Returns IAdvancedGemsOnCurve.

Selected

IReadOnlyList<IAdvancedGemsOnCurve> AdvancedGemsOnCurveApi.Selected()

IAdvancedGemsOnCurve handles for the objects of this kind currently selected in the active document.

Returns IReadOnlyList<IAdvancedGemsOnCurve>.

Handles and sections

What the methods above hand back. A handle’s setters regenerate the object; wrap changes in a Transaction so they land as one undo step.

IAdvancedGemsOnCurve

Handle — extends IParametricGroup, IParametricObject.

PropertyType
CurveIdGuidget
IdGuidget(from IParametricObject)
LayerNamestringget(from IParametricObject)
MemberCountintgetRhino objects in the group (from IParametricGroup)
MotherGemIdGuidget(from IParametricObject)
ObjectTypestringget(from IParametricObject)
ParametersJsonstringgetthe kernel model, as stored in the group (from IParametricGroup)
PositionPoint3dget(from IParametricObject)
Method
void Delete()(from IParametricObject)
string GetParameter(string path)dotted JSON path; null when absent (from IParametricGroup)
void Move(Vector3d translation)(from IParametricObject)