Skip to content

.NET API

MicroSettingApi

Micro settings (micro-pave heads).

from ArtisanPlugin.Scripting import MicroSettingApi

See also the guide, Gemsets › Micro setting, and the Python package, ra.micro_setting.

Methods

Method
AllA micro setting is baked as a GROUP carrying RaObjectUserData (both here and in the panel); nothing in the product ever creates a MicroSettingCustomObject, so resolving that type found nothing and every query below returned empty.
ByLayerIMicroSetting 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 the micro-setting (pavé infrastructure: cutters, V-cutters, optional channel and row prongs) for a run of small gems — the ArtisanMicroSetting tool, headless.
FindThe handle for id, or null when the id does not belong to an object of this kind.
SelectedMicroSettings currently selected in the active doc.

All

IReadOnlyList<IMicroSetting> MicroSettingApi.All()

A micro setting is baked as a GROUP carrying RaObjectUserData (both here and in the panel); nothing in the product ever creates a MicroSettingCustomObject, so resolving that type found nothing and every query below returned empty.

Returns IReadOnlyList<IMicroSetting>.

ByLayer

IReadOnlyList<IMicroSetting> MicroSettingApi.ByLayer(string layerName)

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

ParameterTypeDefault
layerNamestringrequired

Returns IReadOnlyList<IMicroSetting>.

Count

int MicroSettingApi.Count()

Number of objects of this kind in the active document.

Returns int.

Create

IReadOnlyList<Guid> MicroSettingApi.Create(
    IEnumerable<Guid> gemIds = null,
    bool? cutters = null,
    bool? vCutters = null,
    bool? channel = null,
    bool? rowProngs = null,
    string settings = null)

Builds the micro-setting (pavé infrastructure: cutters, V-cutters, optional channel and row prongs) for a run of small gems — the ArtisanMicroSetting tool, headless. gemIds null/empty = the currently selected gems; at least one gem is required. The order of the ids is the order of the row. The enable flags default to the tool’s behavior (cutters and V-cutters on, channel and row prongs off); pass true/false to override, or null to keep the default (or the user’s saved defaults). settings is a JSON object with every other parameter, by section; only the keys given change, the rest keep the defaults: {“cutters”: {“start_width”: 0.8, “end_width”: 0.8, “shape”: “V_SHAPE”}, “v_cutters”: {“width_by_percentage”: true, “width_percentage”: 40, “length”: 2.5}, “channel”: {“enabled”: true, “width_by_percentage”: true, “width_percentage”: 80}, “row_prongs”: {“enabled”: true, “diameter”: 0.5, “end_prongs”: “One”}} The keys are the members of IMicroSettingCutters, IMicroSettingChannel and IMicroSettingRowProngs in snake_case (millimetres; the percentages are percent of each gem’s size). A flag passed as an argument wins over “enabled” in settings. Returns the ids of every object baked (cutters, V-cutters, channel and prongs), all grouped under one MicroSetting group. Edit it afterwards through its handle (MicroSettingApi.Find / All).

ParameterTypeDefault
gemIdsIEnumerable<Guid>null
cuttersbool?null
vCuttersbool?null
channelbool?null
rowProngsbool?null
settingsstringnull

Returns IReadOnlyList<Guid>.

Find

IMicroSetting MicroSettingApi.Find(Guid id)

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

ParameterTypeDefault
idGuidrequired

Returns IMicroSetting.

Selected

IReadOnlyList<IMicroSetting> MicroSettingApi.Selected()

MicroSettings currently selected in the active doc.

Returns IReadOnlyList<IMicroSetting>.

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.

IMicroSetting

Handle — extends IParametricObject.

A micro setting: the cutters, V-cutters, channel and row prongs cut and built around a run of stones. Each block is a section mirroring the panel’s own. Every Set* rebuilds the micro-setting on the same gems, as editing it in the panel and accepting does: the handle (its Id) stays valid, the ids of the cutters, channel and prongs are new. A value that cannot be built throws and leaves the micro-setting as it was. To change several parameters with one rebuild use SetParameters.

PropertyType
ChannelIMicroSettingChannelget
ChannelEnabledboolget
CuttersIMicroSettingCuttersget
CuttersEnabledboolget
IdGuidget(from IParametricObject)
LayerNamestringget(from IParametricObject)
MotherGemIdGuidget(from IParametricObject)
ObjectTypestringget(from IParametricObject)
PositionPoint3dget(from IParametricObject)
RowProngsIMicroSettingRowProngsget
RowProngsEnabledboolget
VCuttersIMicroSettingCuttersget
VCuttersEnabledboolget
Method
void Delete()(from IParametricObject)
void Move(Vector3d translation)(from IParametricObject)
void SetChannelEnabled(bool enabled)
void SetCuttersEnabled(bool enabled)
void SetParameters(string settings)Changes any number of parameters with ONE rebuild. settings is the JSON object MicroSettingApi.Create takes, by section, with the members of the sections in snake_case; only the keys given change: {“cutters”: {“start_width”: 0.8, “end_width”: 0.8}, “channel”: {“enabled”: true, “width_by_percentage”: true, “width_percentage”: 80}} Sections: cutters, v_cutters, channel, row_prongs.
void SetRowProngsEnabled(bool enabled)
void SetVCuttersEnabled(bool enabled)

