Skip to content

.NET API

MatchingShankApi

Matching shanks — bands fitted against an existing ring so the pair stacks without a gap. Query-only for now: run ArtisanMatchingShank in the UI to fit the first one, then script every variant from its handle.

from ArtisanPlugin.Scripting import MatchingShankApi

See also the guide, Shanks › Matching shank, and the Python package, ra.matching_shank.

Methods

Method
AllIMatchingShank handles for every object of this kind in the active document (empty when there is no document).
ByLayerIMatchingShank 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.
ForRingThe matching shanks fitted against a given ring.
SelectedIMatchingShank handles for the objects of this kind currently selected in the active document.

All

IReadOnlyList<IMatchingShank> MatchingShankApi.All()

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

Returns IReadOnlyList<IMatchingShank>.

ByLayer

IReadOnlyList<IMatchingShank> MatchingShankApi.ByLayer(string layerName)

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

ParameterTypeDefault
layerNamestringrequired

Returns IReadOnlyList<IMatchingShank>.

Count

int MatchingShankApi.Count()

Number of objects of this kind in the active document.

Returns int.

Find

IMatchingShank MatchingShankApi.Find(Guid id)

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

ParameterTypeDefault
idGuidrequired

Returns IMatchingShank.

ForRing

IReadOnlyList<IMatchingShank> MatchingShankApi.ForRing(Guid ringId)

The matching shanks fitted against a given ring.

ParameterTypeDefault
ringIdGuidrequired

Returns IReadOnlyList<IMatchingShank>.

Selected

IReadOnlyList<IMatchingShank> MatchingShankApi.Selected()

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

Returns IReadOnlyList<IMatchingShank>.

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.

IMatchingShank

Handle — extends IParametricObject.

A matching shank: a band shaped to sit against an existing ring (the “mother”), so the pair stacks without a gap. Holds several gems, so no single MotherGem — the mothers it was fitted to are in MotherRingIds.

PropertyType
BothSidesboolgetbuild one band on each side
BottomHeightdoublegetmm — 0 = same as the top
BottomWidthdoublegetband section at the bottom, mm — 0 = same as the top
Clearancedoublegetgap kept against the mother, mm
Comfortdoublegetmm — used when InteriorType is “COMFORT”
CurveFromRingSizeboolgetrail generated from the ring size instead of a picked curve
Distancedoublegetaxial gap; negative presses the band into the mother, mm
FlipSideboolgetbuild on the other side of the mother
GemsIMatchingShankGemsget
IdGuidget(from IParametricObject)
InteriorTypestringget”SOLID” or “COMFORT”
LayerNamestringget(from IParametricObject)
Metalstringgete.g. “GOLD_YELLOW_18”
MotherGemIdGuidget(from IParametricObject)
MotherRingIdsIReadOnlyList<Guid>getThe ring(s) this shank was fitted against, and the rail it follows.
NumberOfPointsintgetsections used to follow the mother — always even
ObjectTypestringget(from IParametricObject)
PositionPoint3dget(from IParametricObject)
ProfileHeightdoublegetmm
ProfileNamestringgetRING_PROFILE asset name, "" when unset
ProfileWidthdoublegetband section at the top, mm
RingCurveIdGuidgetGuid.Empty when built from the ring size
RingDiameterMmdoubleget
RingSizeLabelstringget
RingSizeRegionstringget
SectionContactOffsetsIReadOnlyList<double>get
SectionDeltasIReadOnlyList<double>getPer-section fit. Deltas are yours to set; contact offsets are what the last computation measured (read-only output).
TopDistancedoublegetextra axial gap at the ring top, fading to 0 at 90 degrees, mm
Method
void Delete()(from IParametricObject)
void Move(Vector3d translation)(from IParametricObject)
void SetBothSides(bool bothSides)
void SetBottomHeight(double height)0 = same as the top
void SetBottomWidth(double width)0 = same as the top
void SetClearance(double clearance)
void SetComfort(double comfort)
void SetDistance(double distance)
void SetElement(string element)Applies a saved MatchingShank element (ElementsApi.List(“MatchingShank”)) to this shank: its band and gems replace the current ones, the ring size, mother ring(s) and rail stay, and the shank regenerates in place.
void SetFlipSide(bool flip)
void SetInteriorType(string interiorType)”SOLID” or “COMFORT”
void SetNumberOfPoints(int points)
void SetProfile(string assetName)Setters — each regenerates the shank in place (same Guid), re-baking its gems and prongs, and calls LicenseGate.RequireValid() first. RING_PROFILE asset by name — list them with AssetsApi.List(“RING_PROFILE”)
void SetProfileHeight(double height)
void SetProfileWidth(double width)
void SetSectionDeltas(IEnumerable<double> deltas)one per section, mm
void SetTopDistance(double distance)

