Python package
ra.advanced_bezel
Bezels with a custom profile.
import rhinoartisan as ra
Wraps ArtisanPlugin.Scripting.AdvancedBezelApi.
Functions
| Function | |
|---|---|
all() | AdvancedBezel handles for every object of this kind in the active document (empty when there is no document). |
by_layer() | AdvancedBezel 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 bezel around an existing gem (gem_id must be a gem in the active document — the bezel is a parametric child of that gem). |
find() | The handle for id, or None when the id does not belong to an object of this kind. |
for_gem() | AdvancedBezel handles whose mother gem is gem_id (empty for None). |
selected() | Advanced bezels currently selected in the active doc. |
ra.advanced_bezel.all()
ra.advanced_bezel.all() -> List[AdvancedBezel]
AdvancedBezel handles for every object of this kind in the active document (empty when there is no document).
ra.advanced_bezel.by_layer()
ra.advanced_bezel.by_layer(layer_name: str) -> List[AdvancedBezel]
AdvancedBezel handles on the layer with the given full path (empty when the layer does not exist).
| Parameter | Type | |
|---|---|---|
layer_name | str | required |
ra.advanced_bezel.count()
ra.advanced_bezel.count() -> int
Number of objects of this kind in the active document.
ra.advanced_bezel.create()
ra.advanced_bezel.create(gem_id: IdLike, height=None, width=None, girdle_height=None, girdle_width=None, gem_inside=None, profile=None, element=None) -> AdvancedBezel
Builds an advanced bezel around an existing gem (gem_id must be a gem in the active document — the bezel is a parametric child of that gem). Same compute pipeline as the ArtisanAdvancedBezel tool, so the result is identical to accepting one from the panel. The wall cross-section comes from the model’s point profile (the saved defaults’ profile when the user stored one, the 6-point default otherwise); cutters and airgaps stay as the defaults configure them. All dimensional arguments are millimetres. Omit (None) to keep the tool’s default — or the user’s saved defaults — for that parameter (height 3.8, width 1.5, girdle height 0.3, girdle width 1.5, gem inside 0). profile picks a BEZEL_PROFILE asset from the library by name (see ra.assets.list(“BEZEL_PROFILE”)); omitted = the default profile (an explicit profile also skips the saved defaults so it cannot be overwritten by them). Throws ArgumentException if gem_id is not a gem and InvalidOperationException when the geometry fails to compute. element = name of a saved element (ra.elements.list) to start from; explicit arguments override it.
| Parameter | Type | |
|---|---|---|
gem_id | IdLike | required |
height | float | optional — None = the tool default |
width | float | optional — None = the tool default |
girdle_height | float | optional — None = the tool default |
girdle_width | float | optional — None = the tool default |
gem_inside | float | optional — None = the tool default |
profile | str | optional — None = the tool default |
element | str | optional — None = the tool default |
ra.advanced_bezel.find()
ra.advanced_bezel.find(id: IdLike) -> AdvancedBezel
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_bezel.for_gem()
ra.advanced_bezel.for_gem(gem_id: IdLike) -> List[AdvancedBezel]
AdvancedBezel handles whose mother gem is gem_id (empty for None).
| Parameter | Type | |
|---|---|---|
gem_id | IdLike | required |
ra.advanced_bezel.selected()
ra.advanced_bezel.selected() -> List[AdvancedBezel]
Advanced bezels currently selected in the active doc. Empty list if nothing is selected or the selection contains no advanced bezels.
Handles
Objects returned by the functions above. Assigning a settable property regenerates the object; the change is one undo step inside ra.transaction().
AdvancedBezel (handle)
An advanced bezel wraps exactly one mother gem, like Bezel, but its wall is a freely editable point profile instead of a swept asset. Read-only beyond the base mutations: the parametric engine has no Regenerate for advanced bezels, so there are no in-place setters (recreate + Delete to change one).
| Property | Type | Settable | |
|---|---|---|---|
gem_carat_weight | float | ||
gem_inside | float | yes | |
gem_material | str | ||
gem_shape | str | ||
girdle_height | float | yes | millimetres |
girdle_width | float | yes | millimetres |
height | float | yes | wall height, millimetres |
layer_name | str | ||
mother_gem_id | str | ||
object_type | str | ||
position | Point3d | ||
width | float | yes | wall width, millimetres |
| Method | |
|---|---|
delete() | |
move(translation: VectorLike) | |
set_element(element: str) | Applies a saved AdvancedBezel element (ra.elements.list(“AdvancedBezel”)) to this bezel: its parameters replace the current ones, the mother gem stays, and the bezel is recomputed in place (same Guid). |
Plus what every handle has: id, delete(), update(**kwargs), parameters(), equality and hashing by id, and raw (the underlying .NET object).