.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)
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.
| 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 |
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.
IClassic
Handle — extends IParametricObject.
Classic ring shank (multiple gems possible) — no single MotherGem.
| Property | Type | ||
|---|---|---|---|
Advanced | IClassicAdvanced | get | |
BottomProfile | IClassicProfile | get | |
ExternalProfile | IClassicExternalProfile | get | |
Gems | IClassicGems | get | |
Id | Guid | get | (from IParametricObject) |
LayerName | string | get | (from IParametricObject) |
MidProfile | IClassicProfile | get | |
MotherGemId | Guid | get | (from IParametricObject) |
ObjectType | string | get | (from IParametricObject) |
Position | Point3d | get | (from IParametricObject) |
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 SetWidth(double width) | Shortcuts for the two most common edits — same effect as TopProfile.SetWidth / TopProfile.SetHeight. |
IClassicProfile
Section.
One of the shank’s three section profiles (top / mid / bottom). The top profile is always enabled; mid and bottom are optional.
| Property | Type | ||
|---|---|---|---|
Comfort | double | get | mm — used when Type is “COMFORT” |
Displacement | double | get | mm |
Enabled | bool | get | |
Height | double | get | mm |
Orientation | int | get | 0 = Natural, 1 = Reverse (flips the profile curve) |
ProfileName | string | get | RING_PROFILE asset name, "" when unset |
Rotation | double | get | degrees |
Thickness | double | get | mm — used when Type is “THICKNESS” |
Type | string | get | ”SOLID”, “COMFORT” or “THICKNESS” |
Width | double | get | mm |
| Method | |
|---|---|
void SetComfort(double comfort) | |
void SetDisplacement(double displacement) | |
void SetEnabled(bool enabled) | |
void SetHeight(double height) | |
void SetOrientation(int orientation) | |
void SetProfile(string assetName) | RING_PROFILE asset by name — list them with AssetsApi.List(“RING_PROFILE”) |
void SetRotation(double degrees) | |
void SetThickness(double thickness) | |
void SetType(string type) | ”SOLID”, “COMFORT” or “THICKNESS” |
void SetWidth(double width) |
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 | |
BrightCut | double | get | bright-cut width, mm |
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 |
ProngDiameter | double | get | mm — used when AutomaticProngDiameter is false |
ProngHeight | double | get | mm |
ProngMoveInZ | double | get | mm |
ProngType | string | get | ”NONE”, “SHARED” or “SCALLOPED” |
Vertical | double | get | vertical displacement of the row, mm |
| Method | |
|---|---|
void SetAngle(double degrees) | |
void SetAutomaticProngDiameter(bool automatic) | |
void SetBrightCut(double brightCut) | |
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 SetProngDiameter(double diameter) | |
void SetProngHeight(double height) | |
void SetProngMoveInZ(double move) | |
void SetProngType(string prongType) | ”NONE”, “SHARED” or “SCALLOPED” |
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) |
IClassicAdvanced
Section.
The classic shank’s Advanced section: the opening at the bottom of the band.
| Property | Type | ||
|---|---|---|---|
CutBumping | double | get | mm — used when OpeningType is “CUT” |
CutLength | double | get | mm — used when OpeningType is “CUT” |
OpeningType | string | get | ”NONE”, “CUT” or “STRANGLE” |
StrangleBaseX | double | get | mm |
StrangleBaseY | double | get | mm |
StrangleBaseZ | double | get | mm |
StrangleOpening | double | get | mm — used when OpeningType is “STRANGLE” |
| Method | |
|---|---|
void SetCutBumping(double bumping) | |
void SetCutLength(double length) | |
void SetOpeningType(string openingType) | ”NONE”, “CUT” or “STRANGLE” |
void SetStrangleBase(double x, double y, double z) | |
void SetStrangleOpening(double opening) |