Skip to content

Python package

ra.two_rows_shank

Two-row shanks.

import rhinoartisan as ra

Wraps ArtisanPlugin.Scripting.TwoRowsShankApi, ArtisanPlugin.Scripting.TwoRowsShankBuilderApi.

Functions

Function
all()TwoRowsShank handles for every object of this kind in the active document (empty when there is no document).
by_layer()TwoRowsShank 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.
selected()TwoRowsShank handles for the objects of this kind currently selected in the active document.
create()Builds a two-rows shank (the ArtisanTwoRowsShank tool, headless): a classic band with a channel carved on each face, each carrying a row of round stones held by prongs.

ra.two_rows_shank.all()

ra.two_rows_shank.all() -> List[TwoRowsShank]

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

ra.two_rows_shank.by_layer()

ra.two_rows_shank.by_layer(layer_name: str) -> List[TwoRowsShank]

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

ParameterType
layer_namestrrequired

ra.two_rows_shank.count()

ra.two_rows_shank.count() -> int

Number of objects of this kind in the active document.

ra.two_rows_shank.find()

ra.two_rows_shank.find(id: IdLike) -> TwoRowsShank

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

ParameterType
idIdLikerequired

ra.two_rows_shank.selected()

ra.two_rows_shank.selected() -> List[TwoRowsShank]

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

ra.two_rows_shank.create()

ra.two_rows_shank.create(width=None, height=None, finger_diameter=None, profile=None, layout_mode=None, top_angle=None, start_angle=None, end_angle=None, gem_size=None, channel_width=None, channel_offset=None, rail_mode=None, with_gems=None, with_cutters=None, plane=None, element=None) -> TwoRowsShank

Builds a two-rows shank (the ArtisanTwoRowsShank tool, headless): a classic band with a channel carved on each face, each carrying a row of round stones held by prongs. Millimetres; omitting keeps the tool default (or the user’s saved defaults): width 3, height 2 (band section), gem_size 1.0, channel_width 1.3 (span along the face), channel_offset 0.3 (depth carved into the band). layout_mode “FULL” | “SIDE_ANGLE” (uses start_angle / end_angle, defaults 30-150) | “TOP_ANGLE” (uses top_angle, default 60; the tool default). rail_mode “DOUBLE” (one channel per face, the default) | “SINGLE” (one wide channel). with_gems False bakes the carved band alone; with_cutters adds a parametric drill cutter under every stone, like the panel does. finger_diameter 0 = the document’s finger size; profile picks a RING_PROFILE asset by name (omitted = the triangular profile the command starts from, or the default one); plane omitted = world XY. Returns the TwoRowsShank handle of the new shank (stones, cutters and prongs are its children). element = name of a saved element (ra.elements.list) to start from; explicit arguments override it.

ParameterType
widthfloatoptional — None = the tool default
heightfloatoptional — None = the tool default
finger_diameterfloatoptional — None = the tool default
profilestroptional — None = the tool default
layout_modestroptional — None = the tool default
top_anglefloatoptional — None = the tool default
start_anglefloatoptional — None = the tool default
end_anglefloatoptional — None = the tool default
gem_sizefloatoptional — None = the tool default
channel_widthfloatoptional — None = the tool default
channel_offsetfloatoptional — None = the tool default
rail_modestroptional — None = the tool default
with_gemsbooloptional — None = the tool default
with_cuttersbooloptional — None = the tool default
planeOptional[PlaneLike]optional — 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().

TwoRowsShank (handle)

Two-rows shank: a classic band carrying two parallel rows of stones, one on each face. Multiple gems, so no single MotherGem.

PropertyTypeSettable
advancedClassicAdvanced
bottom_profileClassicProfile
cutters_enabledboolyes
external_profileClassicExternalProfile
gemsClassicGemsThe stones on the rails — the same options as a classic gems row.
gems_enabledboolyes
layer_namestr
mid_profileClassicProfile
mother_gem_idstr
object_typestr
positionPoint3d
prongTwoRowsProng
railTwoRowsRailTwo-rows specifics.
ring_diameter_mmfloat
ring_size_labelstr
ring_size_regionstr
top_profileClassicProfileThe band is a full classic shank, so it exposes the same sections.
Method
delete()
move(translation: VectorLike)
set_element(element: str)Applies a saved TwoRowsShank element (ra.elements.list(“TwoRowsShank”)) to this shank: its band, rails and gems replace the current ones, the ring size stays, and the shank regenerates in place (same id).

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

