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).
| Parameter | Type | |
|---|---|---|
shape_a | str | required |
carats_a | float | required |
shape_b | str | required |
carats_b | float | required |
material_a | str | optional — None = the tool default |
material_b | str | optional — None = the tool default |
angle_a | float | optional — None = the tool default |
angle_b | float | optional — None = the tool default |
rotation_ya | float | optional — None = the tool default |
rotation_yb | float | optional — None = the tool default |
distance | float | optional — None = the tool default |
finger_diameter | float | optional — 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).
| Parameter | Type | |
|---|---|---|
object_id | IdLike | required |
distance_a | float | optional — None = the tool default |
distance_b | float | optional — None = the tool default |
angle_a | float | optional — None = the tool default |
angle_b | float | optional — None = the tool default |
rotation_a | float | optional — None = the tool default |
rotation_b | float | optional — None = the tool default |
rotation_ya | float | optional — None = the tool default |
rotation_yb | float | optional — None = the tool default |
shape_a | str | optional — None = the tool default |
carats_a | float | optional — None = the tool default |
material_a | str | optional — None = the tool default |
shape_b | str | optional — None = the tool default |
carats_b | float | optional — None = the tool default |
material_b | str | optional — None = the tool default |
finger_diameter | float | optional — None = the tool default |