.NET API
TrilogyApi
The Trilogy settings family, headless: ArtisanTrilogyBezelSet, ArtisanTrilogyEastWest, ArtisanTrilogyHalo, ArtisanTrilogyIndividual and ArtisanTrilogyTrellis. Every one of them dresses an EXISTING Three Stones set (ThreeStonesApi.Create / ArtisanThreeStones): pass gemId (any one of its three gems — the set is resolved from its group) or gemIds with three loose gems (center + two sides, classified geometrically like the tool’s manual pick). The three gems keep their ids: unlike the panel’s Accept, nothing is rebaked here.
from ArtisanPlugin.Scripting import TrilogyApi
See also the Python package, ra.trilogy.
Methods
| Method | |
|---|---|
All | ITrilogy handles for every object of this kind in the active document (empty when there is no document). |
ByLayer | ITrilogy 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. |
CreateBezelSet | Three bezels on a Three Stones (ArtisanTrilogyBezelSet, headless): one bezel per gem, the two sides sharing the center’s parameters unless sideEdition (or any side* argument) splits them. |
CreateEastWest | Three advanced baskets on a Three Stones (ArtisanTrilogyEastWest, headless). |
CreateHalo | Three halos on a Three Stones (ArtisanTrilogyHalo, headless): the side halos share the center’s parameters unless sideEdition (or a side* argument) splits them; cutSidesWithCenter (default on) fuses the sides into the center halo, cutByRingSize trims them flush with the ring. |
CreateIndividual | One setting per slot on a Three Stones (ArtisanTrilogyIndividual, headless): centerSetting / sideSetting are TULIP, MARTINI or ADVANCED_BASKET (defaults: tulip in the center, advanced basket — a single rail — on the sides). |
CreateTrellis | Trellis gemset on a Three Stones (ArtisanTrilogyTrellis, headless): 4 shank prongs from the side gems down to the ring curve, 4 cross prongs over the center stone and three under-girdle rails. |
Find | The handle for id, or null when the id does not belong to an object of this kind. |
ForGem | ITrilogy handles whose mother gem is gemId (empty for Guid.Empty). |
Selected | ITrilogy handles for the objects of this kind currently selected in the active document. |
All
IReadOnlyList<ITrilogy> TrilogyApi.All()
ITrilogy handles for every object of this kind in the active document (empty when there is no document).
Returns IReadOnlyList<ITrilogy>.
ByLayer
IReadOnlyList<ITrilogy> TrilogyApi.ByLayer(string layerName)
ITrilogy handles on the layer with the given full path (empty when the layer does not exist).
| Parameter | Type | Default |
|---|---|---|
layerName | string | required |
Returns IReadOnlyList<ITrilogy>.
Count
int TrilogyApi.Count()
Number of objects of this kind in the active document.
Returns int.
CreateBezelSet
TrilogyResult TrilogyApi.CreateBezelSet(
Guid? gemId = null,
IEnumerable<Guid> gemIds = null,
double height = 0,
double width = 0,
double girdleHeight = 0,
double girdleWidth = 0,
double gemInside = 0,
string profile = null,
int supportCount = 0,
bool? sideEdition = null,
double sideHeight = 0,
double sideWidth = 0,
double sideGirdleHeight = 0,
double sideGirdleWidth = 0,
bool? cutByRingSize = null,
bool? cutByRingSizeSides = null,
string element = null)
Three bezels on a Three Stones (ArtisanTrilogyBezelSet, headless): one bezel per gem, the two sides sharing the center’s parameters unless sideEdition (or any side* argument) splits them. mm; 0 = the tool/saved default (height 3.8, width 1.5, girdle 0.3 x 1.5). profile names a BEZEL_PROFILE asset; cutByRingSize trims the bezels flush with the ring size. Returns the TrilogyResult (ids).
| Parameter | Type | Default |
|---|---|---|
gemId | Guid? | null |
gemIds | IEnumerable<Guid> | null |
height | double | 0 |
width | double | 0 |
girdleHeight | double | 0 |
girdleWidth | double | 0 |
gemInside | double | 0 |
profile | string | null |
supportCount | int | 0 |
sideEdition | bool? | null |
sideHeight | double | 0 |
sideWidth | double | 0 |
sideGirdleHeight | double | 0 |
sideGirdleWidth | double | 0 |
cutByRingSize | bool? | null |
cutByRingSizeSides | bool? | null |
element | string | null |
Returns TrilogyResult.
CreateEastWest
TrilogyResult TrilogyApi.CreateEastWest(
Guid? gemId = null,
IEnumerable<Guid> gemIds = null,
string preset = null,
string sidePreset = null,
string prongMode = null,
double prongDiameter = 0,
double prongHeight = 0,
double railWidth = 0,
double railHeight = 0,
string railProfile = null,
bool? sideEdition = null,
string element = null)
Three advanced baskets on a Three Stones (ArtisanTrilogyEastWest, headless). Each basket takes its gem shape’s default prong layout (emerald -> 4 corners, trillion -> 3 vertices…) unless preset / sidePreset name another one (AdvancedBasketApi.Presets names, e.g. PRONG_ROUND_6, or a 1-based index). Sides share the center’s basket when both shapes match; different shapes (or sideEdition) give them their own. mm; 0 = default. Returns the TrilogyResult.
| Parameter | Type | Default |
|---|---|---|
gemId | Guid? | null |
gemIds | IEnumerable<Guid> | null |
preset | string | null |
sidePreset | string | null |
prongMode | string | null |
prongDiameter | double | 0 |
prongHeight | double | 0 |
railWidth | double | 0 |
railHeight | double | 0 |
railProfile | string | null |
sideEdition | bool? | null |
element | string | null |
Returns TrilogyResult.
CreateHalo
TrilogyResult TrilogyApi.CreateHalo(
Guid? gemId = null,
IEnumerable<Guid> gemIds = null,
double stoneSize = 0,
double stoneDistance = 0,
double distanceToGem = 0,
double channelWidth = 0,
double channelHeight = 0,
string prongType = null,
string profile = null,
bool? cutByRingSize = null,
bool? cutSidesWithCenter = null,
bool? sideEdition = null,
double sideStoneSize = 0,
double sideStoneDistance = 0,
double sideChannelWidth = 0,
double sideChannelHeight = 0,
Guid? ringCurveId = null,
string element = null,
string prongMode = null)
Three halos on a Three Stones (ArtisanTrilogyHalo, headless): the side halos share the center’s parameters unless sideEdition (or a side* argument) splits them; cutSidesWithCenter (default on) fuses the sides into the center halo, cutByRingSize trims them flush with the ring. Gems must be halo-friendly (ROUND, CUSHION, EMERALD, OVAL, RADIANT, ASSCHER, PEAR). mm; 0 = default (stone 1.2, distance 0.2, channel 1.8 x 1.5). profile = CHANNEL_PROFILE asset. prongMode = the three stones’ prongs: ROUND, CUSTOM or CLAW (claw tips in Render mode only). Returns the TrilogyResult (halo stones in StoneIds).
| Parameter | Type | Default |
|---|---|---|
gemId | Guid? | null |
gemIds | IEnumerable<Guid> | null |
stoneSize | double | 0 |
stoneDistance | double | 0 |
distanceToGem | double | 0 |
channelWidth | double | 0 |
channelHeight | double | 0 |
prongType | string | null |
profile | string | null |
cutByRingSize | bool? | null |
cutSidesWithCenter | bool? | null |
sideEdition | bool? | null |
sideStoneSize | double | 0 |
sideStoneDistance | double | 0 |
sideChannelWidth | double | 0 |
sideChannelHeight | double | 0 |
ringCurveId | Guid? | null |
element | string | null |
prongMode | string | null |
Returns TrilogyResult.
CreateIndividual
TrilogyResult TrilogyApi.CreateIndividual(
Guid? gemId = null,
IEnumerable<Guid> gemIds = null,
string centerSetting = null,
string sideSetting = null,
double centerRotation = double.NaN,
double sideRotation = double.NaN,
int tulipProngs = 0,
string railProfile = null,
bool? scaleSettingToGem = null,
Guid? ringCurveId = null,
string element = null,
string prongMode = null)
One setting per slot on a Three Stones (ArtisanTrilogyIndividual, headless): centerSetting / sideSetting are TULIP, MARTINI or ADVANCED_BASKET (defaults: tulip in the center, advanced basket — a single rail — on the sides). centerRotation / sideRotation spin each setting about its gem (degrees; default 45 for a ROUND center, 0 otherwise); tulipProngs 4 or 6. prongMode ROUND or CLAW on whichever setting each slot uses (claw tips in Render mode only). Returns the TrilogyResult.
| Parameter | Type | Default |
|---|---|---|
gemId | Guid? | null |
gemIds | IEnumerable<Guid> | null |
centerSetting | string | null |
sideSetting | string | null |
centerRotation | double | double.NaN |
sideRotation | double | double.NaN |
tulipProngs | int | 0 |
railProfile | string | null |
scaleSettingToGem | bool? | null |
ringCurveId | Guid? | null |
element | string | null |
prongMode | string | null |
Returns TrilogyResult.
CreateTrellis
TrilogyResult TrilogyApi.CreateTrellis(
Guid? gemId = null,
IEnumerable<Guid> gemIds = null,
double shankProngDiameter = 0,
double crossProngDiameter = 0,
double railWidth = 0,
double railHeight = 0,
double railUnderGirdle = 0,
bool? centerRail = null,
bool? sideRails = null,
double curveVerticalSeparation = 0,
bool? sideRailEdition = null,
double sideRailWidth = 0,
double sideRailHeight = 0,
Guid? ringCurveId = null,
string element = null,
string prongMode = null)
Trellis gemset on a Three Stones (ArtisanTrilogyTrellis, headless): 4 shank prongs from the side gems down to the ring curve, 4 cross prongs over the center stone and three under-girdle rails. The ring curve is the set’s finger circle, ringCurveId (must sit below the gems) or a circle at the document size. mm; 0 = default (prongs 1.05, rail 1.0 x 0.9, under girdle 1.45). prongMode ROUND or CLAW, the top of every prong (claw tips in Render mode only). Returns the TrilogyResult.
| Parameter | Type | Default |
|---|---|---|
gemId | Guid? | null |
gemIds | IEnumerable<Guid> | null |
shankProngDiameter | double | 0 |
crossProngDiameter | double | 0 |
railWidth | double | 0 |
railHeight | double | 0 |
railUnderGirdle | double | 0 |
centerRail | bool? | null |
sideRails | bool? | null |
curveVerticalSeparation | double | 0 |
sideRailEdition | bool? | null |
sideRailWidth | double | 0 |
sideRailHeight | double | 0 |
ringCurveId | Guid? | null |
element | string | null |
prongMode | string | null |
Returns TrilogyResult.
Find
ITrilogy TrilogyApi.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 ITrilogy.
ForGem
IReadOnlyList<ITrilogy> TrilogyApi.ForGem(Guid gemId)
ITrilogy handles whose mother gem is gemId (empty for Guid.Empty).
| Parameter | Type | Default |
|---|---|---|
gemId | Guid | required |
Returns IReadOnlyList<ITrilogy>.
Selected
IReadOnlyList<ITrilogy> TrilogyApi.Selected()
ITrilogy handles for the objects of this kind currently selected in the active document.
Returns IReadOnlyList<ITrilogy>.
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.
ITrilogy
Handle — extends IParametricGroup, IParametricObject.
The five Trilogy settings (bezel set, east-west, halo, individual, trellis) dressed over a Three Stones.
| Property | Type | ||
|---|---|---|---|
CenterGemId | Guid | get | |
Id | Guid | get | (from IParametricObject) |
LayerName | string | get | (from IParametricObject) |
MemberCount | int | get | Rhino objects in the group (from IParametricGroup) |
MotherGemId | Guid | get | (from IParametricObject) |
ObjectType | string | get | (from IParametricObject) |
ParametersJson | string | get | the kernel model, as stored in the group (from IParametricGroup) |
Position | Point3d | get | (from IParametricObject) |
RingCurveId | Guid | get | |
SideAGemId | Guid | get | |
SideBGemId | Guid | get | |
Style | string | get | BEZEL_SET | EAST_WEST | HALO | INDIVIDUAL | TRELLIS |
| Method | |
|---|---|
void Delete() | (from IParametricObject) |
string GetParameter(string path) | dotted JSON path; null when absent (from IParametricGroup) |
void Move(Vector3d translation) | (from IParametricObject) |
void Regenerate() | |
void SetElement(string element) | Applies a saved element of this trilogy’s own style (ElementsApi.List (“TrilogyHalo”) for a HALO…) in place: the gems stay, a preset of another style is rejected, and the trilogy regenerates (same id). |
void SetParameter(string path, string value) | regenerates in place (same id) |