IMicroSettingCutters

Section.

The cutters carved under each stone. The same shape describes the plain CUTTERS and the V-CUTTERS; the members marked “cutters only” read as empty/0 on the V-cutters, which have no such parameter.

PropertyType
Enabledboolget
EndHeightdoublegetmm
EndWidthdoublegetmm
Keepboolgetthe cutter solids are kept instead of booleaned
Lengthdoublegetmm
OverGirdledoublegetmm, signed
OverGirdleMiddledoublegetmm, signed
Shapestringgetcutters only: U_SHAPE, V_SHAPE, SQUARE_SHAPE, TRAPEZOIDAL_SHAPE, FRENCH_SETTING_SHAPE
ShapeFactordoublegetcutters only
StartHeightdoublegetmm
StartWidthdoublegetmm
WidthByPercentageboolgetwidth sized as a % of each stone (V-cutters: of the two stones of the gap, averaged)
WidthPercentagedoublegetpercent of the gem size, used when WidthByPercentage is on
Method
void SetEnabled(bool enabled)
void SetEndHeight(double endHeight)
void SetEndWidth(double endWidth)
void SetKeep(bool keep)
void SetLength(double length)
void SetOverGirdle(double overGirdle)
void SetOverGirdleMiddle(double overGirdleMiddle)
void SetShape(string shape)cutters only: throws on the V-cutters
void SetShapeFactor(double shapeFactor)cutters only: throws on the V-cutters
void SetStartHeight(double startHeight)
void SetStartWidth(double startWidth)
void SetWidthByPercentage(bool widthByPercentage)true = the width is WidthPercentage % of each stone instead of StartWidth / EndWidth
void SetWidthPercentage(double widthPercentage)percent of the gem size, greater than 0

IMicroSettingRowProngs

Section.

The prongs shared between consecutive stones.

PropertyType
AllowCollisionsboolget
Closeboolget
Diameterdoublegetmm
DiameterByPercentageboolgetdiameter sized as a % of the gap between stones
Enabledboolget
EndProngsstringgetTwo, One, None: prongs closing the first and last stone of an open row
HeightOverGirdledoublegetmm, signed
HeightUnderGirdledoublegetmm, signed
InsidePercentagedoubleget
PositionByPercentageboolgetprongs placed from the two gems of each gap instead of fixed offsets
SidePercentagedoublegetdistance from the row axis as a % of the gem radius
SmartAdaptboolget
XCenterProngsdoublegetmm, signed: offset of the prongs along the row
YCenterProngsdoublegetmm, signed: offset of the prongs across the row
Method
void SetAllowCollisions(bool allowCollisions)
void SetClose(bool close)
void SetDiameter(double diameter)
void SetDiameterByPercentage(bool diameterByPercentage)
void SetEnabled(bool enabled)
void SetEndProngs(string endProngs)
void SetHeightOverGirdle(double heightOverGirdle)
void SetHeightUnderGirdle(double heightUnderGirdle)
void SetInsidePercentage(double insidePercentage)
void SetPositionByPercentage(bool positionByPercentage)
void SetSidePercentage(double sidePercentage)
void SetSmartAdapt(bool smartAdapt)
void SetXCenterProngs(double xCenterProngs)
void SetYCenterProngs(double yCenterProngs)

IMicroSettingChannel

Section.

The channel rail running under the stones.

PropertyType
Closeboolget
Enabledboolget
EndBenddoublegetsigned
EndExtensiondoublegetsigned
EndHeightdoubleget
EndOverGirdledoublegetsigned
EndWidthdoubleget
ExtendFactordoubleget
FlatEndsboolget
FlipCapEndboolget
FlipCapStartboolget
FlipEndboolget
FlipStartboolget
Keepboolget
Preciseboolget
ShapestringgetUShape, VShape, SquareShape, TrapezoidalShape, ChannelShape
ShapeFactordoubleget
StartBenddoublegetsigned
StartExtensiondoublegetsigned
StartHeightdoubleget
StartOverGirdledoublegetsigned
StartWidthdoubleget
WidthByPercentageboolgetwidth sized as a % of each stone, one section per stone
WidthPercentagedoubleget
Method
void SetClose(bool close)
void SetEnabled(bool enabled)
void SetEndBend(double endBend)
void SetEndExtension(double endExtension)
void SetEndHeight(double endHeight)
void SetEndOverGirdle(double endOverGirdle)
void SetEndWidth(double endWidth)
void SetExtendFactor(double extendFactor)
void SetFlatEnds(bool flatEnds)
void SetFlipCapEnd(bool flipCapEnd)
void SetFlipCapStart(bool flipCapStart)
void SetFlipEnd(bool flipEnd)
void SetFlipStart(bool flipStart)
void SetKeep(bool keep)
void SetPrecise(bool precise)
void SetShape(string shape)
void SetShapeFactor(double shapeFactor)
void SetStartBend(double startBend)
void SetStartExtension(double startExtension)
void SetStartHeight(double startHeight)
void SetStartOverGirdle(double startOverGirdle)
void SetStartWidth(double startWidth)
void SetWidthByPercentage(bool widthByPercentage)
void SetWidthPercentage(double widthPercentage)