.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 | |
|---|---|
All | IGemsOnCurve handles for every object of this kind in the active document (empty when there is no document). |
ByLayer | IGemsOnCurve handles on the layer with the given full path (empty when the layer does not exist). |
Count | Number of objects of this kind in the active document. |
Create | Distributes a row of identical gems along an existing curve — the ArtisanGemsOnCurve tool, headless. |
Find | The handle for id, or null when the id does not belong to an object of this kind. |
ForCurve | |
Selected | GemsOnCurves 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).
| Parameter | Type | Default |
|---|---|---|
layerName | string | required |
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.
| Parameter | Type | Default |
|---|---|---|
curveId | Guid | required |
gemSize | double | 0 |
distance | double | 0 |
gemShape | string | null |
gemMaterial | string | null |
prongs | bool | false |
cutters | bool | false |
orientationIds | IEnumerable<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.
| Parameter | Type | Default |
|---|---|---|
id | Guid | required |
Returns IGemsOnCurve.
ForCurve
IReadOnlyList<IGemsOnCurve> GemsOnCurveApi.ForCurve(Guid curveId)
| Parameter | Type | Default |
|---|---|---|
curveId | Guid | required |
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.
| Property | Type | ||
|---|---|---|---|
AlignmentVertical | string | get | ”TOP” | “ON_GIRDLE” |
CurveId | Guid | get | |
CuttersEnabled | bool | get | |
Distance | double | get | |
FlipCurve | bool | get | |
GemCaratWeight | double | get | (from IGemSetting) |
GemMaterial | string | get | (from IGemSetting) |
GemOrientation | string | get | ”NATURAL” | “UPSIDE_DOWN” |
GemShape | string | get | (from IGemSetting) |
GemSize | double | get | Current values (millimetres / degrees; several are signed). |
GemSizeY | double | get | 0 = symmetric; only used by asymmetric shapes |
Id | Guid | get | (from IParametricObject) |
LayerName | string | get | (from IParametricObject) |
MotherGemId | Guid | get | (from IParametricObject) |
MoveByZ | double | get | signed |
ObjectType | string | get | (from IParametricObject) |
Position | Point3d | get | (from IParametricObject) |
ProngDiameter | double | get | |
ProngEndMode | string | get | ”SINGLE” | “DOUBLE” |
ProngHeightOverGirdle | double | get | |
ProngHeightUnderGirdle | double | get | |
ProngType | string | get | ”INDIVIDUAL” | “SHARED” |
ProngsEnabled | bool | get | |
Rotate90 | bool | get | |
RotationOnCurve | double | get | degrees, signed |
StartingPoint | string | get | ”BOUNDARY” | “CENTER” |
StoneCount | int | get |
| 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 |