Skip to content

.NET API

HaloApi

A halo of small stones around a centre stone.

from ArtisanPlugin.Scripting import HaloApi

See also the guide, Gemsets › Halo, and the Python package, ra.halo.

Methods

Method
AllIHalo handles for every object of this kind in the active document (empty when there is no document).
ByLayerIHalo handles on the layer with the given full path (empty when the layer does not exist).
CountNumber of objects of this kind in the active document.
CreateBuilds a halo of small stones around an existing gem — the ArtisanHalo tool, headless.
FindThe handle for id, or null when the id does not belong to an object of this kind.
ForGemIHalo handles whose mother gem is gemId (empty for Guid.Empty).
SelectedHalos currently selected in the active doc.

All

IReadOnlyList<IHalo> HaloApi.All()

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

Returns IReadOnlyList<IHalo>.

ByLayer

IReadOnlyList<IHalo> HaloApi.ByLayer(string layerName)

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

ParameterTypeDefault
layerNamestringrequired

Returns IReadOnlyList<IHalo>.

Count

int HaloApi.Count()

Number of objects of this kind in the active document.

Returns int.

Create

IHalo HaloApi.Create(
    Guid gemId,
    double stoneSize = 0,
    double stoneDistance = 0,
    double distanceToGem = 0,
    double channelWidth = 0,
    double channelHeight = 0,
    string prongType = null,
    string profile = null,
    double channelPositionZ = double.NaN,
    double channelRotation = double.NaN,
    double channelBrightCut = double.NaN,
    double channelInnerWidth = 0,
    double channelInnerHeight = 0,
    double stoneVertical = double.NaN,
    double stoneGemInside = double.NaN,
    string drillType = null,
    bool? forceEvenNumber = null,
    int prongCount = 0,
    double prongDiameter = 0,
    string prongProfile = null,
    string element = null,
    string prongMode = null)

Builds a halo of small stones around an existing gem — the ArtisanHalo tool, headless. gemId must be a gem in the active document with a halo-friendly shape (ROUND, CUSHION, EMERALD, OVAL, RADIANT, ASSCHER, PEAR). Millimetres; 0 keeps the tool default (or the user’s saved defaults): stoneSize 1.2, stoneDistance 0.2, distanceToGem 1.2, channelWidth 1.5, channelHeight 1.5. prongType is NONE (default), SHARED or SCALLOPED: how the halo stones are held. profile picks a CHANNEL_PROFILE asset by name; omitted = the default profile. The center stone’s prongs: prongMode ROUND, CUSTOM (the prongProfile section; a profile alone implies it) or CLAW (DEFAULT and CIRCLE also mean ROUND); claw tips are built in Render mode only and tuned through the handle (SetClawGemInside…). element = name of a saved Halo element (ElementsApi.List(“Halo”)) to start from instead of the defaults; explicit arguments override it. Returns an IHalo handle to the new halo group.

ParameterTypeDefault
gemIdGuidrequired
stoneSizedouble0
stoneDistancedouble0
distanceToGemdouble0
channelWidthdouble0
channelHeightdouble0
prongTypestringnull
profilestringnull
channelPositionZdoubledouble.NaN
channelRotationdoubledouble.NaN
channelBrightCutdoubledouble.NaN
channelInnerWidthdouble0
channelInnerHeightdouble0
stoneVerticaldoubledouble.NaN
stoneGemInsidedoubledouble.NaN
drillTypestringnull
forceEvenNumberbool?null
prongCountint0
prongDiameterdouble0
prongProfilestringnull
elementstringnull
prongModestringnull

Returns IHalo.

Find

IHalo HaloApi.Find(Guid id)

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

ParameterTypeDefault
idGuidrequired

Returns IHalo.

ForGem

IReadOnlyList<IHalo> HaloApi.ForGem(Guid gemId)

IHalo handles whose mother gem is gemId (empty for Guid.Empty).

ParameterTypeDefault
gemIdGuidrequired

Returns IReadOnlyList<IHalo>.

Selected

IReadOnlyList<IHalo> HaloApi.Selected()

Halos currently selected in the active doc.

Returns IReadOnlyList<IHalo>.

