.NET API
ClassicApi
Classic ring shanks: comfort-fit bands at the document finger size, optionally with a stone row.
from ArtisanPlugin.Scripting import ClassicApi
See also the guide, Shanks › Classic, and the Python package, ra.classic.
Methods
| Method | |
|---|---|
All | IClassic handles for every object of this kind in the active document (empty when there is no document). |
ByLayer | IClassic handles on the layer with the given full path (empty when the layer does not exist). |
Count | Number of objects of this kind in the active document. |
Create | Builds a classic ring shank (the ArtisanClassic tool, headless): a comfort-fit band at the document’s finger size, optionally with a row of gems around the top. |
Find | The handle for id, or null when the id does not belong to an object of this kind. |
Selected | Classics currently selected in the active doc. |
All
IReadOnlyList<IClassic> ClassicApi.All()
IClassic handles for every object of this kind in the active document (empty when there is no document).
Returns IReadOnlyList<IClassic>.
ByLayer
IReadOnlyList<IClassic> ClassicApi.ByLayer(string layerName)
IClassic handles on the layer with the given full path (empty when the layer does not exist).
| Parameter | Type | Default |
|---|---|---|
layerName | string | required |
Returns IReadOnlyList<IClassic>.
Count
int ClassicApi.Count()
Number of objects of this kind in the active document.
Returns int.
Create
IClassic ClassicApi.Create(
double width = 0,
double height = 0,
double fingerDiameter = 0,
bool withGems = false,
double gemSize = 0,
double gemsAngle = 0,
string profile = null,
Plane? plane = null,
string element = null,
int gemsCount = 0)
Builds a classic ring shank (the ArtisanClassic tool, headless): a comfort-fit band at the document’s finger size, optionally with a row of gems around the top. This is the scriptable way to give a design its ring body. Millimetres; 0 keeps the tool default (or the user’s saved defaults): width 3, height 2. fingerDiameter 0 = the document’s configured finger size. withGems true enables the gem row (gemSize default 1.2 mm, gemsAngle default 180 degrees of the shank covered). profile picks a RING_PROFILE asset by name; omitted = the default profile. plane omitted = world XY. Returns an IClassic handle to the new shank. element = name of a saved Classic element (ElementsApi.List(“Classic”)) to start from instead of the tool defaults; explicit arguments override it. gemsCount > 0 = exactly that many gems (per side when the band has an opening, the whole row when it has none; implies withGems; the angle is derived and gemsAngle is ignored).
| Parameter | Type | Default |
|---|---|---|
width | double | 0 |
height | double | 0 |
fingerDiameter | double | 0 |
withGems | bool | false |
gemSize | double | 0 |
gemsAngle | double | 0 |
profile | string | null |
plane | Plane? | null |
element | string | null |
gemsCount | int | 0 |
Returns IClassic.
Find
IClassic ClassicApi.Find(Guid id)
The handle for id, or null when the id does not belong to an object of this kind.
| Parameter | Type | Default |
|---|---|---|
id | Guid | required |
Returns IClassic.
Selected
IReadOnlyList<IClassic> ClassicApi.Selected()
Classics currently selected in the active doc.
Returns IReadOnlyList<IClassic>.
Handles and sections
What the methods above hand back. A handle’s setters regenerate the object; wrap changes in a Transaction so they land as one undo step.
Also used here: IClassicProfile, IDrillCutter, IClassicAdvanced.
IClassic
Handle — extends IParametricObject.
Classic ring shank (multiple gems possible) — no single MotherGem.
| Property | Type | ||
|---|---|---|---|
Advanced | IClassicAdvanced | get | |
BottomProfile | IClassicProfile | get | |
DrillCutter | IDrillCutter | get | The ROUND drill (Gems.DrillType ROUND): a cutter shaped on each stone. Classic only. |
ExternalProfile | IClassicExternalProfile | get | |
Gems | IClassicGems | get | |
Id | Guid | get | (from IParametricObject) |
LayerName | string | get | (from IParametricObject) |
MidProfile | IClassicProfile | get | |
MotherGemId | Guid | get | (from IParametricObject) |
MountingHoles | IClassicMountingHoles | get | Gemset mounting holes: the peg holes (and flat seat) at the top of the band |
ObjectType | string | get | (from IParametricObject) |
Position | Point3d | get | (from IParametricObject) |
RemoveChannel | bool | get | Gems.ProngType SHARED and SCALLOPED: true drops the channel under the stones (FLUSH never has it). Classic only: Two Rows and Pavé share the gems section but not this. |
RingDiameterMm | double | get | |
RingSizeLabel | string | get | |
RingSizeRegion | string | get | |
TopProfile | IClassicProfile | get | Parameter sections — each is a live view over the shank’s stored parameters; their setters regenerate the shank in place (same Guid) and call LicenseGate.RequireValid() first. Millimetres. |
| Method | |
|---|---|
void Delete() | (from IParametricObject) |
void Move(Vector3d translation) | (from IParametricObject) |
void SetElement(string element) | Applies a saved Classic element (ElementsApi.List(“Classic”)) to this shank: its parameters replace the current ones, the ring size stays, and the shank regenerates in place (same id). |
void SetHeight(double height) | |
void SetRemoveChannel(bool remove) | |
void SetWidth(double width) | Shortcuts for the two most common edits — same effect as TopProfile.SetWidth / TopProfile.SetHeight. |
IClassicMountingHoles
Section.
Gemset mounting holes: the peg holes drilled radially into the top of the band where a peg head is set and soldered, plus an optional flat seat for its base. Lengths in mm along the outer surface of the band from the top centre.
| Property | Type | ||
|---|---|---|---|
Depth | double | get | mm from the surface of the band; capped so a wall stays over the finger; ignored when Through |
Diameter | double | get | mm, the peg diameter |
Distance | double | get | mm, centre to centre between the two holes along the band (DOUBLE) |
FlatSeat | bool | get | true: a flat seat is milled on the top of the band for the gemset base |
Mode | string | get | ”NONE” (no holes), “SINGLE” (one peg at the centre) or “DOUBLE” (two pegs, Distance apart) |
Offset | double | get | mm, signed shift of the holes and the seat along the band from the top centre |
SeatLength | double | get | mm, the chord of the flat seat along the band |
Through | bool | get | true: the holes go through to the finger |
| Method | |
|---|---|
void SetDepth(double depth) | |
void SetDiameter(double diameter) | |
void SetDistance(double distance) | |
void SetFlatSeat(bool flatSeat) | |
void SetMode(string mode) | ”NONE”, “SINGLE” or “DOUBLE” |
void SetOffset(double offset) | mm, signed |
void SetSeatLength(double length) | |
void SetThrough(bool through) |
IClassicGems
Section.
The gems row a shank can carry around its band.
| Property | Type | ||
|---|---|---|---|
Angle | double | get | degrees of the band covered by gems (180 = top half) |
AutomaticProngDiameter | bool | get | |
AutomaticProngDistance | bool | get | SHARED: true, the two prongs of a gap sit where they fit tangent to the stones and the channel edges (they follow the channel width); false, at ProngDistance |
BrightCut | double | get | bright-cut width, mm |
Count | int | get | number of gems in “COUNT” mode: per side when the band has an opening (Cut / Strangle), the whole row when it has none |
DrillAllowIntersection | bool | get | |
DrillHeight | double | get | mm |
DrillType | string | get | ”NONE”, “ROUND” or “QUAD” |
DrillWidth | double | get | mm |
Enabled | bool | get | |
ExtensionForManufacturing | double | get | mm |
GemInside | double | get | how deep the gems sit inside, mm |
GemShape | string | get | ”ROUND”, “PRINCESS”, … |
GemSize | double | get | mm |
InnerHeight | double | get | inner channel height, mm |
InnerWidth | double | get | inner channel width, mm |
Margin | double | get | side margin, mm |
MinDistance | double | get | minimum distance between gems, mm |
Mode | string | get | ”ANGLE” (the gems cover Angle, the count follows) or “COUNT” (exactly Count gems, the angle follows) |
ProngDiameter | double | get | mm — used when AutomaticProngDiameter is false |
ProngDistance | double | get | SHARED, mm: centre-to-centre distance across the channel between the two prongs of a gap when AutomaticProngDistance is false; 0 = a single prong on the centre line |
ProngHeight | double | get | mm |
ProngMoveInZ | double | get | mm |
ProngType | string | get | ”NONE” (channel), “SHARED” or “SCALLOPED”; the Classic also “FLUSH” (no channel) |
SplitRunAtTop | bool | get | Closed band only: true, the gem run is opened at the top of the band so Margin is measured from the top centre down each side (the band stays closed); false, the run crosses the top |
Vertical | double | get | vertical displacement of the row, mm |
| Method | |
|---|---|
void SetAngle(double degrees) | |
void SetAutomaticProngDiameter(bool automatic) | |
void SetAutomaticProngDistance(bool automatic) | see AutomaticProngDistance |
void SetBrightCut(double brightCut) | |
void SetCount(int count) | Exact number of gems (switches the mode to “COUNT”) |
void SetDrillAllowIntersection(bool allow) | |
void SetDrillHeight(double height) | |
void SetDrillType(string drillType) | ”NONE”, “ROUND” or “QUAD” |
void SetDrillWidth(double width) | |
void SetEnabled(bool enabled) | |
void SetExtensionForManufacturing(double extension) | |
void SetGemInside(double gemInside) | |
void SetGemShape(string shape) | |
void SetGemSize(double size) | |
void SetInnerHeight(double height) | |
void SetInnerWidth(double width) | |
void SetMargin(double margin) | |
void SetMinDistance(double distance) | |
void SetMode(string mode) | ”ANGLE” or “COUNT” |
void SetProngDiameter(double diameter) | |
void SetProngDistance(double distance) | mm, 0 or more (0 = one prong per gap on the centre line); used when AutomaticProngDistance is false |
void SetProngHeight(double height) | |
void SetProngMoveInZ(double move) | |
void SetProngType(string prongType) | ”NONE” (channel), “SHARED” or “SCALLOPED”; the Classic also “FLUSH” (no channel). Switching to “SCALLOPED” turns the channel off (RemoveChannel true); SetRemoveChannel(false) brings it back |
void SetSplitRunAtTop(bool split) | see SplitRunAtTop; only acts with the NONE opening |
void SetVertical(double vertical) |
IClassicExternalProfile
Section.
The optional external profile carved on the shank’s outside face.
| Property | Type | ||
|---|---|---|---|
Bottom | double | get | external height at the bottom, mm |
Enabled | bool | get | |
Mid | double | get | external height at the middle, mm |
ProfileName | string | get | EXTERNAL_RING_PROFILE asset name, "" when unset |
Top | double | get | external height at the top, mm |
| Method | |
|---|---|
void SetBottom(double height) | |
void SetEnabled(bool enabled) | |
void SetMid(double height) | |
void SetProfile(string assetName) | EXTERNAL_RING_PROFILE asset by name — list them with AssetsApi.List(“EXTERNAL_RING_PROFILE”) |
void SetTop(double height) |