Python package
ra.classic
Classic ring shanks: comfort-fit bands at the document finger size, optionally with a stone row.
import rhinoartisan as ra
Wraps ArtisanPlugin.Scripting.ClassicApi.
Functions
| Function | |
|---|---|
all() | Classic handles for every object of this kind in the active document (empty when there is no document). |
by_layer() | Classic 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 classic ring shank (the ArtisanClassic tool, headless): a comfort-fit band at the document’s finger size, optionally with a row of gems around the top. |
find() | The handle for id, or None when the id does not belong to an object of this kind. |
selected() | Classics currently selected in the active doc. |
ra.classic.all()
ra.classic.all() -> List[Classic]
Classic handles for every object of this kind in the active document (empty when there is no document).
ra.classic.by_layer()
ra.classic.by_layer(layer_name: str) -> List[Classic]
Classic handles on the layer with the given full path (empty when the layer does not exist).
| Parameter | Type | |
|---|---|---|
layer_name | str | required |
ra.classic.count()
ra.classic.count() -> int
Number of objects of this kind in the active document.
ra.classic.create()
ra.classic.create(width=None, height=None, finger_diameter=None, with_gems=None, gem_size=None, gems_angle=None, profile=None, plane=None, element=None) -> Classic
Builds a classic ring shank (the ArtisanClassic tool, headless): a comfort-fit band at the document’s finger size, optionally with a row of gems around the top. This is the scriptable way to give a design its ring body. Millimetres; omitting keeps the tool default (or the user’s saved defaults): width 3, height 2. finger_diameter 0 = the document’s configured finger size. with_gems True enables the gem row (gem_size default 1.2 mm, gems_angle default 180 degrees of the shank covered). profile picks a RING_PROFILE asset by name; omitted = the default profile. plane omitted = world XY. Returns an Classic handle to the new shank. 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 |
with_gems | bool | optional — None = the tool default |
gem_size | float | optional — None = the tool default |
gems_angle | float | optional — None = the tool default |
profile | str | optional — None = the tool default |
plane | Optional[PlaneLike] | optional — None = the tool default |
element | str | optional — None = the tool default |
ra.classic.find()
ra.classic.find(id: IdLike) -> Classic
The handle for id, or None when the id does not belong to an object of this kind.
| Parameter | Type | |
|---|---|---|
id | IdLike | required |
ra.classic.selected()
ra.classic.selected() -> List[Classic]
Classics currently selected in the active doc.
Handles
Objects returned by the functions above. Assigning a settable property regenerates the object; the change is one undo step inside ra.transaction().
Classic (handle)
Classic ring shank (multiple gems possible) — no single MotherGem.
| Property | Type | Settable | |
|---|---|---|---|
advanced | ClassicAdvanced | ||
bottom_profile | ClassicProfile | ||
external_profile | ClassicExternalProfile | ||
gems | ClassicGems | ||
layer_name | str | ||
mid_profile | ClassicProfile | ||
mother_gem_id | str | ||
object_type | str | ||
position | Point3d | ||
ring_diameter_mm | float | ||
ring_size_label | str | ||
ring_size_region | str | ||
top_profile | ClassicProfile | Parameter sections — each is a live view over the shank’s stored parameters; their setters regenerate the shank in place (same Guid) and call LicenseGate.RequireValid() first. Millimetres. |
| Method | |
|---|---|
delete() | |
move(translation: VectorLike) | |
set_element(element: str) | Applies a saved Classic element (ra.elements.list(“Classic”)) to this shank: its parameters replace the current ones, the ring size stays, and the shank regenerates in place (same id). |
set_height(height: float) | |
set_width(width: float) | Shortcuts for the two most common edits — same effect as TopProfile.SetWidth / TopProfile.SetHeight. |
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 |