Skip to content

Python package

ra.advanced_basket

Baskets with independent prong and rail profiles.

import rhinoartisan as ra

Wraps ArtisanPlugin.Scripting.AdvancedBasketApi.

Functions

Function
all()AdvancedBasket handles for every object of this kind in the active document (empty when there is no document).
by_layer()AdvancedBasket 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 an advanced basket setting under an existing gem — the ArtisanAdvancedBasket tool, headless.
find()The handle for id, or None when the id does not belong to an object of this kind.
for_gem()AdvancedBasket handles whose mother gem is gem_id (empty for None).
presets()The prong layouts the tool ships for a gem shape, by name — the same list the panel draws as its preset row.
selected()Advanced baskets currently selected in the active doc.

ra.advanced_basket.all()

ra.advanced_basket.all() -> List[AdvancedBasket]

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

ra.advanced_basket.by_layer()

ra.advanced_basket.by_layer(layer_name: str) -> List[AdvancedBasket]

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

ParameterType
layer_namestrrequired

ra.advanced_basket.count()

ra.advanced_basket.count() -> int

Number of objects of this kind in the active document.

ra.advanced_basket.create()

ra.advanced_basket.create(gem_ids=None, prongs=None, prong_mode=None, prong_diameter=None, prong_height=None, rails=None, rail_width=None, profile=None, preset=None, positions=None, element=None) -> List[AdvancedBasket]

Builds an advanced basket setting under an existing gem — the ArtisanAdvancedBasket tool, headless. One basket (its own group) per gem; gem_ids None/empty = the currently selected gems. Unlike the basic Basket, the advanced basket is a free layout: a list of individually placed prongs plus a list of rails. This facade lays both out evenly, like the tool’s presets. Millimetres; 0/None keeps the tool default (or the user’s saved defaults): prongs 0 keeps the saved layout, or 4 prongs at the diagonals when there is none (the tool’s “4” preset); a positive count places that many prongs evenly around the gem. prong_mode None = ROUND; also DOUBLE (the 2-2 presets), TRIPLE (3-3), CLAW, OFFSET or CUSTOM, applied to every prong (DEFAULT and CIRCLE also mean ROUND; claw tips are built in Render mode only and are tuned through the handle). prong_diameter 0 keeps 1.5 (sets top and bottom together), prong_height 0 keeps 4. rails None keeps the saved rails (a fresh basket has none); 0 = no rails, 1 = one rail 1 mm under the girdle, 2 adds a second at 3.66 (the tool’s 1-rail / 2-rail presets; more keep the same spacing). rail_width 0 keeps 1.5, applied to every rail. profile names a CLOSED_PROFILE asset for the prongs (see ra.assets.list) and switches them to CUSTOM mode unless prong_mode says otherwise; None keeps each mode’s built-in section. Returns one AdvancedBasket handle per gem, in input order. element = name of a saved AdvancedBasket element (ra.elements.list(“AdvancedBasket”)) to start from instead of the defaults, re-seeded onto each gem; explicit arguments override it.

ParameterType
gem_idsSequence[IdLike]optional — None = the tool default
prongsintoptional — None = the tool default
prong_modestroptional — None = the tool default
prong_diameterfloatoptional — None = the tool default
prong_heightfloatoptional — None = the tool default
railsOptional[int]optional — None = the tool default
rail_widthfloatoptional — None = the tool default
profilestroptional — None = the tool default
presetstroptional — None = the tool default
positionsSequence[float]optional — None = the tool default
elementstroptional — None = the tool default

ra.advanced_basket.find()

ra.advanced_basket.find(id: IdLike) -> AdvancedBasket

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

ParameterType
idIdLikerequired

ra.advanced_basket.for_gem()

ra.advanced_basket.for_gem(gem_id: IdLike) -> List[AdvancedBasket]

AdvancedBasket handles whose mother gem is gem_id (empty for None).

ParameterType
gem_idIdLikerequired

ra.advanced_basket.presets()

ra.advanced_basket.presets(gem_id: IdLike) -> List[str]

The prong layouts the tool ships for a gem shape, by name — the same list the panel draws as its preset row. Pass one of these as Create’s preset. Names look like “4”, “4-V”, “2-2”, “3-3”, “6”, “8” or “NONE”; which ones exist depends on the shape (an emerald gets corner layouts, a marquise gets tip layouts…).

ParameterType
gem_idIdLikerequired

ra.advanced_basket.selected()

ra.advanced_basket.selected() -> List[AdvancedBasket]

Advanced baskets 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().

AdvancedBasket (handle)

