Skip to content

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
ParameterDefaultMeaning
gemId-The mother gem
prongsDiameter0 -> 1.05Diameter of the crossing prongs, mm
openingAngle0 -> 52How wide the prongs splay as they descend, degrees
curveVerticalSeparation0 -> 5.6Gap between the girdle plane and the top of the auto-generated ring curve, mm
railWidth0 -> 1.5Upper rail width, mm
railHeight0 -> 1.2Upper rail height, mm
rotate90FalseRotates the whole gemset 90 degrees about the gem’s table normal. False keeps the model’s own value
prongModeNone -> ROUNDThe top of every prong: ROUND or CLAW - see Prong modes and claws
ringCurveIdGuid.EmptyAn 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).

Edit

Create, Find and All return an ITrellisGemset handle. Its setters regenerate the trellis in place, keeping its Guid: the prong mode and the claw (see Prong modes and claws), the bottom profile, the prong diameter and opening angle, the rail and more - the handle page lists them all. Among what it reads:

MemberMeaning
ProngsDiameterDiameter of the crossing prongs, mm
OpeningAngleSplay of the prongs, degrees
CurveVerticalSeparationGirdle-to-ring-curve gap, mm - only meaningful when no curve was picked
UpperRailEnabledWhether the rail under the girdle is on
ProngModeROUND or CLAW, the top of every prong
RingCurveIdGuid of the curve it was built on, or empty when the default curve was generated
GemShape / GemMaterial / GemCaratWeightResolved live from the mother gem in the document, not from stored parameters
Id / MotherGemId / ObjectType / LayerName / PositionThe 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).