Skip to content

Python package

ra.halo

A halo of small stones around a centre stone.

import rhinoartisan as ra

Wraps ArtisanPlugin.Scripting.HaloApi.

Functions

Function
all()Halo handles for every object of this kind in the active document (empty when there is no document).
by_layer()Halo 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 halo of small stones around an existing gem — the ArtisanHalo tool, headless.
find()The handle for id, or None when the id does not belong to an object of this kind.
for_gem()Halo handles whose mother gem is gem_id (empty for None).
selected()Halos currently selected in the active doc.

ra.halo.all()

ra.halo.all() -> List[Halo]

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

ra.halo.by_layer()

ra.halo.by_layer(layer_name: str) -> List[Halo]

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

ParameterType
layer_namestrrequired

ra.halo.count()

ra.halo.count() -> int

Number of objects of this kind in the active document.

ra.halo.create()

ra.halo.create(gem_id: IdLike, stone_size=None, stone_distance=None, distance_to_gem=None, channel_width=None, channel_height=None, prong_type=None, profile=None, channel_position_z=None, channel_rotation=None, channel_bright_cut=None, channel_inner_width=None, channel_inner_height=None, stone_vertical=None, stone_gem_inside=None, drill_type=None, force_even_number=None, prong_count=None, prong_diameter=None, prong_profile=None, element=None) -> Halo

Builds a halo of small stones around an existing gem — the ArtisanHalo tool, headless. gem_id must be a gem in the active document with a halo-friendly shape (ROUND, CUSHION, EMERALD, OVAL, RADIANT, ASSCHER, PEAR). Millimetres; omitting keeps the tool default (or the user’s saved defaults): stone_size 1.2, stone_distance 0.2, distance_to_gem 1.2, channel_width 1.5, channel_height 1.5. prong_type is NONE (default), SHARED or SCALLOPED. profile picks a CHANNEL_PROFILE asset by name; omitted = the default profile. Returns an Halo handle to the new halo group. element = name of a saved element (ra.elements.list) to start from; explicit arguments override it.

ParameterType
gem_idIdLikerequired
stone_sizefloatoptional — None = the tool default
stone_distancefloatoptional — None = the tool default
distance_to_gemfloatoptional — None = the tool default
channel_widthfloatoptional — None = the tool default
channel_heightfloatoptional — None = the tool default
prong_typestroptional — None = the tool default
profilestroptional — None = the tool default
channel_position_zfloatoptional — None = the tool default
channel_rotationfloatoptional — None = the tool default
channel_bright_cutfloatoptional — None = the tool default
channel_inner_widthfloatoptional — None = the tool default
channel_inner_heightfloatoptional — None = the tool default
stone_verticalfloatoptional — None = the tool default
stone_gem_insidefloatoptional — None = the tool default
drill_typestroptional — None = the tool default
force_even_numberOptional[bool]optional — None = the tool default
prong_countintoptional — None = the tool default
prong_diameterfloatoptional — None = the tool default
prong_profilestroptional — None = the tool default
elementstroptional — None = the tool default

ra.halo.find()

ra.halo.find(id: IdLike) -> Halo

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

ParameterType
idIdLikerequired

ra.halo.for_gem()

ra.halo.for_gem(gem_id: IdLike) -> List[Halo]

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

ParameterType
gem_idIdLikerequired

ra.halo.selected()

ra.halo.selected() -> List[Halo]

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

Halo (handle)

PropertyTypeSettable
channel_bright_cutfloatyes
channel_distance_to_gemfloatyes
channel_heightfloatyes
channel_inner_heightfloatyes
channel_inner_widthfloatyes
channel_position_zfloatyessigned
channel_rotationfloatyesdegrees, signed
channel_widthfloatyesThe metal rail carrying the halo stones. PositionZ and Rotation are what make a halo sit flush, float or tilt.
drill_typestryes”NONE” | “ROUND” | “QUAD”
force_even_numberboolyes
gem_carat_weightfloat
gem_materialstr
gem_shapestr
halo_stone_countintStones forming the halo ring (around the center gem)
halo_stone_sizefloat
halo_stone_weightfloat
halo_total_weightfloat
layer_namestr
mother_gem_idstr
object_typestr
positionPoint3d
prong_countintyesthe MOTHER gem’s prongs
prong_diameterfloatyes
stone_settingstryes”NONE” | “SHARED” | “SCALLOPED”
Method
delete()
move(translation: VectorLike)
set_automatic_prong_size(automatic: bool)
set_channel_profile(asset_name: str)CHANNEL_PROFILE asset
set_drill_size(width: float, height: float)
set_element(element: str)Applies a saved Halo element (ra.elements.list(“Halo”)) to this halo: its parameters replace the current ones, the mother gem stays, and the halo regenerates in place (same id).
set_fillet_factor(factor: float)
set_prong_gem_inside(gem_inside: float)signed
set_prong_height_over_girdle(height: float)
set_prong_profile(asset_name: str)CLOSED_PROFILE asset
set_prong_rotation(degrees: float)signed
set_stone_distance(stone_distance: float)
set_stone_gem_inside(gem_inside: float)signed
set_stone_size(stone_size: float)Parametric edits — each regenerates the halo (the group keeps its id, so this handle stays valid; the member objects are rebuilt) and calls LicenseGate.RequireValid() first.
set_stone_vertical(vertical: float)signed

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