Skip to content

Scripting API

Pavé shank

from ArtisanPlugin.Scripting import PaveShankApi as multirow, PaveShankBuilderApi as multirowbuilder

A classic band with one profile and one size, carrying from 1 to 9 rows of round pavé stones on its outer surface. With 3+ rows the two outermost rows are lateral (their own stone size) and the rest central; the row pitch is automatic, neighbouring rows are staggered, and a bead goes into every hollow. See Pavé Shank (the ArtisanPaveShank command) for the design side.

Create

PaveShankBuilderApi.Create builds one headless, as the ArtisanPaveShank panel would. Every argument is optional; 0 (or None) keeps the tool default or your saved defaults:

ArgumentDefault
width, height3, 2Band section, mm
fingerDiameterdocumentInner diameter, mm
profilehalf-roundRING_PROFILE asset name
opening"NONE""NONE", "STRANGLE" or "CUT"
layoutMode"TOP_ANGLE""FULL", "SIDE_ANGLE" (startAngle / endAngle, 30–150) or "TOP_ANGLE" (topAngle, 120)
rows31 to 9
rowDistance0.1Gap between the stones of adjacent rows, edge to edge
gemSize / lateralGemSize1.6 / 1.3Central and lateral stone sizes
minDistance0.1Gap between stones along a row
prongDiameter0.8Every bead shares one size
withGems / withCutterstrue / falseBand alone, or with a drill cutter per stone
planeworld XY
element-Saved MultiRowShank element to start from; explicit arguments override it
import rhinoartisan as ra

ring = ra.pave_shank.create(width=4.5, rows=5, gem_size=1.5, lateral_gem_size=1.2,
                                 layout_mode="FULL", with_cutters=True)

Edit

IPaveShank exposes the band and the multi-row specifics. Each setter regenerates the shank in place, re-baking stones, beads and cutters:

SectionWhat it edits
TopProfile / AdvancedThe band (its one profile) and the classic opening, the same sections as Classic
RowsHow many rows, the row distance, the lateral stone size and the layout (full, side angles, top angle)
GemsCentral stone size, gap along the row, Move in Z and the bead options (TypeProng NONE/SHARED, bead length, Over girdle, Gem inside, Extension Manufacturing)
ProngThe bead diameter and the two offsets: SetEdgeOffset (beads on the band edges) and SetEndOffset (bead past each row end)
GemsEnabled / CuttersEnabledMaster toggles
from ArtisanPlugin.Scripting import PaveShankApi as multirow, Transaction

ring = multirow.Selected()[0]
with Transaction.Begin("Four rows, beads pulled in at the ends"):
    ring.Rows.SetCount(4)
    ring.Rows.SetLateralGemSize(1.2)
    ring.Prong.SetEndOffset(-0.1)

The MCP assistant uses the same builder through create_pave_shank, and edits the result with edit_object.

Queries

All(), Find(id), Count(), Selected(), ByLayer(name).