Python package
ra.split_shank
Split shanks.
import rhinoartisan as ra
Wraps ArtisanPlugin.Scripting.SplitShankApi.
Functions
| Function | |
|---|---|
all() | SplitShank handles for every object of this kind in the active document (empty when there is no document). |
by_layer() | SplitShank 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. |
create() | Builds a split shank — the ArtisanSplitShank tool, headless. |
find() | The handle for id, or None when the id does not belong to an object of this kind. |
selected() | SplitShank handles for the objects of this kind currently selected in the active document. |
ra.split_shank.all()
ra.split_shank.all() -> List[SplitShank]
SplitShank handles for every object of this kind in the active document (empty when there is no document).
ra.split_shank.by_layer()
ra.split_shank.by_layer(layer_name: str) -> List[SplitShank]
SplitShank handles on the layer with the given full path (empty when the layer does not exist).
| Parameter | Type | |
|---|---|---|
layer_name | str | required |
ra.split_shank.count()
ra.split_shank.count() -> int
Number of objects of this kind in the active document.
ra.split_shank.create()
ra.split_shank.create(finger_diameter=None, opening_length=None, arm_height=None, split_width=None, split_start=None, top_size=None, bottom_size=None, plane=None, element=None) -> SplitShank
Builds a split shank — the ArtisanSplitShank tool, headless. Millimetres / degrees; omitting keeps the tool default (or the user’s saved defaults). finger_diameter 0 = the document’s finger size. Returns an SplitShank handle to the new shank. element = name of a saved element (ra.elements.list) to start from; explicit arguments override it.
| Parameter | Type | |
|---|---|---|
finger_diameter | float | optional — None = the tool default |
opening_length | float | optional — None = the tool default |
arm_height | float | optional — None = the tool default |
split_width | float | optional — None = the tool default |
split_start | float | optional — None = the tool default |
top_size | float | optional — None = the tool default |
bottom_size | float | optional — None = the tool default |
plane | Optional[PlaneLike] | optional — None = the tool default |
element | str | optional — None = the tool default |
ra.split_shank.find()
ra.split_shank.find(id: IdLike) -> SplitShank
The handle for id, or None when the id does not belong to an object of this kind.
| Parameter | Type | |
|---|---|---|
id | IdLike | required |
ra.split_shank.selected()
ra.split_shank.selected() -> List[SplitShank]
SplitShank handles for the objects of this kind currently selected in the active document.
Handles
Objects returned by the functions above. Assigning a settable property regenerates the object; the change is one undo step inside ra.transaction().
SplitShank (handle)
Split shank: a band that opens into two arms toward the setting. Multiple gems, so no single MotherGem.
| Property | Type | Settable | |
|---|---|---|---|
curve | SplitShankCurve | ||
gems | SplitShankGems | ||
layer_name | str | ||
mother_gem_id | str | ||
object_type | str | ||
position | Point3d | ||
ring_diameter_mm | float | ||
ring_size_label | str | ||
ring_size_region | str | ||
sections | List[SplitShankSection] | The three swept profiles, ordered bottom -> side -> top. |
| Method | |
|---|---|
delete() | |
move(translation: VectorLike) | |
set_element(element: str) | Applies a saved SplitShank element (ra.elements.list(“SplitShank”)) to this shank: its parameters replace the current ones, the ring size stays, and the shank regenerates in place (same id). |
set_section(index: int, position: float, width: float, height: float, type=None, profile_name=None) | Edits one of the three sections in place. |
set_section_enabled(index: int, enabled: bool) |
Plus what every handle has: id, delete(), update(**kwargs), parameters(), equality and hashing by id, and raw (the underlying .NET object).
SplitShankCurve (section)
The rail a split shank is swept along: how the arms rise, open and split.
| Property | Type | Settable | |
|---|---|---|---|
arm_height | float | yes | rise of the arm tips above the ring top, mm |
arm_offset | float | yes | extra outward bulge beyond the reference shape, mm |
lateral_displacement | float | yes | Y displacement of the arm tips, mm |
lateral_inclination | float | yes | inclination of the arms along the finger axis, degrees |
opening_length | float | yes | frontal X distance between the arm tips, mm (0 = touching) |
split_start | float | yes | where along the rail the split begins, 0..1 |
split_width | float | yes | separation between the front and back arm pairs, mm |
SplitShankGems (section)
The pave run along a split shank’s arms, with a top-to-bottom size gradient.
| Property | Type | Settable | |
|---|---|---|---|
automatic_prong_diameter | bool | yes | |
bottom_size | float | stone size at the ring bottom, mm | |
bright_cut | float | yes | mm |
channel_clearance | float | yes | mm |
channel_shape | str | yes | |
drill_type | str | yes | ”NONE”, “ROUND” or “QUAD” |
enabled | bool | yes | |
flip_end | bool | yes | |
flip_start | bool | yes | |
gem_inside | float | yes | mm |
inner_height | float | yes | mm |
inner_width | float | yes | mm |
margin_bottom | float | run start, in mm of arc length from the rail start (Start gumball) | |
margin_top | float | how far below the arm tip the gem run stops, mm (End gumball) | |
min_distance | float | yes | mm |
move_in_z | float | yes | mm |
prong_diameter | float | yes | mm |
prong_height | float | yes | mm |
prong_type | str | yes | ”NONE”, “SHARED” or “SCALLOPED” |
shank_size | float | yes | mm |
shape | str | yes | ”ROUND”, “PRINCESS”, … |
spacing | float | yes | gap between gems (arms and trunk alike), mm |
top_size | float | stone size at the arm tip, mm | |
transition_size | float | yes | mm |
v_cutters | bool | yes | |
vertical | float | yes | mm |
| Method | |
|---|---|
clear_gem_sizes() | drop every per-stone override (back to the size gradient) |
set_gem_size(position: float, diameter: float) | per-stone override; position = normalised rail t (0..1), snaps to the nearest stone |
set_margins(top: float, bottom: float) | |
set_sizes(top_size: float, bottom_size: float) |