ClassicAdvanced (section)

The classic shank’s Advanced section: the opening at the bottom of the band.

PropertyTypeSettable
cut_bumpingfloatyesmm — used when OpeningType is “CUT”
cut_lengthfloatyesmm — used when OpeningType is “CUT”
opening_typestryes”NONE”, “CUT” or “STRANGLE”
strangle_base_xfloatmm
strangle_base_yfloatmm
strangle_base_zfloatmm
strangle_openingfloatyesmm — used when OpeningType is “STRANGLE”
Method
set_strangle_base(x: float, y: float, z: float)

ClassicProfile (section)

One of the shank’s three section profiles (top / mid / bottom). The top profile is always enabled; mid and bottom are optional.

PropertyTypeSettable
comfortfloatyesmm — used when Type is “COMFORT”
displacementfloatyesmm
enabledboolyes
heightfloatyesmm
orientationintyes0 = Natural, 1 = Reverse (flips the profile curve)
profile_namestrRING_PROFILE asset name, "" when unset
rotationfloatyesdegrees
thicknessfloatyesmm — used when Type is “THICKNESS”
typestryes”SOLID”, “COMFORT” or “THICKNESS”
widthfloatyesmm
Method
set_profile(asset_name: str)RING_PROFILE asset by name — list them with ra.assets.list(“RING_PROFILE”)

ClassicExternalProfile (section)

The optional external profile carved on the shank’s outside face.

PropertyTypeSettable
bottomfloatyesexternal height at the bottom, mm
enabledboolyes
midfloatyesexternal height at the middle, mm
profile_namestrEXTERNAL_RING_PROFILE asset name, "" when unset
topfloatyesexternal height at the top, mm
Method
set_profile(asset_name: str)EXTERNAL_RING_PROFILE asset by name — list them with ra.assets.list(“EXTERNAL_RING_PROFILE”)

ClassicGems (section)

The gems row a shank can carry around its band.

PropertyTypeSettable
anglefloatyesdegrees of the band covered by gems (180 = top half)
automatic_prong_diameterboolyes
bright_cutfloatyesbright-cut width, mm
drill_allow_intersectionboolyes
drill_heightfloatyesmm
drill_typestryes”NONE”, “ROUND” or “QUAD”
drill_widthfloatyesmm
enabledboolyes
extension_for_manufacturingfloatyesmm
gem_insidefloatyeshow deep the gems sit inside, mm
gem_shapestryes”ROUND”, “PRINCESS”, …
gem_sizefloatyesmm
inner_heightfloatyesinner channel height, mm
inner_widthfloatyesinner channel width, mm
marginfloatyesside margin, mm
min_distancefloatyesminimum distance between gems, mm
prong_diameterfloatyesmm — used when AutomaticProngDiameter is False
prong_heightfloatyesmm
prong_move_in_zfloatyesmm
prong_typestryes”NONE”, “SHARED” or “SCALLOPED”
verticalfloatyesvertical displacement of the row, mm

TwoRowsProng (section)

The prong cross-section of a two-rows band.

PropertyTypeSettable
distancefloatyesmm
end_prong_countintyes
external_diameterfloatyesmm
internal_diameterfloatyesmm

TwoRowsRail (section)

The channel carved on each face of a two-rows band, and how the two gem rows sit in it.

PropertyTypeSettable
central_wallfloatyesmetal left between the two rows in DOUBLE, mm
cut_orientationstryes”ANGLED” (follows the face) or “HORIZONTAL”; SINGLE is always horizontal
end_anglefloatdegrees — used when LayoutMode is “SIDE_ANGLE”
end_marginfloatyesgap between the channel end and the first/last gem, mm
fit_tolerancefloatyesmm
layout_modestryes”FULL”, “SIDE_ANGLE” or “TOP_ANGLE”
offsetfloatyesdepth carved into the band, mm
outer_borderfloatyesSINGLE only: metal rim on each side of the band, mm
rail_modestryes”DOUBLE” (one cutter per row) or “SINGLE” (one wider cutter)
rotationfloatyesdegrees
row_spacingfloatyesgap between the two gem rows, mm
start_anglefloatdegrees — used when LayoutMode is “SIDE_ANGLE”
top_anglefloatyestotal arc in degrees — used when LayoutMode is “TOP_ANGLE”
widthfloatyesspan of the channel along the face, mm
Method
set_side_angles(start_angle: float, end_angle: float)