Skip to content

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).

ParameterType
layer_namestrrequired

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.

ParameterType
gem_idIdLikerequired
heightfloatoptional — None = the tool default
widthfloatoptional — None = the tool default
girdle_heightfloatoptional — None = the tool default
girdle_widthfloatoptional — None = the tool default
gem_insidefloatoptional — None = the tool default
profilestroptional — None = the tool default
support_countintoptional — None = the tool default
support_widthfloatoptional — None = the tool default
support_thicknessfloatoptional — None = the tool default
cutter_countintoptional — None = the tool default
cutter_widthfloatoptional — None = the tool default
cutter_heightfloatoptional — None = the tool default
cutter_profilestroptional — None = the tool default
airgap_countintoptional — None = the tool default
airgap_widthfloatoptional — None = the tool default
airgap_heightfloatoptional — None = the tool default
airgap_profilestroptional — None = the tool default
elementstroptional — 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.

ParameterType
idIdLikerequired

ra.bezel.for_gem()

ra.bezel.for_gem(gem_id: IdLike) -> List[Bezel]

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

ParameterType
gem_idIdLikerequired

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)

PropertyTypeSettable
air_gapsBezelPiercing
cuttersBezelPiercing
gem_carat_weightfloat
gem_insidefloatyes
gem_materialstr
gem_shapestr
girdle_heightfloatyes
girdle_widthfloatyes
heightfloatyesCurrent values of the bezel wall (millimetres).
layer_namestr
mother_gem_idstr
object_typestr
positionPoint3d
profile_namestrBEZEL_PROFILE asset name, "" when unset
supportBezelSupportThe rest of the tool’s parameters, grouped as the panel groups them.
widthfloatyes
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).

PropertyTypeSettable
countintyeshow many are distributed around the bezel
displacementfloatyesmm along the bezel axis, SIGNED
enabledboolyes
global_rotationfloatyesdegrees, the whole ring of piercings, SIGNED
heightfloatyesmm
profile_namestrCLOSED_PROFILE asset name, "" when unset
rotationfloatyesdegrees, each piercing around its own axis, SIGNED
vertical_rotationfloatyesdegrees, tilt of each piercing, SIGNED
widthfloatyesmm
Method
set_profile(asset_name: str)CLOSED_PROFILE asset name

BezelSupport (section)

The posts that hold the bezel over the shank.

PropertyTypeSettable
countintyesnumber of support posts, 0 = none (max 6)
thicknessfloatyesmm
widthfloatyesmm