IMatchingShankGems

Section.

The gems row a matching shank can carry. A live view over the shank’s stored parameters: getters read the current values, setters regenerate the shank in place (same Guid) and are license-gated.

PropertyType
Angledoublegetdegrees
AutomaticProngDiameterboolget
BottomInnerHeightdoublegetmm — 0 = same as the top
BottomInnerWidthdoublegetmm — 0 = same as the top
BrightCutdoublegetmm
Distributionstringget”FULL”, “SIDE” or “TOP”
DoubleProngSettingboolget
DrillAllowIntersectionboolget
DrillEnabledboolget
DrillHeightdoublegetmm
DrillTypestringget”NONE”, “ROUND” or “QUAD”
DrillVisibleboolget
DrillWidthdoublegetmm
Enabledboolget
EndAngledoublegetdegrees — used when Distribution is “SIDE”
EndProngCountintget
ExtensionForManufacturingdoublegetmm
GemInsidedoublegetmm
GemShapestringget”ROUND”, “PRINCESS”, …
GemSizedoublegetmm
GemSizeEnddoublegetmm
GemSizeMiddledoublegetmm
GemSizeStartdoublegetmm
GradientboolgetStone-size gradient along the row.
GradientMiddlePositiondoubleget0..1
GradientPointsintget
InnerHeightdoublegetinner channel height at the top, mm
InnerMargindoublegetmm
InnerWidthdoublegetinner channel width at the top, mm
Margindoublegetmm
MinDistancedoublegetmm
ProngBottomDiameterdoublegetmm — 0 = same as the top
ProngDiameterdoublegetmm
ProngDistancedoublegetmm
ProngGrowdoublegetmm
ProngHeightdoublegetmm
ProngMinDiameterdoublegetmm
ProngSpacingdoublegetmm
ProngTopDiameterdoublegetmm — 0 = automatic
ProngTypestringget”NONE”, “SHARED” or “SCALLOPED”
RowOffsetdoublegetmm
ScallopGemHeightdoubleget
ScallopGemWidthdoublegetScalloped-setting proportions (percentages, not mm).
ScallopProngHeightdoubleget
ScallopProngWidthdoubleget
ScallopRailHeightdoubleget
ScallopRailWidthdoubleget
ScallopRemoveChannelboolget
StartAngledoublegetdegrees from the top — used when Distribution is “SIDE”
TopAngledoublegettotal arc in degrees — used when Distribution is “TOP”
Verticaldoublegetmm
Method
void SetAngle(double degrees)
void SetAutomaticProngDiameter(bool automatic)
void SetBottomInnerHeight(double height)0 = same as the top
void SetBottomInnerWidth(double width)0 = same as the top
void SetBrightCut(double brightCut)
void SetDistribution(string distribution)”FULL”, “SIDE” or “TOP”
void SetDoubleProngSetting(bool enabled)
void SetDrillAllowIntersection(bool allow)
void SetDrillEnabled(bool enabled)
void SetDrillHeight(double height)
void SetDrillType(string drillType)”NONE”, “ROUND” or “QUAD”
void SetDrillVisible(bool visible)
void SetDrillWidth(double width)
void SetEnabled(bool enabled)
void SetEndProngCount(int count)
void SetExtensionForManufacturing(double extension)
void SetGemInside(double gemInside)
void SetGemShape(string shape)
void SetGemSize(double size)
void SetGemSizeGradient(double start, double middle, double end)
void SetGradient(bool enabled)
void SetGradientMiddlePosition(double position)0..1
void SetGradientPoints(int points)
void SetInnerHeight(double height)
void SetInnerMargin(double margin)
void SetInnerWidth(double width)
void SetMargin(double margin)
void SetMinDistance(double distance)
void SetProngBottomDiameter(double diameter)0 = same as the top
void SetProngDiameter(double diameter)
void SetProngDistance(double distance)
void SetProngGrow(double grow)
void SetProngHeight(double height)
void SetProngMinDiameter(double diameter)
void SetProngSpacing(double spacing)
void SetProngTopDiameter(double diameter)0 = automatic
void SetProngType(string prongType)”NONE”, “SHARED” or “SCALLOPED”
void SetRowOffset(double offset)
void SetScallopGem(double width, double height)
void SetScallopProng(double width, double height)
void SetScallopRail(double width, double height)
void SetScallopRemoveChannel(bool enabled)
void SetSideAngles(double startAngle, double endAngle)
void SetTopAngle(double degrees)
void SetVertical(double vertical)