Skip to content

.NET API

ToiEtMoiApi

Toi et Moi ring top (the ArtisanToiEtMoi tool, headless): two INDEPENDENT stones straddling the top of a finger size, one leaning to each side. The classic combinations mix shapes (pear + round).

from ArtisanPlugin.Scripting import ToiEtMoiApi

See also the guide, Gems › Toi et Moi, and the Python package, ra.toi_et_moi.

Methods

Method
CreateCreates the editable Toi et Moi group.
EditEdits an existing Toi et Moi parametrically, like reopening it in the ArtisanToiEtMoi panel: objectId is either of its gems (or its finger circle).

Create

IReadOnlyList<Guid> ToiEtMoiApi.Create(
    string shapeA,
    double caratsA,
    string shapeB,
    double caratsB,
    string materialA = "Diamond",
    string materialB = "Diamond",
    double angleA = 14,
    double angleB = -14,
    double rotationYA = 20,
    double rotationYB = -20,
    double distance = 0,
    double fingerDiameter = 0)

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. fingerDiameter 0 = the document’s finger size. Returns the ids of the two gems (the group also carries the finger reference circle).

ParameterTypeDefault
shapeAstringrequired
caratsAdoublerequired
shapeBstringrequired
caratsBdoublerequired
materialAstring"Diamond"
materialBstring"Diamond"
angleAdouble14
angleBdouble-14
rotationYAdouble20
rotationYBdouble-20
distancedouble0
fingerDiameterdouble0

Returns IReadOnlyList<Guid>.

Edit

IReadOnlyList<Guid> ToiEtMoiApi.Edit(
    Guid objectId,
    double distanceA = double.NaN,
    double distanceB = double.NaN,
    double angleA = double.NaN,
    double angleB = double.NaN,
    double rotationA = double.NaN,
    double rotationB = double.NaN,
    double rotationYA = double.NaN,
    double rotationYB = double.NaN,
    string shapeA = null,
    double caratsA = double.NaN,
    string materialA = null,
    string shapeB = null,
    double caratsB = double.NaN,
    string materialB = null,
    double fingerDiameter = double.NaN)

Edits an existing Toi et Moi parametrically, like reopening it in the ArtisanToiEtMoi panel: objectId is either of its gems (or its finger circle). Pass only what changes — NaN / null 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).

ParameterTypeDefault
objectIdGuidrequired
distanceAdoubledouble.NaN
distanceBdoubledouble.NaN
angleAdoubledouble.NaN
angleBdoubledouble.NaN
rotationAdoubledouble.NaN
rotationBdoubledouble.NaN
rotationYAdoubledouble.NaN
rotationYBdoubledouble.NaN
shapeAstringnull
caratsAdoubledouble.NaN
materialAstringnull
shapeBstringnull
caratsBdoubledouble.NaN
materialBstringnull
fingerDiameterdoubledouble.NaN

Returns IReadOnlyList<Guid>.