Handles and sections

What the methods above hand back. A handle’s setters regenerate the object; wrap changes in a Transaction so they land as one undo step.

IHalo

Handle — extends IGemSetting, IParametricObject.

PropertyType
ChannelBrightCutdoubleget
ChannelDistanceToGemdoubleget
ChannelHeightdoubleget
ChannelInnerHeightdoubleget
ChannelInnerWidthdoubleget
ChannelPositionZdoublegetsigned
ChannelRotationdoublegetdegrees, signed
ChannelWidthdoublegetThe metal rail carrying the halo stones. PositionZ and Rotation are what make a halo sit flush, float or tilt.
ClawGemInsidedoublegetThe halo’s own claw tip, CLAW mode only (built in Render mode only), under the panel’s names: how far in toward the gem the tip reaches (a fraction of the way to the gem centre; 0 builds no tip).
ClawTensiondoubleget1-100
ClawTipDistancedoublegetthe panel’s “Tip distance”: height of the rounded tip
ClawTipHeightdoubleget
ClawTipWidthdoubleget
DrillTypestringget”NONE” | “ROUND” | “QUAD”
ForceEvenNumberboolget
GemCaratWeightdoubleget(from IGemSetting)
GemMaterialstringget(from IGemSetting)
GemShapestringget(from IGemSetting)
HaloStoneCountintgetStones forming the halo ring (around the center gem)
HaloStoneSizedoubleget
HaloStoneWeightdoubleget
HaloTotalWeightdoubleget
IdGuidget(from IParametricObject)
LayerNamestringget(from IParametricObject)
MotherGemIdGuidget(from IParametricObject)
ObjectTypestringget(from IParametricObject)
PositionPoint3dget(from IParametricObject)
ProngCountintgetthe MOTHER gem’s prongs
ProngDiameterdoubleget
ProngModestringget”ROUND” | “CUSTOM” | “CLAW”: the mother gem’s prongs, as on every setting with prongs.
StoneSettingstringget”NONE” | “SHARED” | “SCALLOPED”
Method
void Delete()(from IParametricObject)
void Move(Vector3d translation)(from IParametricObject)
void SetAutomaticProngSize(bool automatic)
void SetChannelBrightCut(double brightCut)
void SetChannelDistanceToGem(double distance)signed
void SetChannelHeight(double height)
void SetChannelInnerHeight(double height)
void SetChannelInnerWidth(double width)
void SetChannelPositionZ(double positionZ)signed
void SetChannelProfile(string assetName)CHANNEL_PROFILE asset
void SetChannelRotation(double degrees)signed
void SetChannelWidth(double width)
void SetClawGemInside(double gemInside)not 0
void SetClawTension(double tension)1-100
void SetClawTipDistance(double distance)
void SetClawTipHeight(double height)
void SetClawTipWidth(double width)
void SetDrillSize(double width, double height)
void SetDrillType(string drillType)NONE | ROUND | QUAD
void SetElement(string element)Applies a saved Halo element (ElementsApi.List(“Halo”)) to this halo: its parameters replace the current ones, the mother gem stays, and the halo regenerates in place (same id).
void SetFilletFactor(double factor)
void SetForceEvenNumber(bool forceEven)
void SetProngCount(int count)the MOTHER gem’s prongs
void SetProngDiameter(double diameter)
void SetProngGemInside(double gemInside)signed
void SetProngHeightOverGirdle(double height)
void SetProngMode(string mode)ROUND | CUSTOM | CLAW (DEFAULT and CIRCLE also mean ROUND). CLAW on a halo whose claw values are all 0 starts from the tool’s defaults.
void SetProngProfile(string assetName)CLOSED_PROFILE asset; switches the prongs to CUSTOM
void SetProngRotation(double degrees)signed
void SetStoneDistance(double stoneDistance)
void SetStoneGemInside(double gemInside)signed
void SetStoneSetting(string setting)NONE | SHARED | SCALLOPED
void SetStoneSize(double stoneSize)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. Millimetres, and LITERAL values: 0 and negatives are allowed where the parameter is signed.
void SetStoneVertical(double vertical)signed