Skip to content

.NET API

ClusterApi

Cluster settings around a centre stone.

from ArtisanPlugin.Scripting import ClusterApi

See also the guide, Gemsets › Cluster, and the Python package, ra.cluster.

Methods

Method
AllICluster handles for every object of this kind in the active document (empty when there is no document).
ByLayerICluster 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 cluster of small stones around an existing gem — the ArtisanCluster tool, headless.
FindThe handle for id, or null when the id does not belong to an object of this kind.
ForGemICluster handles whose mother gem is gemId (empty for Guid.Empty).
SelectedClusters currently selected in the active doc.

All

IReadOnlyList<ICluster> ClusterApi.All()

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

Returns IReadOnlyList<ICluster>.

ByLayer

IReadOnlyList<ICluster> ClusterApi.ByLayer(string layerName)

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

ParameterTypeDefault
layerNamestringrequired

Returns IReadOnlyList<ICluster>.

Count

int ClusterApi.Count()

Number of objects of this kind in the active document.

Returns int.

Create

ICluster ClusterApi.Create(
    Guid gemId,
    double stoneSize = 0,
    double stoneDistance = 0,
    double distanceToGem = 0,
    int prongNumber = 0,
    double prongDiameter = 0,
    double railDiameter = 0,
    bool? doubleRail = null,
    double railDiameter2 = 0,
    string prongOrientation = null,
    double internalProngDiameter = 0,
    double externalProngDiameter = 0,
    double centralProngDiameter = 0,
    double stonesZPosition = double.NaN,
    double stonesRotation = double.NaN,
    string element = null,
    bool? centerProngs = null,
    string centerProngMode = null,
    string centerProngType = null,
    int centerProngCount = 0,
    double centerProngDiameter = 0,
    double centerProngOverlap = double.NaN)

Builds a cluster of small stones around an existing gem — the ArtisanCluster tool, headless. gemId must be a gem in the active document with a cluster-friendly shape (ROUND, CUSHION, EMERALD, OVAL, RADIANT, ASSCHER); the kernel picks the matching shape variant internally. Millimetres; 0 keeps the tool default (or the user’s saved defaults): stoneSize 1.6, stoneDistance 0.2, distanceToGem 1.0, prongDiameter 0.8 (applied to the internal, external and central prongs alike), railDiameter 1.0. prongNumber is 3, 4 or 5 (default 4). element = name of a saved Cluster element (ElementsApi.List(“Cluster”)) to start from instead of the defaults; explicit arguments override it. The centre stone’s own prongs (the Halo’s, off by default): centerProngs true turns them on (any other centerProng* value implies it). centerProngMode ROUND, CUSTOM or CLAW; centerProngType SINGLE, DOUBLE or TRIPLE (CLAW takes SINGLE or DOUBLE, CUSTOM SINGLE); centerProngCount positions, centerProngDiameter mm, centerProngOverlap mm (pairs). They run down from the stone and curve into the main gem rail; the rest through handle.CenterProngs. Returns an ICluster handle to the new cluster group.

ParameterTypeDefault
gemIdGuidrequired
stoneSizedouble0
stoneDistancedouble0
distanceToGemdouble0
prongNumberint0
prongDiameterdouble0
railDiameterdouble0
doubleRailbool?null
railDiameter2double0
prongOrientationstringnull
internalProngDiameterdouble0
externalProngDiameterdouble0
centralProngDiameterdouble0
stonesZPositiondoubledouble.NaN
stonesRotationdoubledouble.NaN
elementstringnull
centerProngsbool?null
centerProngModestringnull
centerProngTypestringnull
centerProngCountint0
centerProngDiameterdouble0
centerProngOverlapdoubledouble.NaN

Returns ICluster.

Find

ICluster ClusterApi.Find(Guid id)

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

ParameterTypeDefault
idGuidrequired

Returns ICluster.

ForGem

IReadOnlyList<ICluster> ClusterApi.ForGem(Guid gemId)

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

ParameterTypeDefault
gemIdGuidrequired

Returns IReadOnlyList<ICluster>.

Selected

IReadOnlyList<ICluster> ClusterApi.Selected()

Clusters currently selected in the active doc.

Returns IReadOnlyList<ICluster>.

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.

ICluster

Handle — extends IGemSetting, IParametricObject.

