Skip to content

.NET API

AdvancedPaveShankApi

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

from ArtisanPlugin.Scripting import AdvancedPaveShankApi

See also the guide, Shanks › Advanced pavé shank, and the Python package, ra.advanced_pave_shank.

Methods

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

All

IReadOnlyList<IAdvancedPaveShank> AdvancedPaveShankApi.All()

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

Returns IReadOnlyList<IAdvancedPaveShank>.

ByLayer

IReadOnlyList<IAdvancedPaveShank> AdvancedPaveShankApi.ByLayer(string layerName)

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

ParameterTypeDefault
layerNamestringrequired

Returns IReadOnlyList<IAdvancedPaveShank>.

Count

int AdvancedPaveShankApi.Count()

Number of objects of this kind in the active document.

Returns int.

Find

IAdvancedPaveShank AdvancedPaveShankApi.Find(Guid id)

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

ParameterTypeDefault
idGuidrequired

Returns IAdvancedPaveShank.

Selected

IReadOnlyList<IAdvancedPaveShank> AdvancedPaveShankApi.Selected()

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

Returns IReadOnlyList<IAdvancedPaveShank>.

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.

IAdvancedPaveShank

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

IAdvancedPaveShankRail

Section.

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

PropertyType
ProngDiameterdoublegetglobal default, mm
ProngHeightdoublegetglobal default, mm
ProngsIReadOnlyList<IAdvancedPaveShankProng>get
RowsIReadOnlyList<IAdvancedPaveShankRow>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<IAdvancedPaveShankRow> rows)Replaces the whole row list, in lateral order.
void SetShowProngs(bool show)

IAdvancedPaveShankRow

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

IAdvancedPaveShankProng

Section.

One prong definition, tied to a row by index.

PropertyType
ApplyToAllGemsboolget
Diameterdoublegetmm
Heightdoublegetmm
Mirrorboolget
RowIndexintget
Visibleboolget
Xdoublegetmm
Ydoublegetmm