Skip to content

.NET API

GemsOnCurveApi

A run of stones along one curve, with prongs and cutters, editable afterwards.

from ArtisanPlugin.Scripting import GemsOnCurveApi

See also the guide, Gemsets › Gems on curve, and the Python package, ra.gems_on_curve.

Methods

Method
AllIGemsOnCurve handles for every object of this kind in the active document (empty when there is no document).
ByLayerIGemsOnCurve 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.
CreateDistributes a row of identical gems along an existing curve — the ArtisanGemsOnCurve tool, headless.
FindThe handle for id, or null when the id does not belong to an object of this kind.
ForCurve
SelectedGemsOnCurves currently selected in the active doc.

All

IReadOnlyList<IGemsOnCurve> GemsOnCurveApi.All()

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

Returns IReadOnlyList<IGemsOnCurve>.

ByLayer

IReadOnlyList<IGemsOnCurve> GemsOnCurveApi.ByLayer(string layerName)

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

ParameterTypeDefault
layerNamestringrequired

Returns IReadOnlyList<IGemsOnCurve>.

Count

int GemsOnCurveApi.Count()

Number of objects of this kind in the active document.

Returns int.

Create

IGemsOnCurve GemsOnCurveApi.Create(
    Guid curveId,
    double gemSize = 0,
    double distance = 0,
    string gemShape = null,
    string gemMaterial = null,
    bool prongs = false,
    bool cutters = false,
    IEnumerable<Guid> orientationIds = null)

Distributes a row of identical gems along an existing curve — the ArtisanGemsOnCurve tool, headless. curveId must be a curve in the active document; it becomes the row’s parent (see ForCurve). Millimetres; 0 keeps the tool default (or the user’s saved defaults): gemSize 1.5, distance 0.2. gemShape/gemMaterial accept the GemApi vocabularies (default ROUND Diamond). prongs true also builds the shared prongs; cutters true bakes one cutter per gem into a separate group. orientationIds optionally orient the gems onto those surfaces/breps. Returns an IGemsOnCurve handle to the new row.

ParameterTypeDefault
curveIdGuidrequired
gemSizedouble0
distancedouble0
gemShapestringnull
gemMaterialstringnull
prongsboolfalse
cuttersboolfalse
orientationIdsIEnumerable<Guid>null

Returns IGemsOnCurve.

Find

IGemsOnCurve GemsOnCurveApi.Find(Guid id)

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

ParameterTypeDefault
idGuidrequired

Returns IGemsOnCurve.

ForCurve

IReadOnlyList<IGemsOnCurve> GemsOnCurveApi.ForCurve(Guid curveId)
ParameterTypeDefault
curveIdGuidrequired

Returns IReadOnlyList<IGemsOnCurve>.

Selected

IReadOnlyList<IGemsOnCurve> GemsOnCurveApi.Selected()

GemsOnCurves currently selected in the active doc.

Returns IReadOnlyList<IGemsOnCurve>.

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.

IGemsOnCurve

Handle — extends IGemSetting, IParametricObject.

A row of identical gems distributed along a parent curve. The “Mother” here is the curve, not a single gem — accessible via CurveId. GemShape/Material/CaratWeight describe the gem template that gets repeated along the curve.

PropertyType
AlignmentVerticalstringget”TOP” | “ON_GIRDLE”
CurveIdGuidget
CuttersEnabledboolget
Distancedoubleget
FlipCurveboolget
GemCaratWeightdoubleget(from IGemSetting)
GemMaterialstringget(from IGemSetting)
GemOrientationstringget”NATURAL” | “UPSIDE_DOWN”
GemShapestringget(from IGemSetting)
GemSizedoublegetCurrent values (millimetres / degrees; several are signed).
GemSizeYdoubleget0 = symmetric; only used by asymmetric shapes
IdGuidget(from IParametricObject)
LayerNamestringget(from IParametricObject)
MotherGemIdGuidget(from IParametricObject)
MoveByZdoublegetsigned
ObjectTypestringget(from IParametricObject)
PositionPoint3dget(from IParametricObject)
ProngDiameterdoubleget
ProngEndModestringget”SINGLE” | “DOUBLE”
ProngHeightOverGirdledoubleget
ProngHeightUnderGirdledoubleget
ProngTypestringget”INDIVIDUAL” | “SHARED”
ProngsEnabledboolget
Rotate90boolget
RotationOnCurvedoublegetdegrees, signed
StartingPointstringget”BOUNDARY” | “CENTER”
StoneCountintget
Method
void Delete()(from IParametricObject)
void Move(Vector3d translation)(from IParametricObject)
void SetAlignmentVertical(string alignment)TOP | ON_GIRDLE
void SetCuttersEnabled(bool enabled)
void SetDistance(double distance)
void SetFlipCurve(bool flip)
void SetGemMaterial(string material)
void SetGemOrientation(string orientation)NATURAL | UPSIDE_DOWN
void SetGemShape(string shape)
void SetGemSize(double size)Parametric edits — each regenerates the row in place (the group keeps its id) and calls LicenseGate.RequireValid() first. LITERAL values: 0 and negatives are allowed where the parameter is signed.
void SetGemSizeY(double sizeY)0 = back to symmetric
void SetMoveByZ(double moveByZ)signed
void SetProngDiameter(double diameter)
void SetProngDistanceShared(double distance)
void SetProngEndMode(string endMode)SINGLE | DOUBLE
void SetProngHeightOverGirdle(double height)signed
void SetProngHeightUnderGirdle(double height)signed
void SetProngType(string prongType)INDIVIDUAL | SHARED
void SetProngsEnabled(bool enabled)
void SetRotate90(bool rotate90)
void SetRotationOnCurve(double degrees)signed
void SetStartingPoint(string startingPoint)BOUNDARY | CENTER