Skip to content

Python package

ra.matching_shank

Matching shanks fitted against an engagement ring.

import rhinoartisan as ra

Wraps ArtisanPlugin.Scripting.MatchingShankApi, ArtisanPlugin.Scripting.MatchingShankBuilderApi.

Functions

Function
all()MatchingShank handles for every object of this kind in the active document (empty when there is no document).
by_layer()MatchingShank 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 None when the id does not belong to an object of this kind.
for_ring()The matching shanks fitted against a given ring.
selected()MatchingShank handles for the objects of this kind currently selected in the active document.
create()Builds a matching shank (the ArtisanMatchingShank tool, headless): a band shaped to sit against an existing ring — the mother — so the pair stacks without a gap.

ra.matching_shank.all()

ra.matching_shank.all() -> List[MatchingShank]

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

ra.matching_shank.by_layer()

ra.matching_shank.by_layer(layer_name: str) -> List[MatchingShank]

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

ParameterType
layer_namestrrequired

ra.matching_shank.count()

ra.matching_shank.count() -> int

Number of objects of this kind in the active document.

ra.matching_shank.find()

ra.matching_shank.find(id: IdLike) -> MatchingShank

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

ParameterType
idIdLikerequired

ra.matching_shank.for_ring()

ra.matching_shank.for_ring(ring_id: IdLike) -> List[MatchingShank]

The matching shanks fitted against a given ring.

ParameterType
ring_idIdLikerequired

ra.matching_shank.selected()

ra.matching_shank.selected() -> List[MatchingShank]

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

ra.matching_shank.create()

ra.matching_shank.create(ring_ids: Sequence[IdLike], width=None, height=None, finger_diameter=None, profile=None, metal=None, clearance=None, distance=None, top_distance=None, interior_type=None, comfort=None, number_of_points=None, flip_side=None, both_sides=None, with_gems=None, gem_size=None, gem_distribution=None, element=None) -> MatchingShank

Builds a matching shank (the ArtisanMatchingShank tool, headless): a band shaped to sit against an existing ring — the mother — so the pair stacks without a gap. The mother ring must sit at the origin like every Artisan ring (the rail is the finger-size circle there). ring_ids: the ring to hug — document ids of its solids (breps, extrusions, meshes) or the Id of an Artisan shank handle (classic, eternity, wedding band…; its stones are ignored). Millimetres; omitting keeps the tool default (or the user’s saved defaults): width 3, height 2, number_of_points 8, comfort 0.3. NaN keeps the default for the signed / zero-legit ones: clearance 0.3 (gap kept against the mother), distance 0 (axial gap; negative presses into the mother), top_distance 0. interior_type “SOLID” | “COMFORT”. flip_side builds on the other side of the mother, both_sides one band on each side (both baked in the same group). with_gems adds a row of round stones along the crest: gem_size (default 1.5), gem_distribution “FULL” | “SIDE” | “TOP”. finger_diameter 0 = the document’s finger size; profile picks a RING_PROFILE asset by name; metal a Metal name (omitted = the document’s Metal 01). Returns the MatchingShank handle of the new group; the mother ring is its parametric mother, so the band follows the ring’s edits. element = name of a saved element (ra.elements.list) to start from; explicit arguments override it.

ParameterType
ring_idsSequence[IdLike]required
widthfloatoptional — None = the tool default
heightfloatoptional — None = the tool default
finger_diameterfloatoptional — None = the tool default
profilestroptional — None = the tool default
metalstroptional — None = the tool default
clearancefloatoptional — None = the tool default
distancefloatoptional — None = the tool default
top_distancefloatoptional — None = the tool default
interior_typestroptional — None = the tool default
comfortfloatoptional — None = the tool default
number_of_pointsintoptional — None = the tool default
flip_sidebooloptional — None = the tool default
both_sidesbooloptional — None = the tool default
with_gemsbooloptional — None = the tool default
gem_sizefloatoptional — None = the tool default
gem_distributionstroptional — None = the tool default
elementstroptional — None = the tool default

Handles

Objects returned by the functions above. Assigning a settable property regenerates the object; the change is one undo step inside ra.transaction().

MatchingShank (handle)

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.

