.NET API
TwoRowsShankApi
Two-rows shanks - a band carrying two parallel rows of stones. Query-only for now: run ArtisanTwoRowsShank in the UI once, then script every variant from the handle.
from ArtisanPlugin.Scripting import TwoRowsShankApi
See also the guide, Shanks › Two rows, and the Python package, ra.two_rows_shank.
Methods
| Method | |
|---|---|
All | ITwoRowsShank handles for every object of this kind in the active document (empty when there is no document). |
ByLayer | ITwoRowsShank 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. |
Find | The handle for id, or null when the id does not belong to an object of this kind. |
Selected | ITwoRowsShank handles for the objects of this kind currently selected in the active document. |
All
IReadOnlyList<ITwoRowsShank> TwoRowsShankApi.All()
ITwoRowsShank handles for every object of this kind in the active document (empty when there is no document).
Returns IReadOnlyList<ITwoRowsShank>.
ByLayer
IReadOnlyList<ITwoRowsShank> TwoRowsShankApi.ByLayer(string layerName)
ITwoRowsShank handles on the layer with the given full path (empty when the layer does not exist).
| Parameter | Type | Default |
|---|---|---|
layerName | string | required |
Returns IReadOnlyList<ITwoRowsShank>.
Count
int TwoRowsShankApi.Count()
Number of objects of this kind in the active document.
Returns int.
Find
ITwoRowsShank TwoRowsShankApi.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 ITwoRowsShank.
Selected
IReadOnlyList<ITwoRowsShank> TwoRowsShankApi.Selected()
ITwoRowsShank handles for the objects of this kind currently selected in the active document.
Returns IReadOnlyList<ITwoRowsShank>.
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, IClassicGems, IClassicExternalProfile, IClassicAdvanced.
ITwoRowsShank
Handle — extends IParametricObject.
Two-rows shank: a classic band carrying two parallel rows of stones, one on each face. Multiple gems, so no single MotherGem.
| Property | Type | ||
|---|---|---|---|
Advanced | IClassicAdvanced | get | |
BottomProfile | IClassicProfile | get | |
CuttersEnabled | bool | get | |
ExternalProfile | IClassicExternalProfile | get | |
Gems | IClassicGems | get | The stones on the rails — the same options as a classic gems row. |
GemsEnabled | bool | 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) |
Prong | ITwoRowsProng | get | |
Rail | ITwoRowsRail | get | Two-rows specifics. |
RingDiameterMm | double | get | |
RingSizeLabel | string | get | |
RingSizeRegion | string | get | |
TopProfile | IClassicProfile | get | The band is a full classic shank, so it exposes the same sections. |
| Method | |
|---|---|
void Delete() | (from IParametricObject) |
void Move(Vector3d translation) | (from IParametricObject) |
void SetCuttersEnabled(bool enabled) | |
void SetElement(string element) | Applies a saved TwoRowsShank element (ElementsApi.List(“TwoRowsShank”)) to this shank: its band, rails and gems replace the current ones, the ring size stays, and the shank regenerates in place (same id). |
void SetGemsEnabled(bool enabled) |
ITwoRowsRail
Section.
The channel carved on each face of a two-rows band, and how the two gem rows sit in it.
| Property | Type | ||
|---|---|---|---|
CentralWall | double | get | metal left between the two rows in DOUBLE, mm |
CutOrientation | string | get | ”ANGLED” (follows the face) or “HORIZONTAL”; SINGLE is always horizontal |
EndAngle | double | get | degrees — used when LayoutMode is “SIDE_ANGLE” |
EndMargin | double | get | gap between the channel end and the first/last gem, mm |
FitTolerance | double | get | mm |
LayoutMode | string | get | ”FULL”, “SIDE_ANGLE” or “TOP_ANGLE” |
Offset | double | get | depth carved into the band, mm |
OuterBorder | double | get | SINGLE only: metal rim on each side of the band, mm |
RailMode | string | get | ”DOUBLE” (one cutter per row) or “SINGLE” (one wider cutter) |
Rotation | double | get | degrees |
RowSpacing | double | get | gap between the two gem rows, mm |
StartAngle | double | get | degrees — used when LayoutMode is “SIDE_ANGLE” |
TopAngle | double | get | total arc in degrees — used when LayoutMode is “TOP_ANGLE” |
Width | double | get | span of the channel along the face, mm |
| Method | |
|---|---|
void SetCentralWall(double width) | |
void SetCutOrientation(string orientation) | ”ANGLED” or “HORIZONTAL” |
void SetEndMargin(double margin) | |
void SetFitTolerance(double tolerance) | |
void SetLayoutMode(string layoutMode) | ”FULL”, “SIDE_ANGLE” or “TOP_ANGLE” |
void SetOffset(double offset) | |
void SetOuterBorder(double border) | |
void SetRailMode(string railMode) | ”DOUBLE” or “SINGLE” |
void SetRotation(double degrees) | |
void SetRowSpacing(double spacing) | |
void SetSideAngles(double startAngle, double endAngle) | |
void SetTopAngle(double degrees) | |
void SetWidth(double width) |
ITwoRowsProng
Section.
The prong cross-section of a two-rows band.
| Property | Type | ||
|---|---|---|---|
Distance | double | get | mm |
EndProngCount | int | get | |
ExternalDiameter | double | get | mm |
InternalDiameter | double | get | mm |
| Method | |
|---|---|
void SetDistance(double distance) | |
void SetEndProngCount(int count) | |
void SetExternalDiameter(double diameter) | |
void SetInternalDiameter(double diameter) |