Skip to content

.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
AllITwoRowsShank handles for every object of this kind in the active document (empty when there is no document).
ByLayerITwoRowsShank 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.
FindThe handle for id, or null when the id does not belong to an object of this kind.
SelectedITwoRowsShank 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).

ParameterTypeDefault
layerNamestringrequired

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.

ParameterTypeDefault
idGuidrequired

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.

PropertyType
AdvancedIClassicAdvancedget
BottomProfileIClassicProfileget
CuttersEnabledboolget
ExternalProfileIClassicExternalProfileget
GemsIClassicGemsgetThe stones on the rails — the same options as a classic gems row.
GemsEnabledboolget
IdGuidget(from IParametricObject)
LayerNamestringget(from IParametricObject)
MidProfileIClassicProfileget
MotherGemIdGuidget(from IParametricObject)
ObjectTypestringget(from IParametricObject)
PositionPoint3dget(from IParametricObject)
ProngITwoRowsProngget
RailITwoRowsRailgetTwo-rows specifics.
RingDiameterMmdoubleget
RingSizeLabelstringget
RingSizeRegionstringget
TopProfileIClassicProfilegetThe 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.

PropertyType
CentralWalldoublegetmetal left between the two rows in DOUBLE, mm
CutOrientationstringget”ANGLED” (follows the face) or “HORIZONTAL”; SINGLE is always horizontal
EndAngledoublegetdegrees — used when LayoutMode is “SIDE_ANGLE”
EndMargindoublegetgap between the channel end and the first/last gem, mm
FitTolerancedoublegetmm
LayoutModestringget”FULL”, “SIDE_ANGLE” or “TOP_ANGLE”
Offsetdoublegetdepth carved into the band, mm
OuterBorderdoublegetSINGLE only: metal rim on each side of the band, mm
RailModestringget”DOUBLE” (one cutter per row) or “SINGLE” (one wider cutter)
Rotationdoublegetdegrees
RowSpacingdoublegetgap between the two gem rows, mm
StartAngledoublegetdegrees — used when LayoutMode is “SIDE_ANGLE”
TopAngledoublegettotal arc in degrees — used when LayoutMode is “TOP_ANGLE”
Widthdoublegetspan 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.

PropertyType
Distancedoublegetmm
EndProngCountintget
ExternalDiameterdoublegetmm
InternalDiameterdoublegetmm
Method
void SetDistance(double distance)
void SetEndProngCount(int count)
void SetExternalDiameter(double diameter)
void SetInternalDiameter(double diameter)