PropertyTypeSettable
claw_cap_distancefloatyesThe claw tips of CLAW prongs (built in Render mode only), first prong’s values. mm the apex is pulled in toward the gem centre.
claw_cap_heightfloatyesmm the apex moves up (+) or down (-)
claw_tip_smoothnessfloatyesbody-to-tip blend, 0-1
claw_tip_widthfloatyesapex thickness as a fraction of the prong: 0 sharp point - 1 full
gem_carat_weightfloat
gem_materialstr
gem_shapestr
layer_namestr
mother_gem_idstr
object_typestr
parameters_jsonstrEvery value of every prong and rail, as the panel’s per-prong and per-rail editors hold them: the model’s JSON, whose paths GetParameter / SetParameter take.
positionPoint3d
prong_countintyesUnlike the basic Basket, the advanced basket stores one entry per prong/rail, each with its own settings. The scalar getters report the first prong’s values (0 when there are none).
prong_diameterfloatyes
prong_heightfloatyes
prong_modestryes”ROUND” | “CUSTOM” | “CLAW” | “OFFSET” | “DOUBLE” | “TRIPLE” when every prong shares it, “MIXED” when the prongs differ (the panel’s per-prong editor), "" with no prongs.
rail_countintyes
rail_gemsCathedralGemsThe gems on the rails’ outer face, between the prongs (the panel’s Rail Gems): the same section a cathedral’s gems use, off by default. The getters report the first rail’s; every setter applies to every rail (for one rail alone use SetParameter, “rails[1].gems.enable”). Every free stretch between prongs takes as many stones as fit, so Mode, Count and Angle are not used. ProngType is “FLUSH”, “SHARED” (prongs) or “SCALLOPED”, never “NONE”. While they are enabled a rail is built with the SQUARE section and grows to hold the stones; a bent rail takes none.
rail_modestryes”ROUND” | “SQUARE” | “CUSTOM” when every rail shares it, “MIXED” when the rails differ (the panel’s per-rail editor), "" with no rails.
Method
delete()
get_parameter(path: str) -> strOne value by path: “Prongs[0].Inclination”, “rails[1].fillet_radius” (case and underscores ignored); None for an unknown path.
move(translation: VectorLike)
set_element(element: str)Applies a saved AdvancedBasket element (ra.elements.list(“AdvancedBasket”)) to this basket: its prongs and rails replace the current ones, re-seeded onto the mother gem (which stays) so the layout keeps its direction on this cut, and the basket regenerates in place (same id).
set_parameter(path: str, value: str)Sets one value by path, as text (“0.4”, “True”); ”[]” sets it on every prong or rail (“prongs[].gem_inside”).

Plus what every handle has: id, delete(), update(**kwargs), parameters(), equality and hashing by id, and raw (the underlying .NET object).

CathedralGems (section)

The pavé row a cathedral carries along its top — one run per arm.

PropertyTypeSettable
anglefloatyesdegrees of the band covered by gems (180 = top half)
automatic_prong_diameterboolyes
automatic_prong_distanceboolyesSHARED: True, the two prongs of a gap sit where they fit tangent to the stones and the channel edges (they follow the channel width); False, at ProngDistance
bright_cutfloatyesbright-cut width, mm
countintyesnumber of gems per side (per arm) in “COUNT” mode
double_prong_settingboolyes
drill_allow_intersectionboolyes
drill_enabledboolyes
drill_heightfloatyesmm
drill_typestryes”NONE”, “ROUND” or “QUAD”
drill_visibleboolyesbake the drill cutters as visible objects
drill_widthfloatyesmm
enabledboolyes
extension_for_manufacturingfloatyesmm
gem_insidefloatyeshow deep the gems sit inside, mm
gem_shapestryes”ROUND”, “PRINCESS”, …
gem_sizefloatyesmm
inner_heightfloatyesinner channel height, mm
inner_marginfloatyesinner margin, mm
inner_widthfloatyesinner channel width, mm
marginfloatyesside margin, mm
min_distancefloatyesminimum distance between gems, mm
modestryes”ANGLE” (the gems cover Angle, the count follows) or “COUNT” (exactly Count gems per side, the angle follows)
prong_diameterfloatyesmm — used when AutomaticProngDiameter is False
prong_distancefloatyesSHARED, mm: centre-to-centre distance across the channel between the two prongs of a gap when AutomaticProngDistance is False; 0 = a single prong on the centre line
prong_heightfloatyesmm
prong_typestryes”FLUSH” (no channel), “NONE” (channel), “SHARED” or “SCALLOPED”
scallop_gem_heightfloat
scallop_gem_widthfloatScalloped-setting proportions (percentages, not mm).
scallop_prong_heightfloat
scallop_prong_widthfloat
scallop_rail_heightfloat
scallop_rail_widthfloat
scallop_remove_channelboolyesSHARED and SCALLOPED: True drops the channel under the stones (FLUSH never has it)
verticalfloatyesvertical displacement of the row, mm
Method
set_scallop_gem(width: float, height: float)
set_scallop_prong(width: float, height: float)
set_scallop_rail(width: float, height: float)