Scripting API
Contour band
from ArtisanPlugin.Scripting import ContourBandApi as contour, ContourBandBuilderApi as contour_builder
A band shaped to sit against an existing ring (the “mother”), so the pair stacks without a gap.
Create
ContourBandBuilderApi.Create(ringIds, ...) builds the band against the ring whose ids you pass (its solids, or an Artisan shank); see ContourBandBuilderApi for the arguments. The MCP tool is create_contour_band. Until October 2026 this was the Matching Shank (MatchingShankApi).
Edit
The IContourBand handle is flat plus a gems section; each setter regenerates the shank in place, re-baking gems and prongs (and both bands when BothSides is on):
| Group | What it edits |
|---|---|
| The fit | Clearance, Distance (negative presses into the mother), TopDistance, NumberOfPoints, FlipSide, BothSides, and per-section SectionDeltas |
| The band | Profile asset, top and bottom sections, interior type (solid or comfort) and comfort depth |
Gems | The row: distribution (full, side, top) with its angles, size, spacing, channel top and bottom, a stone-size gradient, prongs (top/bottom diameters, growth, end count) and drills |
Read-only outputs: MotherRingIds, RingCurveId, CurveFromRingSize, SectionContactOffsets (what the last computation measured).
from ArtisanPlugin.Scripting import ContourBandApi as contour, Transaction
shank = contour.Selected()[0]
with Transaction.Begin("Tighter fit, stones on the sides"):
shank.SetClearance(0.15)
shank.Gems.SetEnabled(True)
shank.Gems.SetDistribution("SIDE")
shank.Gems.SetSideAngles(30, 150)
Queries
All(), Find(id), Count(), Selected(), ByLayer(name). Plus ForRing(ringId) - the contour bands fitted against a given ring.