Scripting API
Gemsets
Every setting in the Diamonds ribbon, headless. Each has its own page: what its facade can create, and what its handle can edit afterwards.
BezelA metal rim wrapped around the mother gem.
Advanced bezelThe advanced variant of the bezel tool.
PegheadThe pronged head; negative counts rotate the prongs.
BasketProngs and rails — one basket per gem.
Advanced basketBaskets with prong modes: ROUND, CUSTOM, OFFSET, DOUBLE, CLAW, TRIPLE.
HaloA ring of small stones around the mother gem.
Hidden haloThe halo under the head, on its channel profile.
ClusterThe cluster setting, with its prongs and rail.
TulipThe tulip setting — 4 or 6 prongs.
MartiniThe martini setting, with optional side gems.
TrellisThe trellis setting: crossing prongs and rail.
CabochonA domed, unfaceted stone — creates its own stone.
PearlA pearl with optional calotte cap and wire post.
CuttersThe drilling/cutting solids gem seats are built from.
Gems on curveIdentical gems distributed along a curve.
Gems by networkGems distributed over a network of curves.
ChannelA channel setting along an open or closed curve.
Pave on surfaceFill a surface with diamonds automatically.
Micro settingThe pavé infrastructure: cutters, V-cutters, channel, row prongs.
Conventions
Everything follows the house rules: millimetres, 0 keeps the tool default (or your saved defaults), profiles resolve by asset name, and mutations belong inside a Transaction.
Unless a page says otherwise, each setting is built around a mother gem and stays its parametric child.
Prong modes and claws
Every setting with prongs takes the same prongMode, at creation and on its handle (ProngMode / SetProngMode; prong_mode in Python and over MCP):
| Value | Prongs |
|---|---|
ROUND | The plain round prong, the default. DEFAULT and CIRCLE are read as ROUND |
CUSTOM | A profile section: pass a CLOSED_PROFILE asset (a profile alone asks for CUSTOM) |
CLAW | Claw tips |
| Setting | Modes |
|---|---|
| Basket, Martini, Halo (the mother gem’s prongs) | ROUND, CUSTOM, CLAW |
| Advanced basket | Also OFFSET, DOUBLE and TRIPLE, on every prong. ProngMode reads MIXED when the panel’s per-prong editor left them different |
| Tulip, Trellis | ROUND, CLAW |
| Trilogies | CreateHalo and CreateEastWest like their settings; CreateIndividual and CreateTrellis ROUND or CLAW |
Claw tips are built in Render mode only: in Production mode the prongs come out without them (the Outliner’s Rendering/Manufacturing selector, DocumentApi.SetComputationMode).
The claw of the martini, advanced basket, tulip and trellis shares four values, with the same meaning on all four:
| Value | Meaning |
|---|---|
ClawCapDistance | mm the apex is pulled in toward the gem centre |
ClawCapHeight | mm the apex moves up (+) or down (-) |
ClawTipWidth | Apex thickness as a fraction of the prong: 0 a sharp point, 1 the full tube |
ClawTipSmoothness | Body-to-tip blend, 0 to 1 |
On the tulip the cap distance and height scale with the stone, and ClawTipLength sets how long the tip is. The trellis panel shows the four values as adjustments from 0; scripts read and write the claw actually built. The basket and the halo keep their classic claw under their own Claw* values: the basket in its Prong section (ClawGemInside, ClawHeight, ClawTension, ClawOnCurve), the halo on its handle (ClawGemInside, ClawTipDistance, ClawTipHeight, ClawTipWidth, ClawTension). A new halo set to CLAW starts from the tool’s claw values.
from ArtisanPlugin.Scripting import MartiniApi as martini, HaloApi as halo, GemApi as gem, Transaction
stones = gem.Selected()
with Transaction.Begin("Claw settings"):
m = martini.Create(stones[0].Id, prongMode = "CLAW")
h = halo.Create(stones[1].Id, prongMode = "CLAW")
m.SetClawTipWidth(0.2)
h.SetClawTension(70)
The three families
The settings split into three groups, and the difference decides what you pass in and what you get back.
| Family | Pages | Built around |
|---|---|---|
| Single-gem settings | Bezel, Advanced bezel, Peghead, Basket, Advanced basket, Halo, Hidden halo, Cluster, Tulip, Martini, Trellis | An existing mother gem — ForGem(gemId) finds them back |
| Standalone stone creators | Cabochon, Pearl | Nothing — they create their own stone at a point |
| Many stones at once | Gems on curve, Gems by network, Channel, Pave on surface, Micro setting | A curve, a surface or a run of small gems |
Cutters sit slightly apart: they are the drilling solids a seat is built from, one per gem, and you subtract them from the metal yourself.
What each one can do
Almost every setting can be built from scratch. What differs is how much of it you can still change afterwards: some handles regenerate the object through setters, others are read-only once created — run the tool in the UI to get a variant the script cannot reach.
| Setting | Facade | Create | Edit |
|---|---|---|---|
| Bezel | BezelApi | yes | full |
| Advanced bezel | AdvancedBezelApi | yes | read-only |
| Peghead | PegheadApi | yes | full |
| Basket | BasketApi | yes, one per gem | prongs only |
| Advanced basket | AdvancedBasketApi | yes, one per gem | prongs and rails |
| Halo | HaloApi | yes | stone size and spacing |
| Hidden halo | HiddenHaloApi | yes | stone size and spacing |
| Cluster | ClusterApi | yes | read-only |
| Tulip | TulipApi | yes | pipe and height |
| Martini | MartiniApi | yes | prong height, side gems |
| Trellis | TrellisGemsetApi | yes | read-only |
| Cabochon | CabochonApi | yes, standalone stone | read-only |
| Pearl | PearlApi | yes, standalone stone | read-only |
| Cutters | CutterApi | yes, one per gem | read-only |
| Gems on curve | GemsOnCurveApi | yes | read-only |
| Gems by network | GemsByNetworkApi | - | read-only |
| Channel | ChannelApi | yes, returns ids | no handle |
| Pave on surface | PaveApi | yes, returns gem ids | no handle |
| Micro setting | MicroSettingApi | yes, returns ids | read-only |
Gems by network is the one setting with no Create: build the network in Rhino, then read, move and delete it from a script.
The shared surface
Every setting facade shares the same query surface — All(), Find(id), Count(), Selected(), ByLayer(name), plus ForGem(gemId) on single-gem settings and ForCurve(curveId) on curve-driven ones.
Handles share a structural base (Id, MotherGemId, ObjectType, LayerName, Position, Move, Delete); settings that wrap one gem also expose that gem’s GemShape, GemMaterial and GemCaratWeight.
On multi-gem objects (eternities, shanks, micro-settings) MotherGemId is empty by design; for curve-driven settings the parent is CurveId.
from ArtisanPlugin.Scripting import BezelApi as bezel
for b in bezel.All():
print(b.Id, b.GemShape, b.GemCaratWeight)