Skip to content

.NET API

GemsOn2CurvesApi

Stones fitted between two rails, sized to the gap.

from ArtisanPlugin.Scripting import GemsOn2CurvesApi

See also the Python package, ra.gems_on_two_curves.

Methods

Method
AllIGemsOn2Curves handles for every object of this kind in the active document (empty when there is no document).
ByLayerIGemsOn2Curves 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.
CreateFills the space between two curves with round gems whose diameter adapts to the local width — the ArtisanGemsOn2Curves tool, headless.
FindThe handle for id, or null when the id does not belong to an object of this kind.
SelectedIGemsOn2Curves handles for the objects of this kind currently selected in the active document.

All

IReadOnlyList<IGemsOn2Curves> GemsOn2CurvesApi.All()

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

Returns IReadOnlyList<IGemsOn2Curves>.

ByLayer

IReadOnlyList<IGemsOn2Curves> GemsOn2CurvesApi.ByLayer(string layerName)

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

ParameterTypeDefault
layerNamestringrequired

Returns IReadOnlyList<IGemsOn2Curves>.

Count

int GemsOn2CurvesApi.Count()

Number of objects of this kind in the active document.

Returns int.

Create

GemsOn2CurvesResult GemsOn2CurvesApi.Create(
    Guid curve1Id,
    Guid curve2Id,
    double distance = 0,
    double minSize = 0,
    double moveInZ = double.NaN,
    string gemMaterial = null,
    string algorithm = null,
    bool? alignOnTop = null,
    bool? flip = null,
    bool? flip1 = null,
    bool? flip2 = null,
    bool? rebuildCurves = null,
    bool prongs = false,
    string prongType = null,
    string prongEndMode = null,
    double prongDiameter = 0,
    double prongDistance = 0,
    double prongHeightOverGirdle = 0,
    double prongHeightUnderGirdle = 0,
    bool group = true)

Fills the space between two curves with round gems whose diameter adapts to the local width — the ArtisanGemsOn2Curves tool, headless. Millimetres; 0 keeps the tool default (or the user’s saved defaults): distance 0.2 between gems, minSize 1 (smaller gems are dropped). algorithm is SPINE (default) or TANGENCY; gemMaterial accepts the GemApi vocabulary (default Diamond). prongs true also bakes the prongs (SHARED by default, or INDIVIDUAL) as metal. Returns the group id plus the gem/prong ids; group false bakes loose gems instead.

ParameterTypeDefault
curve1IdGuidrequired
curve2IdGuidrequired
distancedouble0
minSizedouble0
moveInZdoubledouble.NaN
gemMaterialstringnull
algorithmstringnull
alignOnTopbool?null
flipbool?null
flip1bool?null
flip2bool?null
rebuildCurvesbool?null
prongsboolfalse
prongTypestringnull
prongEndModestringnull
prongDiameterdouble0
prongDistancedouble0
prongHeightOverGirdledouble0
prongHeightUnderGirdledouble0
groupbooltrue

Returns GemsOn2CurvesResult.

Find

IGemsOn2Curves GemsOn2CurvesApi.Find(Guid id)

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

ParameterTypeDefault
idGuidrequired

Returns IGemsOn2Curves.

Selected

IReadOnlyList<IGemsOn2Curves> GemsOn2CurvesApi.Selected()

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

Returns IReadOnlyList<IGemsOn2Curves>.

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.

IGemsOn2Curves

Handle — extends IParametricGroup, IParametricObject.

PropertyType
Curve1IdGuidget
Curve2IdGuidget
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)