.NET API
GraduatedApi
Graduated shanks - a band whose section grows toward the centre stone, carrying a run of stones that shrink toward the finger. Create takes the handful of parameters that define the piece; everything else (the ~50 gem, prong and under-bezel values) is adjusted afterwards through the returned handle’s Shank and Gems sections.
from ArtisanPlugin.Scripting import GraduatedApi
See also the guide, Shanks › Graduated, and the Python package, ra.graduated.
Methods
| Method | |
|---|---|
All | IGraduated handles for every object of this kind in the active document (empty when there is no document). |
ByLayer | IGraduated 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 graduated shank — the ArtisanGraduated tool, headless. |
Find | The handle for id, or null when the id does not belong to an object of this kind. |
Selected | IGraduated handles for the objects of this kind currently selected in the active document. |
All
IReadOnlyList<IGraduated> GraduatedApi.All()
IGraduated handles for every object of this kind in the active document (empty when there is no document).
Returns IReadOnlyList<IGraduated>.
ByLayer
IReadOnlyList<IGraduated> GraduatedApi.ByLayer(string layerName)
IGraduated handles on the layer with the given full path (empty when the layer does not exist).
| Parameter | Type | Default |
|---|---|---|
layerName | string | required |
Returns IReadOnlyList<IGraduated>.
Count
int GraduatedApi.Count()
Number of objects of this kind in the active document.
Returns int.
Create
IGraduated GraduatedApi.Create(
double fingerDiameter = 0,
int numberOfStones = 0,
double sizeStart = 0,
double sizeEnd = 0,
double centerStoneSize = 0,
double topWidth = 0,
double topHeight = 0,
double bottomWidth = 0,
double bottomHeight = 0,
string profile = null,
Plane? plane = null,
string element = null)
Builds a graduated shank — the ArtisanGraduated tool, headless. Millimetres; 0 keeps the tool default (or the user’s saved defaults): numberOfStones 4 per side, sizeStart 2.5, sizeEnd 1.5, centerStoneSize 6.1, top profile 1.5 x 1.6, bottom profile 3.0 x 1.6. fingerDiameter 0 = the document’s finger size. profile picks a RING_PROFILE asset by name for both band sections. Returns an IGraduated handle: use handle.Shank / handle.Gems to adjust the rest of the parameters. element = name of a saved graduated element (ElementsApi.List(“Graduated”)) to start from instead of the tool defaults; explicit arguments override it.
| Parameter | Type | Default |
|---|---|---|
fingerDiameter | double | 0 |
numberOfStones | int | 0 |
sizeStart | double | 0 |
sizeEnd | double | 0 |
centerStoneSize | double | 0 |
topWidth | double | 0 |
topHeight | double | 0 |
bottomWidth | double | 0 |
bottomHeight | double | 0 |
profile | string | null |
plane | Plane? | null |
element | string | null |
Returns IGraduated.
Find
IGraduated GraduatedApi.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 IGraduated.
Selected
IReadOnlyList<IGraduated> GraduatedApi.Selected()
IGraduated handles for the objects of this kind currently selected in the active document.
Returns IReadOnlyList<IGraduated>.
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.
IGraduated
Handle — extends IParametricObject.
Graduated shank: a band whose section grows from the centre stone down toward the finger, carrying a run of stones that shrink along the way. Multiple gems, so no single MotherGem.
| Property | Type | ||
|---|---|---|---|
Gems | IGraduatedGems | get | |
Id | Guid | get | (from IParametricObject) |
LayerName | string | get | (from IParametricObject) |
MotherGemId | Guid | get | (from IParametricObject) |
ObjectType | string | get | (from IParametricObject) |
Position | Point3d | get | (from IParametricObject) |
RingDiameterMm | double | get | |
RingSizeLabel | string | get | |
RingSizeRegion | string | get | |
Shank | IGraduatedShank | get |
| Method | |
|---|---|
void Delete() | (from IParametricObject) |
void Move(Vector3d translation) | (from IParametricObject) |
void SetElement(string element) | Applies a saved Graduated element (ElementsApi.List(“Graduated”)) to this shank: its parameters replace the current ones, the ring size stays, and the shank regenerates in place (same id). |
IGraduatedShank
Section.
The graduated band: two profiles that the section morphs between, plus the opening at the bottom.
| Property | Type | ||
|---|---|---|---|
BottomProfile | IGraduatedProfile | get | |
CutBumping | double | get | mm |
OpeningMargin | double | get | mm |
TopProfile | IGraduatedProfile | get |
| Method | |
|---|---|
void SetCutBumping(double bumping) | |
void SetOpeningMargin(double margin) |
IGraduatedProfile
Section.
One of a graduated band’s two profiles (top / bottom). Same shape as a classic profile, on its own model.
| 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 |
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 |
void SetRotation(double degrees) | |
void SetThickness(double thickness) | |
void SetType(string type) | ”SOLID”, “COMFORT” or “THICKNESS” |
void SetWidth(double width) |
IGraduatedGems
Section.
The graduated stone run: stones stepping down in size from the centre stone toward the band, with prongs that taper along the way.
| Property | Type | ||
|---|---|---|---|
AutomaticProngDiameter | bool | get | |
BrightCut | double | get | mm |
CenterStoneSize | double | get | mm |
Distance | double | get | gap between adjacent stones, mm |
DrillAllowIntersection | bool | get | |
DrillHeight | double | get | mm |
DrillType | string | get | ”NONE”, “ROUND” or “QUAD” |
DrillWidth | double | get | mm |
Enabled | bool | get | |
EndProngCount | int | get | |
ExtensionForManufacturing | double | get | mm |
GemInside | double | get | mm |
GemMoveInZEnd | double | get | mm |
GemMoveInZStart | double | get | mm |
GemShape | string | get | ”ROUND”, “PRINCESS”, … |
InnerHeight | double | get | mm |
InnerWidth | double | get | mm |
Lift | double | get | mm |
NumberOfStones | int | get | per side |
ProngCutByRingSize | bool | get | |
ProngDiameterEnd | double | get | |
ProngDiameterStart | double | get | |
ProngDistance | double | get | |
ProngGrow | double | get | |
ProngHeightEnd | double | get | |
ProngHeightStart | double | get | |
ProngMinDiameter | double | get | |
ProngMoveInZ | double | get | |
ProngOverGirdleEnd | double | get | |
ProngOverGirdleStart | double | get | |
ProngSeparationEnd | double | get | |
ProngSeparationStart | double | get | |
ProngSpacing | double | get | |
ProngType | string | get | ”NONE”, “SHARED” or “SCALLOPED” |
ProngsEnabled | bool | get | Prongs — most sizes taper from the centre stone (Start) to the band (End). |
SizeEnd | double | get | nearest the band, mm |
SizeStart | double | get | nearest the centre stone, mm |
UnderBezelBottomWidth | double | get | mm |
UnderBezelEnabled | bool | get | The rail under the stones. |
UnderBezelGemInside | double | get | rail offset into the stone, mm |
UnderBezelGirdleWidth | double | get | top diameter span, mm |
UnderBezelHeight | double | get | 0 = auto (drop to the finger curve) |
UnderBezelOverGirdle | double | get | rise above the girdle, mm |
UnderBezelWidth | double | get | total radial width, mm |
Vertical | double | get | mm |
| Method | |
|---|---|
void SetAutomaticProngDiameter(bool automatic) | |
void SetBrightCut(double brightCut) | |
void SetCenterStoneSize(double size) | |
void SetDistance(double distance) | |
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 SetEndProngCount(int count) | |
void SetExtensionForManufacturing(double extension) | |
void SetGemInside(double gemInside) | |
void SetGemMoveInZ(double start, double end) | |
void SetGemShape(string shape) | |
void SetInnerHeight(double height) | |
void SetInnerWidth(double width) | |
void SetLift(double lift) | |
void SetNumberOfStones(int count) | |
void SetProngCutByRingSize(bool cut) | |
void SetProngDiameters(double start, double end) | |
void SetProngDistance(double distance) | |
void SetProngGrow(double grow) | |
void SetProngHeights(double start, double end) | |
void SetProngMinDiameter(double diameter) | |
void SetProngMoveInZ(double move) | |
void SetProngOverGirdle(double start, double end) | |
void SetProngSeparation(double start, double end) | |
void SetProngSpacing(double spacing) | |
void SetProngType(string prongType) | ”NONE”, “SHARED” or “SCALLOPED” |
void SetProngsEnabled(bool enabled) | |
void SetSizes(double start, double end) | start = nearest the centre stone |
void SetUnderBezelBottomWidth(double width) | |
void SetUnderBezelEnabled(bool enabled) | |
void SetUnderBezelGemInside(double gemInside) | |
void SetUnderBezelGirdleWidth(double width) | |
void SetUnderBezelHeight(double height) | 0 = auto |
void SetUnderBezelOverGirdle(double overGirdle) | |
void SetUnderBezelWidth(double width) | |
void SetVertical(double vertical) |