Skip to content

.NET API

PaveShankApi

Pave shanks - a band carrying one or more longitudinal rows of stones. Query-only for now: run ArtisanPaveShank in the UI once, then script every variant from the handle.

from ArtisanPlugin.Scripting import PaveShankApi

See also the guide, Shanks › Pave shank, and the Python package, ra.pave_shank.

Methods

Method
AllIPaveShank handles for every object of this kind in the active document (empty when there is no document).
ByLayerIPaveShank 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.
SelectedIPaveShank handles for the objects of this kind currently selected in the active document.

All

IReadOnlyList<IPaveShank> PaveShankApi.All()

IPaveShank handles for every object of this kind in the active document (empty when there is no document).

Returns IReadOnlyList<IPaveShank>.

ByLayer

IReadOnlyList<IPaveShank> PaveShankApi.ByLayer(string layerName)

IPaveShank handles on the layer with the given full path (empty when the layer does not exist).

ParameterTypeDefault
layerNamestringrequired

Returns IReadOnlyList<IPaveShank>.

Count

int PaveShankApi.Count()

Number of objects of this kind in the active document.

Returns int.

Find

IPaveShank PaveShankApi.Find(Guid id)

The handle for id, or null when the id does not belong to an object of this kind.

ParameterTypeDefault
idGuidrequired

Returns IPaveShank.

Selected

IReadOnlyList<IPaveShank> PaveShankApi.Selected()

IPaveShank handles for the objects of this kind currently selected in the active document.

Returns IReadOnlyList<IPaveShank>.

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, IClassicAdvanced.

IPaveShank

Handle — extends IParametricObject.

Pave shank: a band carrying one or more longitudinal rows of stones. Multiple gems, so no single MotherGem.

PropertyType
AdvancedIClassicAdvancedget
CuttersEnabledboolget
IdGuidget(from IParametricObject)
LayerNamestringget(from IParametricObject)
MotherGemIdGuidget(from IParametricObject)
ObjectTypestringget(from IParametricObject)
PositionPoint3dget(from IParametricObject)
RailIPaveShankRailget
RingDiameterMmdoubleget
RingSizeLabelstringget
RingSizeRegionstringget
TopProfileIClassicProfilegetThe band section and the opening — the same models the classic shank uses.
Method
void Delete()(from IParametricObject)
void Move(Vector3d translation)(from IParametricObject)
void SetCuttersEnabled(bool enabled)
void SetElement(string element)Applies a saved PaveShank element (ElementsApi.List(“PaveShank”)) to this shank: its band, rows and cutters replace the current ones, the ring size stays, and the shank regenerates in place (same id).

IPaveShankRail

Section.

The rail: the gem rows the band carries and the prongs holding them.

PropertyType
ProngDiameterdoublegetglobal default, mm
ProngHeightdoublegetglobal default, mm
ProngsIReadOnlyList<IPaveShankProng>get
RowsIReadOnlyList<IPaveShankRow>get
ShowProngsboolget
Method
void SetProngDiameter(double diameter)
void SetProngHeight(double height)
void SetRow( int index, double gemSize, double offset, double spacing, double startAngle, double endAngle)Edits one row in place.
void SetRows(IEnumerable<IPaveShankRow> rows)Replaces the whole row list, in lateral order.
void SetShowProngs(bool show)

IPaveShankRow

Section.

One longitudinal gem row: a line of equal stones running along the band at a lateral offset from the top profile’s centre, from StartAngle to EndAngle.

PropertyType
EndAngledoublegetdegrees
GemSizedoublegetmm
Mirrorboolgetthe row is the mirror of its opposite
Offsetdoublegetlateral offset from the centre, mm
Spacingdoublegetgap between adjacent stones, mm
StartAngledoublegetdegrees along the band

IPaveShankProng

Section.

One prong definition, tied to a row by index.

PropertyType
ApplyToAllGemsboolget
Diameterdoublegetmm
Heightdoublegetmm
Mirrorboolget
RowIndexintget
Visibleboolget
Xdoublegetmm
Ydoublegetmm