Python package
ra.bezel
Bezel settings with support, cutter and air-gap sections.
import rhinoartisan as ra
Wraps ArtisanPlugin.Scripting.BezelApi.
Functions
| Function | |
|---|---|
all() | Bezel handles for every object of this kind in the active document (empty when there is no document). |
by_layer() | Bezel 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 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() | Bezel handles whose mother gem is gem_id (empty for None). |
selected() | Bezels currently selected in the active doc. |
ra.bezel.all()
ra.bezel.all() -> List[Bezel]
Bezel handles for every object of this kind in the active document (empty when there is no document).
ra.bezel.by_layer()
ra.bezel.by_layer(layer_name: str) -> List[Bezel]
Bezel handles on the layer with the given full path (empty when the layer does not exist).
| Parameter | Type | |
|---|---|---|
layer_name | str | required |
ra.bezel.count()
ra.bezel.count() -> int
Number of objects of this kind in the active document.
ra.bezel.create()
ra.bezel.create(gem_id: IdLike, height=None, width=None, girdle_height=None, girdle_width=None, gem_inside=None, profile=None, support_count=None, support_width=None, support_thickness=None, cutter_count=None, cutter_width=None, cutter_height=None, cutter_profile=None, airgap_count=None, airgap_width=None, airgap_height=None, airgap_profile=None, element=None) -> Bezel
Builds a bezel around an existing gem (gem_id must be a gem in the active document — the bezel is a parametric child of that gem). Uses the same default profile assets and compute pipeline as the ArtisanBezel tool, so the result is identical to inserting one from the panel. All dimensional arguments are millimetres. Omit (None) to keep the tool’s default 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. The support posts and the two piercing blocks (cutters and air gaps, both OFF by default) are opened here by their count: passing cutter_count/airgap_count > 0 enables that block. Their signed parameters — displacement and the three rotations — are not arguments here, because 0 is a meaningful value for them and this signature reads 0 as “keep the default”; set those through the returned handle (bezel.cutters.vertical_rotation = ...), which takes literal values. Throws if gem_id is not a gem, if the bezel geometry fails to compute, or if the license is invalid.
| 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 |
support_count | int | optional — None = the tool default |
support_width | float | optional — None = the tool default |
support_thickness | float | optional — None = the tool default |
cutter_count | int | optional — None = the tool default |
cutter_width | float | optional — None = the tool default |
cutter_height | float | optional — None = the tool default |
cutter_profile | str | optional — None = the tool default |
airgap_count | int | optional — None = the tool default |
airgap_width | float | optional — None = the tool default |
airgap_height | float | optional — None = the tool default |
airgap_profile | str | optional — None = the tool default |
element | str | optional — None = the tool default |
ra.bezel.find()
ra.bezel.find(id: IdLike) -> Bezel
The handle for id, or None when the id does not belong to an object of this kind.
| Parameter | Type | |
|---|---|---|
id | IdLike | required |
ra.bezel.for_gem()
ra.bezel.for_gem(gem_id: IdLike) -> List[Bezel]
Bezel handles whose mother gem is gem_id (empty for None).
| Parameter | Type | |
|---|---|---|
gem_id | IdLike | required |
ra.bezel.selected()
ra.bezel.selected() -> List[Bezel]
Bezels currently selected in the active doc. Empty list if nothing is selected or the selection contains no bezels.
Handles
Objects returned by the functions above. Assigning a settable property regenerates the object; the change is one undo step inside ra.transaction().
Bezel (handle)
| Property | Type | Settable | |
|---|---|---|---|
air_gaps | BezelPiercing | ||
cutters | BezelPiercing | ||
gem_carat_weight | float | ||
gem_inside | float | yes | |
gem_material | str | ||
gem_shape | str | ||
girdle_height | float | yes | |
girdle_width | float | yes | |
height | float | yes | Current values of the bezel wall (millimetres). |
layer_name | str | ||
mother_gem_id | str | ||
object_type | str | ||
position | Point3d | ||
profile_name | str | BEZEL_PROFILE asset name, "" when unset | |
support | BezelSupport | The rest of the tool’s parameters, grouped as the panel groups them. | |
width | float | yes |
| Method | |
|---|---|
delete() | |
move(translation: VectorLike) | |
set_element(element: str) | Applies a saved Bezel element (ra.elements.list(“Bezel”)) to this bezel: its parameters replace the current ones, the mother gem stays, and the bezel regenerates in place (same Guid). |
set_profile(asset_name: str) | BEZEL_PROFILE asset name |
Plus what every handle has: id, delete(), update(**kwargs), parameters(), equality and hashing by id, and raw (the underlying .NET object).
BezelPiercing (section)
The repeated solids pierced around the bezel wall. The same shape drives two independent sections: the CUTTERS (subtracted, the classic scalloped windows) and the AIR GAPS (the openings under the girdle).
| Property | Type | Settable | |
|---|---|---|---|
count | int | yes | how many are distributed around the bezel |
displacement | float | yes | mm along the bezel axis, SIGNED |
enabled | bool | yes | |
global_rotation | float | yes | degrees, the whole ring of piercings, SIGNED |
height | float | yes | mm |
profile_name | str | CLOSED_PROFILE asset name, "" when unset | |
rotation | float | yes | degrees, each piercing around its own axis, SIGNED |
vertical_rotation | float | yes | degrees, tilt of each piercing, SIGNED |
width | float | yes | mm |
| Method | |
|---|---|
set_profile(asset_name: str) | CLOSED_PROFILE asset name |
BezelSupport (section)
The posts that hold the bezel over the shank.
| Property | Type | Settable | |
|---|---|---|---|
count | int | yes | number of support posts, 0 = none (max 6) |
thickness | float | yes | mm |
width | float | yes | mm |