.NET API
HiddenHaloApi
A hidden halo under the centre stone.
from ArtisanPlugin.Scripting import HiddenHaloApi
See also the guide, Gemsets › Hidden halo, and the Python package, ra.hidden_halo.
Methods
| Method | |
|---|---|
All | IHiddenHalo handles for every object of this kind in the active document (empty when there is no document). |
ByLayer | IHiddenHalo 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 hidden halo — a ring of small stones tucked UNDER an existing gem, facing outward — the ArtisanHiddenHalo tool, headless. |
Find | The handle for id, or null when the id does not belong to an object of this kind. |
ForGem | IHiddenHalo handles whose mother gem is gemId (empty for Guid.Empty). |
Selected | Hidden halos currently selected in the active doc. |
All
IReadOnlyList<IHiddenHalo> HiddenHaloApi.All()
IHiddenHalo handles for every object of this kind in the active document (empty when there is no document).
Returns IReadOnlyList<IHiddenHalo>.
ByLayer
IReadOnlyList<IHiddenHalo> HiddenHaloApi.ByLayer(string layerName)
IHiddenHalo handles on the layer with the given full path (empty when the layer does not exist).
| Parameter | Type | Default |
|---|---|---|
layerName | string | required |
Returns IReadOnlyList<IHiddenHalo>.
Count
int HiddenHaloApi.Count()
Number of objects of this kind in the active document.
Returns int.
Create
IHiddenHalo HiddenHaloApi.Create(
Guid gemId,
double stoneSize = 0,
double stoneDistance = 0,
double channelWidth = 0,
double channelHeight = 0,
string railShape = null,
string prongType = null,
string profile = null,
double railXLength = 0,
double railYLength = 0,
string stoneShape = null,
double distanceToGem = double.NaN,
double channelPositionZ = double.NaN,
double channelRotation = double.NaN,
double prongDistance = double.NaN,
bool? forceEvenNumber = null)
Builds a hidden halo — a ring of small stones tucked UNDER an existing gem, facing outward — the ArtisanHiddenHalo tool, headless. gemId must be a gem in the active document; any center-gem shape works (the rail is parametric, chosen by railShape, and does not follow the gem’s outline). Millimetres; 0 keeps the tool default (or the user’s saved defaults): stoneSize 0.9, stoneDistance 0.10, channelWidth 1.1, channelHeight 1.0. railShape is CIRCLE (default), SQUARE (opens at 5.50 x 5.50) or OVAL (5.50 x 8.70). prongType is NONE (default), SHARED or SCALLOPED. profile picks a CHANNEL_PROFILE asset by name; omitted = the tool’s “014” channel profile (falling back to the type default). Returns an IHiddenHalo handle to the new hidden halo group.
| Parameter | Type | Default |
|---|---|---|
gemId | Guid | required |
stoneSize | double | 0 |
stoneDistance | double | 0 |
channelWidth | double | 0 |
channelHeight | double | 0 |
railShape | string | null |
prongType | string | null |
profile | string | null |
railXLength | double | 0 |
railYLength | double | 0 |
stoneShape | string | null |
distanceToGem | double | double.NaN |
channelPositionZ | double | double.NaN |
channelRotation | double | double.NaN |
prongDistance | double | double.NaN |
forceEvenNumber | bool? | null |
Returns IHiddenHalo.
Find
IHiddenHalo HiddenHaloApi.Find(Guid id)
The handle for id, or null when the id does not belong to an object of this kind.
| Parameter | Type | Default |
|---|---|---|
id | Guid | required |
Returns IHiddenHalo.
ForGem
IReadOnlyList<IHiddenHalo> HiddenHaloApi.ForGem(Guid gemId)
IHiddenHalo handles whose mother gem is gemId (empty for Guid.Empty).
| Parameter | Type | Default |
|---|---|---|
gemId | Guid | required |
Returns IReadOnlyList<IHiddenHalo>.
Selected
IReadOnlyList<IHiddenHalo> HiddenHaloApi.Selected()
Hidden halos currently selected in the active doc.
Returns IReadOnlyList<IHiddenHalo>.
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.
IHiddenHalo
Handle — extends IGemSetting, IParametricObject.
| Property | Type | ||
|---|---|---|---|
ChannelDistanceToGem | double | get | |
ChannelHeight | double | get | |
ChannelPositionZ | double | get | signed |
ChannelRotation | double | get | degrees, signed |
ChannelWidth | double | get | The rail section. Rotation defaults to 90 and PositionZ to -0.6: together they are what makes the halo “hidden”. |
GemCaratWeight | double | get | (from IGemSetting) |
GemMaterial | string | get | (from IGemSetting) |
GemShape | string | get | (from IGemSetting) |
Id | Guid | get | (from IParametricObject) |
LayerName | string | get | (from IParametricObject) |
MotherGemId | Guid | get | (from IParametricObject) |
ObjectType | string | get | (from IParametricObject) |
Position | Point3d | get | (from IParametricObject) |
ProngDistance | double | get | |
RailShape | string | get | Ring shape of the hidden halo rail: “CIRCLE”, “SQUARE” or “OVAL”. |
RailXLength | double | get | Extents of the SQUARE / OVAL rail (ignored by CIRCLE), millimetres. |
RailYLength | double | get | |
StoneCount | int | get | Small stones forming the hidden ring (under the center gem) |
StoneSetting | string | get | ”NONE” | “SHARED” | “SCALLOPED” |
StoneShape | string | get | ”ROUND” | “PRINCESS” |
StoneSize | double | get | |
StoneWeight | double | get | |
TotalStoneWeight | double | get |
| Method | |
|---|---|
void Delete() | (from IParametricObject) |
void Move(Vector3d translation) | (from IParametricObject) |
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 SetForceEvenNumber(bool forceEven) | |
void SetProngDistance(double distance) | |
void SetProngHeight(double height) | |
void SetRailShape(string railShape) | CIRCLE | SQUARE | OVAL |
void SetRailSize(double xLength, double yLength) | SQUARE / OVAL only |
void SetStoneDistance(double stoneDistance) | |
void SetStoneGemInside(double gemInside) | signed |
void SetStoneSetting(string setting) | NONE | SHARED | SCALLOPED |
void SetStoneShape(string shape) | ROUND | PRINCESS |
void SetStoneSize(double stoneSize) | Parametric edits — each regenerates the hidden 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 |