Skip to content

.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
AllIClassic handles for every object of this kind in the active document (empty when there is no document).
ByLayerIClassic handles on the layer with the given full path (empty when the layer does not exist).
CountNumber of objects of this kind in the active document.
CreateBuilds 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.
FindThe handle for id, or null when the id does not belong to an object of this kind.
SelectedClassics 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).

ParameterTypeDefault
layerNamestringrequired

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).

ParameterTypeDefault
widthdouble0
heightdouble0
fingerDiameterdouble0
withGemsboolfalse
gemSizedouble0
gemsAngledouble0
profilestringnull
planePlane?null
elementstringnull
gemsCountint0

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.

ParameterTypeDefault
idGuidrequired

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.

PropertyType
AdvancedIClassicAdvancedget
BottomProfileIClassicProfileget
DrillCutterIDrillCuttergetThe ROUND drill (Gems.DrillType ROUND): a cutter shaped on each stone. Classic only.
ExternalProfileIClassicExternalProfileget
GemsIClassicGemsget
IdGuidget(from IParametricObject)
LayerNamestringget(from IParametricObject)
MidProfileIClassicProfileget
MotherGemIdGuidget(from IParametricObject)
MountingHolesIClassicMountingHolesgetGemset mounting holes: the peg holes (and flat seat) at the top of the band
ObjectTypestringget(from IParametricObject)
PositionPoint3dget(from IParametricObject)
RemoveChannelboolgetGems.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.
RingDiameterMmdoubleget
RingSizeLabelstringget
RingSizeRegionstringget
TopProfileIClassicProfilegetParameter 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.

PropertyType
Depthdoublegetmm from the surface of the band; capped so a wall stays over the finger; ignored when Through
Diameterdoublegetmm, the peg diameter
Distancedoublegetmm, centre to centre between the two holes along the band (DOUBLE)
FlatSeatboolgettrue: a flat seat is milled on the top of the band for the gemset base
Modestringget”NONE” (no holes), “SINGLE” (one peg at the centre) or “DOUBLE” (two pegs, Distance apart)
Offsetdoublegetmm, signed shift of the holes and the seat along the band from the top centre
SeatLengthdoublegetmm, the chord of the flat seat along the band
Throughboolgettrue: 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.

PropertyType
Angledoublegetdegrees of the band covered by gems (180 = top half)
AutomaticProngDiameterboolget
AutomaticProngDistanceboolgetSHARED: 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
BrightCutdoublegetbright-cut width, mm
Countintgetnumber of gems in “COUNT” mode: per side when the band has an opening (Cut / Strangle), the whole row when it has none
DrillAllowIntersectionboolget
DrillHeightdoublegetmm
DrillTypestringget”NONE”, “ROUND” or “QUAD”
DrillWidthdoublegetmm
Enabledboolget
ExtensionForManufacturingdoublegetmm
GemInsidedoublegethow deep the gems sit inside, mm
GemShapestringget”ROUND”, “PRINCESS”, …
GemSizedoublegetmm
InnerHeightdoublegetinner channel height, mm
InnerWidthdoublegetinner channel width, mm
Margindoublegetside margin, mm
MinDistancedoublegetminimum distance between gems, mm
Modestringget”ANGLE” (the gems cover Angle, the count follows) or “COUNT” (exactly Count gems, the angle follows)
ProngDiameterdoublegetmm — used when AutomaticProngDiameter is false
ProngDistancedoublegetSHARED, 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
ProngHeightdoublegetmm
ProngMoveInZdoublegetmm
ProngTypestringget”NONE” (channel), “SHARED” or “SCALLOPED”; the Classic also “FLUSH” (no channel)
SplitRunAtTopboolgetClosed 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
Verticaldoublegetvertical 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.

PropertyType
Bottomdoublegetexternal height at the bottom, mm
Enabledboolget
Middoublegetexternal height at the middle, mm
ProfileNamestringgetEXTERNAL_RING_PROFILE asset name, "" when unset
Topdoublegetexternal 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)