.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 | |
|---|---|
All | IPaveShank handles for every object of this kind in the active document (empty when there is no document). |
ByLayer | IPaveShank 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 | IPaveShank 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).
| Parameter | Type | Default |
|---|---|---|
layerName | string | required |
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.
| Parameter | Type | Default |
|---|---|---|
id | Guid | required |
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.
| Property | Type | ||
|---|---|---|---|
Advanced | IClassicAdvanced | get | |
CuttersEnabled | bool | 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) |
Rail | IPaveShankRail | get | |
RingDiameterMm | double | get | |
RingSizeLabel | string | get | |
RingSizeRegion | string | get | |
TopProfile | IClassicProfile | get | The 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.
| Property | Type | ||
|---|---|---|---|
ProngDiameter | double | get | global default, mm |
ProngHeight | double | get | global default, mm |
Prongs | IReadOnlyList<IPaveShankProng> | get | |
Rows | IReadOnlyList<IPaveShankRow> | get | |
ShowProngs | bool | get |
| 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.
| Property | Type | ||
|---|---|---|---|
EndAngle | double | get | degrees |
GemSize | double | get | mm |
Mirror | bool | get | the row is the mirror of its opposite |
Offset | double | get | lateral offset from the centre, mm |
Spacing | double | get | gap between adjacent stones, mm |
StartAngle | double | get | degrees along the band |
IPaveShankProng
Section.
One prong definition, tied to a row by index.
| Property | Type | ||
|---|---|---|---|
ApplyToAllGems | bool | get | |
Diameter | double | get | mm |
Height | double | get | mm |
Mirror | bool | get | |
RowIndex | int | get | |
Visible | bool | get | |
X | double | get | mm |
Y | double | get | mm |