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).
| Parameter | Type | |
|---|---|---|
layer_name | str | required |
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.
| Parameter | Type | |
|---|---|---|
id | IdLike | required |
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.
| Parameter | Type | |
|---|---|---|
width | float | optional — None = the tool default |
height | float | optional — None = the tool default |
finger_diameter | float | optional — None = the tool default |
profile | str | optional — None = the tool default |
layout_mode | str | optional — None = the tool default |
top_angle | float | optional — None = the tool default |
start_angle | float | optional — None = the tool default |
end_angle | float | optional — None = the tool default |
gem_size | float | optional — None = the tool default |
channel_width | float | optional — None = the tool default |
channel_offset | float | optional — None = the tool default |
rail_mode | str | optional — None = the tool default |
with_gems | bool | optional — None = the tool default |
with_cutters | bool | optional — None = the tool default |
plane | Optional[PlaneLike] | optional — None = the tool default |
element | str | optional — 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.
| Property | Type | Settable | |
|---|---|---|---|
advanced | ClassicAdvanced | ||
bottom_profile | ClassicProfile | ||
cutters_enabled | bool | yes | |
external_profile | ClassicExternalProfile | ||
gems | ClassicGems | The stones on the rails — the same options as a classic gems row. | |
gems_enabled | bool | yes | |
layer_name | str | ||
mid_profile | ClassicProfile | ||
mother_gem_id | str | ||
object_type | str | ||
position | Point3d | ||
prong | TwoRowsProng | ||
rail | TwoRowsRail | Two-rows specifics. | |
ring_diameter_mm | float | ||
ring_size_label | str | ||
ring_size_region | str | ||
top_profile | ClassicProfile | The 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.
| Property | Type | Settable | |
|---|---|---|---|
cut_bumping | float | yes | mm — used when OpeningType is “CUT” |
cut_length | float | yes | mm — used when OpeningType is “CUT” |
opening_type | str | yes | ”NONE”, “CUT” or “STRANGLE” |
strangle_base_x | float | mm | |
strangle_base_y | float | mm | |
strangle_base_z | float | mm | |
strangle_opening | float | yes | mm — 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.
| Property | Type | Settable | |
|---|---|---|---|
comfort | float | yes | mm — used when Type is “COMFORT” |
displacement | float | yes | mm |
enabled | bool | yes | |
height | float | yes | mm |
orientation | int | yes | 0 = Natural, 1 = Reverse (flips the profile curve) |
profile_name | str | RING_PROFILE asset name, "" when unset | |
rotation | float | yes | degrees |
thickness | float | yes | mm — used when Type is “THICKNESS” |
type | str | yes | ”SOLID”, “COMFORT” or “THICKNESS” |
width | float | yes | mm |
| 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.
| Property | Type | Settable | |
|---|---|---|---|
bottom | float | yes | external height at the bottom, mm |
enabled | bool | yes | |
mid | float | yes | external height at the middle, mm |
profile_name | str | EXTERNAL_RING_PROFILE asset name, "" when unset | |
top | float | yes | external 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.
| Property | Type | Settable | |
|---|---|---|---|
angle | float | yes | degrees of the band covered by gems (180 = top half) |
automatic_prong_diameter | bool | yes | |
bright_cut | float | yes | bright-cut width, mm |
drill_allow_intersection | bool | yes | |
drill_height | float | yes | mm |
drill_type | str | yes | ”NONE”, “ROUND” or “QUAD” |
drill_width | float | yes | mm |
enabled | bool | yes | |
extension_for_manufacturing | float | yes | mm |
gem_inside | float | yes | how deep the gems sit inside, mm |
gem_shape | str | yes | ”ROUND”, “PRINCESS”, … |
gem_size | float | yes | mm |
inner_height | float | yes | inner channel height, mm |
inner_width | float | yes | inner channel width, mm |
margin | float | yes | side margin, mm |
min_distance | float | yes | minimum distance between gems, mm |
prong_diameter | float | yes | mm — used when AutomaticProngDiameter is False |
prong_height | float | yes | mm |
prong_move_in_z | float | yes | mm |
prong_type | str | yes | ”NONE”, “SHARED” or “SCALLOPED” |
vertical | float | yes | vertical displacement of the row, mm |
TwoRowsProng (section)
The prong cross-section of a two-rows band.
| Property | Type | Settable | |
|---|---|---|---|
distance | float | yes | mm |
end_prong_count | int | yes | |
external_diameter | float | yes | mm |
internal_diameter | float | yes | mm |
TwoRowsRail (section)
The channel carved on each face of a two-rows band, and how the two gem rows sit in it.
| Property | Type | Settable | |
|---|---|---|---|
central_wall | float | yes | metal left between the two rows in DOUBLE, mm |
cut_orientation | str | yes | ”ANGLED” (follows the face) or “HORIZONTAL”; SINGLE is always horizontal |
end_angle | float | degrees — used when LayoutMode is “SIDE_ANGLE” | |
end_margin | float | yes | gap between the channel end and the first/last gem, mm |
fit_tolerance | float | yes | mm |
layout_mode | str | yes | ”FULL”, “SIDE_ANGLE” or “TOP_ANGLE” |
offset | float | yes | depth carved into the band, mm |
outer_border | float | yes | SINGLE only: metal rim on each side of the band, mm |
rail_mode | str | yes | ”DOUBLE” (one cutter per row) or “SINGLE” (one wider cutter) |
rotation | float | yes | degrees |
row_spacing | float | yes | gap between the two gem rows, mm |
start_angle | float | degrees — used when LayoutMode is “SIDE_ANGLE” | |
top_angle | float | yes | total arc in degrees — used when LayoutMode is “TOP_ANGLE” |
width | float | yes | span of the channel along the face, mm |
| Method | |
|---|---|
set_side_angles(start_angle: float, end_angle: float) |