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.
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)