Scripting API
Classic
from ArtisanPlugin.Scripting import ClassicApi as classic
The comfort-fit band - the scriptable ring body for most designs.
Create
ring = classic.Create(width = 3, height = 2, fingerDiameter = 0,
withGems = False, gemSize = 1.2, gemsAngle = 180,
profile = None, plane = Plane.WorldXY) # -> IClassic
| Parameter | Default | Meaning |
|---|---|---|
width | 3 | Band width |
height | 2 | Band height |
fingerDiameter | 0 | 0 = the document’s configured ring size |
withGems | False | Adds a row of stones around the top of the band |
gemSize | 1.2 | Stone size of the row, mm |
gemsAngle | 180 | Degrees of the shank covered by the row |
profile | None | RING_PROFILE asset by name |
plane | Plane.WorldXY | Placement plane |
The gems and their prongs are baked as child objects of the shank.
Edit
Create, Find and All return an IClassic handle. Its six sections cover the whole tool; each setter regenerates the shank in place, keeping its Guid and undo intact:
| Section | What it edits |
|---|---|
TopProfile / MidProfile / BottomProfile | The three band sections: profile asset, closing type, width/height, thickness, comfort, rotation, displacement, orientation |
ExternalProfile | The profile carved on the outside face |
Advanced | The opening at the bottom: none, cut or strangle |
Gems | The gems row: shape, size, arc, spacing, channel, prongs, drills |
SetWidth / SetHeight are shortcuts for the top profile.
from ArtisanPlugin.Scripting import ClassicApi as classic, Transaction
ring = classic.Selected()[0]
with Transaction.Begin("Slimmer band with a gem row"):
ring.TopProfile.SetWidth(2.2)
ring.Gems.SetEnabled(True)
ring.Gems.SetAngle(200)
Queries
All(), Find(id), Count(), Selected(), ByLayer(name).