Skip to content

Python package

ra.advanced_pave_shank

Advanced pave shanks: rows of stones you lay out along the band.

import rhinoartisan as ra

Wraps ArtisanPlugin.Scripting.AdvancedPaveShankApi, ArtisanPlugin.Scripting.AdvancedPaveShankBuilderApi.

Functions

Function
all()AdvancedPaveShank handles for every object of this kind in the active document (empty when there is no document).
by_layer()AdvancedPaveShank 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()AdvancedPaveShank handles for the objects of this kind currently selected in the active document.
create()Builds an advanced pavé shank (the Advanced Pavé Shank tool, ArtisanAdvancedPaveShank, 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.advanced_pave_shank.all()

ra.advanced_pave_shank.all() -> List[AdvancedPaveShank]

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

ra.advanced_pave_shank.by_layer()

ra.advanced_pave_shank.by_layer(layer_name: str) -> List[AdvancedPaveShank]

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

ParameterType
layer_namestrrequired

ra.advanced_pave_shank.count()

ra.advanced_pave_shank.count() -> int

Number of objects of this kind in the active document.

ra.advanced_pave_shank.find()

ra.advanced_pave_shank.find(id: IdLike) -> AdvancedPaveShank

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

ParameterType
idIdLikerequired

ra.advanced_pave_shank.selected()

ra.advanced_pave_shank.selected() -> List[AdvancedPaveShank]

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

ra.advanced_pave_shank.create()

ra.advanced_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) -> AdvancedPaveShank

Builds an advanced pavé shank (the Advanced Pavé Shank tool, ArtisanAdvancedPaveShank, 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. element = name of a saved PaveShank element (ra.elements.list(“PaveShank”)) to start from; explicit arguments override it (its finger size is always replaced). Returns the AdvancedPaveShank handle of the new shank (stones and prongs are its children).

ParameterType
widthfloatoptional — None = the tool default
heightfloatoptional — None = the tool default
finger_diameterfloatoptional — None = the tool default
profilestroptional — None = the tool default
opening_typestroptional — None = the tool default
gem_sizefloatoptional — None = the tool default
spacingfloatoptional — None = the tool default
offsetfloatoptional — None = the tool default
start_anglefloatoptional — None = the tool default
end_anglefloatoptional — None = the tool default
mirrorbooloptional — None = the tool default
row_offsetsSequence[float]optional — 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().

AdvancedPaveShank (handle)

Pave shank: a band carrying one or more longitudinal rows of stones. Multiple gems, so no single MotherGem.

PropertyTypeSettable
advancedClassicAdvanced
cutters_enabledboolyes
layer_namestr
mother_gem_idstr
object_typestr
positionPoint3d
railAdvancedPaveShankRail
ring_diameter_mmfloat
ring_size_labelstr
ring_size_regionstr
top_profileClassicProfileThe 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.

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)

AdvancedPaveShankRail (section)

The rail: the gem rows the band carries and the prongs holding them.

PropertyTypeSettable
prong_diameterfloatyesglobal default, mm
prong_heightfloatyesglobal default, mm
prongsList[AdvancedPaveShankProng]
rowsList[AdvancedPaveShankRow]yes
show_prongsboolyes
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.

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”)