Python package
ra.pave_shank
Pave shanks: rows of stones along the band.
import rhinoartisan as ra
Wraps ArtisanPlugin.Scripting.PaveShankApi, ArtisanPlugin.Scripting.PaveShankBuilderApi.
Functions
| Function | |
|---|---|
all() | PaveShank handles for every object of this kind in the active document (empty when there is no document). |
by_layer() | PaveShank 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() | PaveShank handles for the objects of this kind currently selected in the active document. |
create() | Builds a pavé shank (the ArtisanPaveShank tool, headless): a classic band carrying one or more longitudinal rows of round stones, each row running along the band at a lateral offset from its centre. |
ra.pave_shank.all()
ra.pave_shank.all() -> List[PaveShank]
PaveShank handles for every object of this kind in the active document (empty when there is no document).
ra.pave_shank.by_layer()
ra.pave_shank.by_layer(layer_name: str) -> List[PaveShank]
PaveShank handles on the layer with the given full path (empty when the layer does not exist).
| Parameter | Type | |
|---|---|---|
layer_name | str | required |
ra.pave_shank.count()
ra.pave_shank.count() -> int
Number of objects of this kind in the active document.
ra.pave_shank.find()
ra.pave_shank.find(id: IdLike) -> PaveShank
The handle for id, or None when the id does not belong to an object of this kind.
| Parameter | Type | |
|---|---|---|
id | IdLike | required |
ra.pave_shank.selected()
ra.pave_shank.selected() -> List[PaveShank]
PaveShank handles for the objects of this kind currently selected in the active document.
ra.pave_shank.create()
ra.pave_shank.create(width=None, height=None, finger_diameter=None, profile=None, opening_type=None, gem_size=None, spacing=None, offset=None, start_angle=None, end_angle=None, mirror=None, row_offsets=None, with_cutters=None, plane=None, element=None) -> PaveShank
Builds a pavé shank (the ArtisanPaveShank tool, headless): a classic band carrying one or more longitudinal rows of round stones, each row running along the band at a lateral offset from its centre. Millimetres; omitting keeps the tool default (or the user’s saved defaults): width 2.5, height 2.5, gem_size 1.2, spacing 0.15, offset 0 (middle of the band). Angles in degrees; NaN keeps the default (start_angle 0, end_angle 360 = full turn). row_offsets given = one row per lateral offset (all sharing gem_size / spacing / angles), otherwise the row settings apply to the default single row; mirror also places every row at -offset. opening_type “NONE” | “CUT” | “STRANGLE” (default STRANGLE). with_cutters subtracts one cutter per stone from the band, like the panel does. finger_diameter 0 = the document’s finger size; profile picks a RING_PROFILE asset by name; plane omitted = world XY. Returns the PaveShank handle of the new shank (stones 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 |
opening_type | str | optional — None = the tool default |
gem_size | float | optional — None = the tool default |
spacing | float | optional — None = the tool default |
offset | float | optional — None = the tool default |
start_angle | float | optional — None = the tool default |
end_angle | float | optional — None = the tool default |
mirror | bool | optional — None = the tool default |
row_offsets | Sequence[float] | 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().
PaveShank (handle)
Pave shank: a band carrying one or more longitudinal rows of stones. Multiple gems, so no single MotherGem.
| Property | Type | Settable | |
|---|---|---|---|
advanced | ClassicAdvanced | ||
cutters_enabled | bool | yes | |
layer_name | str | ||
mother_gem_id | str | ||
object_type | str | ||
position | Point3d | ||
rail | PaveShankRail | ||
ring_diameter_mm | float | ||
ring_size_label | str | ||
ring_size_region | str | ||
top_profile | ClassicProfile | The band section and the opening — the same models the classic shank uses. |
| Method | |
|---|---|
delete() | |
move(translation: VectorLike) | |
set_element(element: str) | Applies a saved PaveShank element (ra.elements.list(“PaveShank”)) to this shank: its band, rows and cutters 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) |
PaveShankRail (section)
The rail: the gem rows the band carries and the prongs holding them.
| Property | Type | Settable | |
|---|---|---|---|
prong_diameter | float | yes | global default, mm |
prong_height | float | yes | global default, mm |
prongs | List[PaveShankProng] | ||
rows | List[PaveShankRow] | yes | |
show_prongs | bool | yes |
| Method | |
|---|---|
set_row(index: int, gem_size: float, offset: float, spacing: float, start_angle: float, end_angle: float) | Edits one row in place. |
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”) |