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).
| Parameter | Type | |
|---|---|---|
layer_name | str | required |
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.
| Parameter | Type | |
|---|---|---|
gem_ids | Sequence[IdLike] | optional — None = the tool default |
prongs | int | optional — None = the tool default |
prong_mode | str | optional — None = the tool default |
prong_diameter | float | optional — None = the tool default |
prong_height | float | optional — None = the tool default |
rails | Optional[int] | optional — None = the tool default |
rail_width | float | optional — None = the tool default |
profile | str | optional — None = the tool default |
preset | str | optional — None = the tool default |
positions | Sequence[float] | optional — None = the tool default |
element | str | optional — 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.
| Parameter | Type | |
|---|---|---|
id | IdLike | required |
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).
| Parameter | Type | |
|---|---|---|
gem_id | IdLike | required |
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…).
| Parameter | Type | |
|---|---|---|
gem_id | IdLike | required |
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)
| Property | Type | Settable | |
|---|---|---|---|
claw_cap_distance | float | yes | The 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_height | float | yes | mm the apex moves up (+) or down (-) |
claw_tip_smoothness | float | yes | body-to-tip blend, 0-1 |
claw_tip_width | float | yes | apex thickness as a fraction of the prong: 0 sharp point - 1 full |
gem_carat_weight | float | ||
gem_material | str | ||
gem_shape | str | ||
layer_name | str | ||
mother_gem_id | str | ||
object_type | str | ||
parameters_json | str | Every 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. | |
position | Point3d | ||
prong_count | int | yes | Unlike 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_diameter | float | yes | |
prong_height | float | yes | |
prong_mode | str | yes | ”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_count | int | yes | |
rail_gems | CathedralGems | The 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_mode | str | yes | ”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) -> str | One 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.
| Property | Type | Settable | |
|---|---|---|---|
angle | float | yes | degrees of the band covered by gems (180 = top half) |
automatic_prong_diameter | bool | yes | |
automatic_prong_distance | bool | yes | SHARED: 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_cut | float | yes | bright-cut width, mm |
count | int | yes | number of gems per side (per arm) in “COUNT” mode |
double_prong_setting | bool | yes | |
drill_allow_intersection | bool | yes | |
drill_enabled | bool | yes | |
drill_height | float | yes | mm |
drill_type | str | yes | ”NONE”, “ROUND” or “QUAD” |
drill_visible | bool | yes | bake the drill cutters as visible objects |
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_margin | float | yes | inner margin, mm |
inner_width | float | yes | inner channel width, mm |
margin | float | yes | side margin, mm |
min_distance | float | yes | minimum distance between gems, mm |
mode | str | yes | ”ANGLE” (the gems cover Angle, the count follows) or “COUNT” (exactly Count gems per side, the angle follows) |
prong_diameter | float | yes | mm — used when AutomaticProngDiameter is False |
prong_distance | float | yes | SHARED, 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_height | float | yes | mm |
prong_type | str | yes | ”FLUSH” (no channel), “NONE” (channel), “SHARED” or “SCALLOPED” |
scallop_gem_height | float | ||
scallop_gem_width | float | Scalloped-setting proportions (percentages, not mm). | |
scallop_prong_height | float | ||
scallop_prong_width | float | ||
scallop_rail_height | float | ||
scallop_rail_width | float | ||
scallop_remove_channel | bool | yes | SHARED and SCALLOPED: True drops the channel under the stones (FLUSH never has it) |
vertical | float | yes | vertical 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) |