Skip to content

Python package

ra.toi_et_moi

Two stones facing each other.

import rhinoartisan as ra

Wraps ArtisanPlugin.Scripting.ToiEtMoiApi.

Functions

Function
create()Creates the editable Toi et Moi group.
edit()Edits an existing Toi et Moi parametrically, like reopening it in the ArtisanToiEtMoi panel: object_id is either of its gems (or its finger circle).

ra.toi_et_moi.create()

ra.toi_et_moi.create(shape_a: str, carats_a: float, shape_b: str, carats_b: float, material_a=None, material_b=None, angle_a=None, angle_b=None, rotation_ya=None, rotation_yb=None, distance=None, finger_diameter=None) -> List[str]

Creates the editable Toi et Moi group. Per stone: shape (GemShape name), carats and material; placement starts from the user’s saved Toi et Moi defaults when there are any (an argument left at its signature default keeps the saved value), otherwise from the tool’s (stone A at +14 degrees leaning +20, stone B mirrored), unless the angle/rotationY arguments say otherwise. finger_diameter 0 = the document’s finger size. Returns the ids of the two gems (the group also carries the finger reference circle).

ParameterType
shape_astrrequired
carats_afloatrequired
shape_bstrrequired
carats_bfloatrequired
material_astroptional — None = the tool default
material_bstroptional — None = the tool default
angle_afloatoptional — None = the tool default
angle_bfloatoptional — None = the tool default
rotation_yafloatoptional — None = the tool default
rotation_ybfloatoptional — None = the tool default
distancefloatoptional — None = the tool default
finger_diameterfloatoptional — None = the tool default

ra.toi_et_moi.edit()

ra.toi_et_moi.edit(object_id: IdLike, distance_a=None, distance_b=None, angle_a=None, angle_b=None, rotation_a=None, rotation_b=None, rotation_ya=None, rotation_yb=None, shape_a=None, carats_a=None, material_a=None, shape_b=None, carats_b=None, material_b=None, finger_diameter=None) -> List[str]

Edits an existing Toi et Moi parametrically, like reopening it in the ArtisanToiEtMoi panel: object_id is either of its gems (or its finger circle). Pass only what changes — NaN / None keep the stored value. The distances are each stone’s height above the ring (“Distance above ring” in the panel): change them to raise or lower a stone, never move the gem directly. A new shape or material keeps the carats unless they are given too. The gems are rebuilt in place and KEEP their ids (returned as [stone A, stone B]); settings built on them are flagged for regeneration (coral in the outliner, rebuilt on Refresh).

ParameterType
object_idIdLikerequired
distance_afloatoptional — None = the tool default
distance_bfloatoptional — None = the tool default
angle_afloatoptional — None = the tool default
angle_bfloatoptional — None = the tool default
rotation_afloatoptional — None = the tool default
rotation_bfloatoptional — None = the tool default
rotation_yafloatoptional — None = the tool default
rotation_ybfloatoptional — None = the tool default
shape_astroptional — None = the tool default
carats_afloatoptional — None = the tool default
material_astroptional — None = the tool default
shape_bstroptional — None = the tool default
carats_bfloatoptional — None = the tool default
material_bstroptional — None = the tool default
finger_diameterfloatoptional — None = the tool default