.NET API
AnniversaryApi
Anniversary bands - a plain band with a row of touching bezel-set stones along the top (the ArtisanAnniversary tool). The stones are baked as the ring’s children.
from ArtisanPlugin.Scripting import AnniversaryApi
See also the Python package, ra.anniversary.
Methods
| Method | |
|---|---|
All | IAnniversary handles for every object of this kind in the active document (empty when there is no document). |
ByLayer | IAnniversary 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 | Builds an anniversary band — the ArtisanAnniversary tool, headless. |
Find | The handle for id, or null when the id does not belong to an object of this kind. |
Selected | IAnniversary handles for the objects of this kind currently selected in the active document. |
All
IReadOnlyList<IAnniversary> AnniversaryApi.All()
IAnniversary handles for every object of this kind in the active document (empty when there is no document).
Returns IReadOnlyList<IAnniversary>.
ByLayer
IReadOnlyList<IAnniversary> AnniversaryApi.ByLayer(string layerName)
IAnniversary handles on the layer with the given full path (empty when the layer does not exist).
| Parameter | Type | Default |
|---|---|---|
layerName | string | required |
Returns IReadOnlyList<IAnniversary>.
Count
int AnniversaryApi.Count()
Number of objects of this kind in the active document.
Returns int.
Create
IAnniversary AnniversaryApi.Create(
double fingerDiameter = 0,
string distribution = null,
string sizeDistribution = null,
string shape = null,
string material = null,
double stoneSize = 0,
double centerStoneSize = 0,
double sideStoneSize = 0,
double elevation = double.NaN,
bool? drill = null,
double topWidth = 0,
double topHeight = 0,
double bottomWidth = 0,
double bottomHeight = 0,
string profile = null,
string interior = null,
string bezelProfile = null,
double bezelGemInside = double.NaN,
Plane? plane = null,
string element = null)
Builds an anniversary band — the ArtisanAnniversary tool, headless. Millimetres; 0 keeps the tool default (or the user’s saved defaults): top profile 1.8 x 1.6 (under the stones), bottom profile 2.0 x 1.5 (the back). fingerDiameter 0 = the document’s finger size. profile picks a RING_PROFILE asset by name for both sections; interior SOLID or COMFORT (both sections). The stones sit in bezel cups that touch each other and ARE the ring there (no band under them). distribution, as Eternity: HALF (default), THREEQUARTERS (as many cups as fit in that share of the ring), FULL (all round, no band), FIVESTONES, SEVENSTONES or NINESTONES; centred on the top. sizeDistribution UNIFORM (default, every stone stoneSize, 2.0) or GRADUATED (centerStoneSize 3.0 in the middle down to sideStoneSize 1.8 at both ends); centre / side sizes without a size distribution mean GRADUATED. shape ROUND (default), PRINCESS, RADIANT, OVAL or EMERALD; material a GemCompound name (Diamond default, Ruby, Sapphire…). elevation mm the stones sit above the finger (0.3, NaN keeps it; the cups always run down to the finger and are trimmed by it); drill (default true) seats every stone (it opens the end cups through the band). bezelProfile picks a BEZEL_PROFILE asset by name; bezelGemInside mm the lip closes over the stones (NaN keeps it). element = name of a saved Anniversary element (ElementsApi.List(“Anniversary”)) to start from; explicit arguments override it. Returns the IAnniversary handle.
| Parameter | Type | Default |
|---|---|---|
fingerDiameter | double | 0 |
distribution | string | null |
sizeDistribution | string | null |
shape | string | null |
material | string | null |
stoneSize | double | 0 |
centerStoneSize | double | 0 |
sideStoneSize | double | 0 |
elevation | double | double.NaN |
drill | bool? | null |
topWidth | double | 0 |
topHeight | double | 0 |
bottomWidth | double | 0 |
bottomHeight | double | 0 |
profile | string | null |
interior | string | null |
bezelProfile | string | null |
bezelGemInside | double | double.NaN |
plane | Plane? | null |
element | string | null |
Returns IAnniversary.
Find
IAnniversary AnniversaryApi.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 IAnniversary.
Selected
IReadOnlyList<IAnniversary> AnniversaryApi.Selected()
IAnniversary handles for the objects of this kind currently selected in the active document.
Returns IReadOnlyList<IAnniversary>.
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.
IAnniversary
Handle — extends IParametricObject.
Anniversary band: a row of touching bezel-set stones along the top (a half eternity by default) that is the ring there, and a plain band for the rest; stones all the same size or graduated from the centre. The stones are the ring’s children and are rebuilt with it.
| Property | Type | ||
|---|---|---|---|
Bezels | IAnniversaryBezels | get | |
BottomProfile | IAnniversaryProfile | get | |
Id | Guid | get | (from IParametricObject) |
LayerName | string | get | (from IParametricObject) |
MotherGemId | Guid | get | (from IParametricObject) |
ObjectType | string | get | (from IParametricObject) |
Position | Point3d | get | (from IParametricObject) |
RingDiameterMm | double | get | |
RingSizeLabel | string | get | |
RingSizeRegion | string | get | |
Stones | IAnniversaryStones | get | |
TopProfile | IAnniversaryProfile | get |
| Method | |
|---|---|
void Delete() | (from IParametricObject) |
void Move(Vector3d translation) | (from IParametricObject) |
void SetElement(string element) | Applies a saved Anniversary element (ElementsApi.List(“Anniversary”)) to this ring: its parameters replace the current ones, the ring size stays, and the ring regenerates in place (same id). |
IAnniversaryProfile
Section.
One of the anniversary band’s two sections: Top (under the stones) and Bottom (the back of the ring); the band blends between them.
| Property | Type | ||
|---|---|---|---|
Comfort | double | get | mm, the comfort dome’s depth (used when Type is “COMFORT”) |
Height | double | get | mm, radial |
ProfileName | string | get | RING_PROFILE asset name, "" when unset |
Type | string | get | ”SOLID” or “COMFORT” |
Width | double | get | mm, along the finger |
| Method | |
|---|---|
void SetComfort(double comfort) | |
void SetHeight(double height) | |
void SetProfile(string assetName) | RING_PROFILE asset by name |
void SetType(string type) | ”SOLID” or “COMFORT” |
void SetWidth(double width) |
IAnniversaryStones
Section.
The row of stones along the top, their bezels always touching and forming the ring there (no band under them). Distribution places them as Eternity does: FULL (all round, no band), HALF, THREEQUARTERS, FIVESTONES, SEVENSTONES or NINESTONES, centred on the top. SizeDistribution UNIFORM = every stone StoneSize; GRADUATED = CenterStoneSize in the middle down to SideStoneSize at both ends, symmetric. Sizes are diameters in mm.
| Property | Type | ||
|---|---|---|---|
CenterStoneSize | double | get | mm, GRADUATED: the middle stone |
Count | int | get | stones the ring carries now (its children) |
Distribution | string | get | ”FULL”, “HALF”, “THREEQUARTERS”, “FIVESTONES”, “SEVENSTONES” or “NINESTONES” |
Drill | bool | get | a seat drilled under every stone, through the band |
Elevation | double | get | mm, how high the stones sit above the finger (the cups always run down to it) |
Material | string | get | gem material (GemCompound name: Diamond, Ruby, Sapphire…) |
Shape | string | get | gem shape: ROUND, PRINCESS, RADIANT, OVAL or EMERALD (Eternity’s) |
SideStoneSize | double | get | mm, GRADUATED: the stones at both ends |
SizeDistribution | string | get | ”UNIFORM” or “GRADUATED” |
StoneSize | double | get | mm, UNIFORM |
| Method | |
|---|---|
void SetDistribution(string distribution) | ”FULL”, “HALF”, “THREEQUARTERS”, “FIVESTONES”, “SEVENSTONES” or “NINESTONES” |
void SetDrill(bool drill) | |
void SetElevation(double elevation) | |
void SetGraduatedSizes(double centerStoneSize, double sideStoneSize) | mm, 0.5 or more each; switches to GRADUATED |
void SetMaterial(string material) | GemCompound name (Diamond, Ruby, Sapphire…) |
void SetShape(string shape) | ROUND, PRINCESS, RADIANT, OVAL or EMERALD |
void SetSizeDistribution(string sizeDistribution) | ”UNIFORM” or “GRADUATED” |
void SetStoneSize(double size) | mm, 0.5 or more; switches to UNIFORM |
IAnniversaryBezels
Section.
The bezel cup round every stone, sized to it from the profile’s proportions.
| Property | Type | ||
|---|---|---|---|
GemInside | double | get | mm the lip closes over the stone, signed |
ProfileName | string | get | BEZEL_PROFILE asset name |
| Method | |
|---|---|
void SetGemInside(double gemInside) | |
void SetProfile(string assetName) | BEZEL_PROFILE asset by name |