PropertyType
CenterProngsIClusterCenterProngsgetThe optional prongs of the centre stone itself (the Halo’s), see IClusterCenterProngs.
CentralProngDiameterdoubleget
ClusterStoneCountintgetStones forming the cluster (around the center gem)
ClusterStoneSizedoubleget
ClusterStoneWeightdoubleget
ClusterTotalWeightdoubleget
DistanceToGemdoubleget
DoubleRailboolget
ExternalProngDiameterdoubleget
FilletFactordoubleget
GemCaratWeightdoubleget(from IGemSetting)
GemMaterialstringget(from IGemSetting)
GemShapestringget(from IGemSetting)
IdGuidget(from IParametricObject)
InternalProngDiameterdoubleget
LayerNamestringget(from IParametricObject)
MotherGemIdGuidget(from IParametricObject)
ObjectTypestringget(from IParametricObject)
PositionPoint3dget(from IParametricObject)
ProngCountintget3, 4 or 5
ProngOrientationstringget”CURVE” | “CENTER”
RailDiameter1doubleget
RailDiameter2doubleget
StoneDistancedoubleget
StoneSizedoublegetCurrent values. Millimetres / degrees; several are signed.
StonesRotationdoublegetsigned
StonesZPositiondoublegetsigned
Method
void Delete()(from IParametricObject)
void Move(Vector3d translation)(from IParametricObject)
void SetBaseHeight(double height)
void SetBaseMoveInZ(double moveInZ)signed
void SetBaseWidth(double width)
void SetCentralProngDiameter(double diameter)
void SetDistanceToGem(double distance)
void SetDoubleRail(bool enabled)
void SetElement(string element)Applies a saved Cluster element (ElementsApi.List(“Cluster”)) to this cluster: its parameters replace the current ones, the mother gem stays, and the cluster regenerates in place (same id).
void SetExternalProngDiameter(double diameter)
void SetFilletFactor(double factor)
void SetInternalProngDiameter(double diameter)
void SetProngCount(int count)3, 4 or 5
void SetProngDiameter(double diameter)all three families at once
void SetProngOrientation(string orientation)CURVE | CENTER
void SetRailDiameter1(double diameter)
void SetRailDiameter2(double diameter)
void SetRailMoveInZ1(double moveInZ)signed
void SetRailMoveInZ2(double moveInZ)signed
void SetStoneDistance(double distance)
void SetStoneSize(double size)Parametric edits — each regenerates the cluster (the group keeps its id) and calls LicenseGate.RequireValid() first. These take LITERAL values: 0 and negatives are allowed where the parameter is signed.
void SetStonesRotation(double degrees)signed
void SetStonesZPosition(double z)signed

IClusterCenterProngs

Section.

The cluster’s optional prongs of the centre stone itself - the Halo’s (round, Double, Triple, Claw, Double Claw or a custom section) - on top of the internal prongs the cluster stones share with it. They run down from the stone and curve into the main gem rail. Off by default.

PropertyType
BridgeModestringget”CURVED” | “STRAIGHT”: how the prongs run into the main gem rail
CapBumpdoublegetmm, the bulge of the round cap
ClawGemInsidedoublegetCLAW, mm: how far the tip reaches in toward the stone centre
ClawHeightdoublegetCLAW, mm, signed: the tip moved up or down
ClawOnCurveintgetCLAW, % of the prong below the girdle where the hook starts (Smoothness, 1-30)
ClawTensiondoublegetCLAW, degrees the hook bends down (the panel’s Tip direction, 10-60)
Countintgetprong positions round the stone
Diameterdoublegetmm
Enabledboolget
ExtensionForManufacturingdoublegetmm, MANUFACTURING extension
GemInsidedoublegetmm into the stone, signed
HeightOverGirdledoublegetmm above the girdle
Modestringget”ROUND” | “CUSTOM” | “CLAW”
MoveInZdoublegetmm, signed
Overlapdoublegetmm the prongs of a pair, and the Triple’s middle, cross: 0 = they touch
ProfileNamestringgetCLOSED_PROFILE asset name of the CUSTOM section, "" when unset
Rotationdoublegetdegrees (CUSTOM section)
Typestringget”SINGLE” | “DOUBLE” | “TRIPLE”: prongs per position. ROUND takes all three, CLAW SINGLE or DOUBLE (the Double Claw), CUSTOM SINGLE.
Method
void SetBridgeMode(string mode)CURVED | STRAIGHT
void SetCapBump(double capBump)
void SetClawGemInside(double gemInside)mm, not 0
void SetClawHeight(double height)
void SetClawOnCurve(int onCurve)%, 0-100
void SetClawTension(double tension)degrees, 1-90
void SetCount(int count)
void SetDiameter(double diameter)
void SetEnabled(bool enabled)
void SetExtensionForManufacturing(double extension)
void SetGemInside(double gemInside)
void SetHeightOverGirdle(double height)
void SetMode(string mode)ROUND | CUSTOM | CLAW; becoming CUSTOM, or CLAW from a TRIPLE, sets Type back to SINGLE
void SetMoveInZ(double moveInZ)
void SetOverlap(double overlap)
void SetProfile(string assetName)CLOSED_PROFILE asset; switches the mode to CUSTOM
void SetRotation(double degrees)
void SetType(string type)SINGLE | DOUBLE | TRIPLE, within what the mode takes