PropertyTypeSettable
both_sidesboolyesbuild one band on each side
bottom_heightfloatyesmm — 0 = same as the top
bottom_widthfloatyesband section at the bottom, mm — 0 = same as the top
clearancefloatyesgap kept against the mother, mm
comfortfloatyesmm — used when InteriorType is “COMFORT”
curve_from_ring_sizeboolrail generated from the ring size instead of a picked curve
distancefloatyesaxial gap; negative presses the band into the mother, mm
flip_sideboolyesbuild on the other side of the mother
gemsMatchingShankGems
interior_typestryes”SOLID” or “COMFORT”
layer_namestr
metalstre.g. “GOLD_YELLOW_18”
mother_gem_idstr
mother_ring_idsList[str]The ring(s) this shank was fitted against, and the rail it follows.
number_of_pointsintyessections used to follow the mother — always even
object_typestr
positionPoint3d
profile_heightfloatyesmm
profile_namestrRING_PROFILE asset name, "" when unset
profile_widthfloatyesband section at the top, mm
ring_curve_idstrNone when built from the ring size
ring_diameter_mmfloat
ring_size_labelstr
ring_size_regionstr
section_contact_offsetsList[float]
section_deltasList[float]yesPer-section fit. Deltas are yours to set; contact offsets are what the last computation measured (read-only output).
top_distancefloatyesextra axial gap at the ring top, fading to 0 at 90 degrees, mm
Method
delete()
move(translation: VectorLike)
set_element(element: str)Applies a saved MatchingShank element (ra.elements.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.
set_profile(asset_name: str)Setters — each regenerates the shank in place (same Guid), re-baking its gems and prongs, and calls LicenseGate.RequireValid() first.

Plus what every handle has: id, delete(), update(**kwargs), parameters(), equality and hashing by id, and raw (the underlying .NET object).

MatchingShankGems (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.

PropertyTypeSettable
anglefloatyesdegrees
automatic_prong_diameterboolyes
bottom_inner_heightfloatyesmm — 0 = same as the top
bottom_inner_widthfloatyesmm — 0 = same as the top
bright_cutfloatyesmm
distributionstryes”FULL”, “SIDE” or “TOP”
double_prong_settingboolyes
drill_allow_intersectionboolyes
drill_enabledboolyes
drill_heightfloatyesmm
drill_typestryes”NONE”, “ROUND” or “QUAD”
drill_visibleboolyes
drill_widthfloatyesmm
enabledboolyes
end_anglefloatdegrees — used when Distribution is “SIDE”
end_prong_countintyes
extension_for_manufacturingfloatyesmm
gem_insidefloatyesmm
gem_shapestryes”ROUND”, “PRINCESS”, …
gem_sizefloatyesmm
gem_size_endfloatmm
gem_size_middlefloatmm
gem_size_startfloatmm
gradientboolyesStone-size gradient along the row.
gradient_middle_positionfloatyes0..1
gradient_pointsintyes
inner_heightfloatyesinner channel height at the top, mm
inner_marginfloatyesmm
inner_widthfloatyesinner channel width at the top, mm
marginfloatyesmm
min_distancefloatyesmm
prong_bottom_diameterfloatyesmm — 0 = same as the top
prong_diameterfloatyesmm
prong_distancefloatyesmm
prong_growfloatyesmm
prong_heightfloatyesmm
prong_min_diameterfloatyesmm
prong_spacingfloatyesmm
prong_top_diameterfloatyesmm — 0 = automatic
prong_typestryes”NONE”, “SHARED” or “SCALLOPED”
row_offsetfloatyesmm
scallop_gem_heightfloat
scallop_gem_widthfloatScalloped-setting proportions (percentages, not mm).
scallop_prong_heightfloat
scallop_prong_widthfloat
scallop_rail_heightfloat
scallop_rail_widthfloat
scallop_remove_channelboolyes
start_anglefloatdegrees from the top — used when Distribution is “SIDE”
top_anglefloatyestotal arc in degrees — used when Distribution is “TOP”
verticalfloatyesmm
Method
set_gem_size_gradient(start: float, middle: float, end: float)
set_scallop_gem(width: float, height: float)
set_scallop_prong(width: float, height: float)
set_scallop_rail(width: float, height: float)
set_side_angles(start_angle: float, end_angle: float)