Scripting API
Trellis
from ArtisanPlugin.Scripting import TrellisGemsetApi as trellis
The trellis gemset: four prongs that leave the gem girdle and cross past each other on their way down to the ring, so the head reads as a woven basket seen from the side rather than four straight claws. RhinoArtisan builds the prongs between the girdle and a ring curve, adds an optional upper rail wrapping the stone, and bakes the metal as the ArtisanTrellisGemset tool does.
A trellis gemset is built around a mother gem and stays its parametric child.
Create
t = trellis.Create(gemId, prongsDiameter = 0, openingAngle = 0,
curveVerticalSeparation = 0, railWidth = 0, railHeight = 0,
rotate90 = False, ringCurveId = None) # -> ITrellisGemset
| Parameter | Default | Meaning |
|---|---|---|
gemId | - | The mother gem |
prongsDiameter | 0 -> 1.05 | Diameter of the crossing prongs, mm |
openingAngle | 0 -> 52 | How wide the prongs splay as they descend, degrees |
curveVerticalSeparation | 0 -> 5.6 | Gap between the girdle plane and the top of the auto-generated ring curve, mm |
railWidth | 0 -> 1.5 | Upper rail width, mm |
railHeight | 0 -> 1.2 | Upper rail height, mm |
rotate90 | False | Rotates the whole gemset 90 degrees about the gem’s table normal. False keeps the model’s own value |
ringCurveId | Guid.Empty | An existing document curve the prongs land on. Empty generates the default circle under the gem |
Millimetres and degrees; 0 keeps the tool default, or your saved Trellis defaults when you have some. The upper rail’s external X/Y are always re-seeded from this gem, so the rail wraps this girdle no matter what the saved defaults held.
Not every stone qualifies. Create rejects pointed and irregular outlines: PEAR, HEART, TRILLION, TRIANGLE, CALF, COFFIN and BAGUETTE.
If you pass a ringCurveId it must be a valid curve entirely below the gem girdle plane - the construction assumes the prongs descend onto it - otherwise creation raises. Leave it empty and the tool builds the panel’s own curve: a circle at the document’s finger-size radius, in the gem’s vertical plane, whose top sits curveVerticalSeparation below the girdle, oriented to the shank axis (turned to world Y when rotate90 is set).
Read-only afterwards
Create, Find and All return an ITrellisGemset handle. It carries no parametric setters - a trellis gemset is fixed once created, so changing it means deleting and rebuilding. What the handle exposes for reading:
| Member | Meaning |
|---|---|
ProngsDiameter | Diameter of the crossing prongs, mm |
OpeningAngle | Splay of the prongs, degrees |
CurveVerticalSeparation | Girdle-to-ring-curve gap, mm - only meaningful when no curve was picked |
UpperRailEnabled | Whether the rail under the girdle is on |
RingCurveId | Guid of the curve it was built on, or empty when the default curve was generated |
GemShape / GemMaterial / GemCaratWeight | Resolved live from the mother gem in the document, not from stored parameters |
Id / MotherGemId / ObjectType / LayerName / Position | The structural surface |
Move(vector) / Delete() | Translate or remove the whole group - both belong inside a Transaction |
from ArtisanPlugin.Scripting import TrellisGemsetApi as trellis
for t in trellis.All():
print(t.GemShape, t.ProngsDiameter, t.OpeningAngle, t.UpperRailEnabled)
Queries
All(), Find(id), Count(), Selected(), ByLayer(name), ForGem(gemId).