.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 | |
|---|---|
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. |
ByLayer | IMicroSetting 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 the micro-setting (pavé infrastructure: cutters, V-cutters, optional channel and row prongs) for a run of small gems — the ArtisanMicroSetting tool, headless. |
Find | The handle for id, or null when the id does not belong to an object of this kind. |
Selected | MicroSettings 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).
| Parameter | Type | Default |
|---|---|---|
layerName | string | required |
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).
| Parameter | Type | Default |
|---|---|---|
gemIds | IEnumerable<Guid> | null |
cutters | bool? | null |
vCutters | bool? | null |
channel | bool? | null |
rowProngs | bool? | null |
settings | string | null |
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.
| Parameter | Type | Default |
|---|---|---|
id | Guid | required |
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.
| Property | Type | ||
|---|---|---|---|
Channel | IMicroSettingChannel | get | |
ChannelEnabled | bool | get | |
Cutters | IMicroSettingCutters | get | |
CuttersEnabled | bool | get | |
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) |
RowProngs | IMicroSettingRowProngs | get | |
RowProngsEnabled | bool | get | |
VCutters | IMicroSettingCutters | get | |
VCuttersEnabled | bool | get |
| 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.
| Property | Type | ||
|---|---|---|---|
Enabled | bool | get | |
EndHeight | double | get | mm |
EndWidth | double | get | mm |
Keep | bool | get | the cutter solids are kept instead of booleaned |
Length | double | get | mm |
OverGirdle | double | get | mm, signed |
OverGirdleMiddle | double | get | mm, signed |
Shape | string | get | cutters only: U_SHAPE, V_SHAPE, SQUARE_SHAPE, TRAPEZOIDAL_SHAPE, FRENCH_SETTING_SHAPE |
ShapeFactor | double | get | cutters only |
StartHeight | double | get | mm |
StartWidth | double | get | mm |
WidthByPercentage | bool | get | width sized as a % of each stone (V-cutters: of the two stones of the gap, averaged) |
WidthPercentage | double | get | percent 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.
| Property | Type | ||
|---|---|---|---|
AllowCollisions | bool | get | |
Close | bool | get | |
Diameter | double | get | mm |
DiameterByPercentage | bool | get | diameter sized as a % of the gap between stones |
Enabled | bool | get | |
EndProngs | string | get | Two, One, None: prongs closing the first and last stone of an open row |
HeightOverGirdle | double | get | mm, signed |
HeightUnderGirdle | double | get | mm, signed |
InsidePercentage | double | get | |
PositionByPercentage | bool | get | prongs placed from the two gems of each gap instead of fixed offsets |
SidePercentage | double | get | distance from the row axis as a % of the gem radius |
SmartAdapt | bool | get | |
XCenterProngs | double | get | mm, signed: offset of the prongs along the row |
YCenterProngs | double | get | mm, 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.
| Property | Type | ||
|---|---|---|---|
Close | bool | get | |
Enabled | bool | get | |
EndBend | double | get | signed |
EndExtension | double | get | signed |
EndHeight | double | get | |
EndOverGirdle | double | get | signed |
EndWidth | double | get | |
ExtendFactor | double | get | |
FlatEnds | bool | get | |
FlipCapEnd | bool | get | |
FlipCapStart | bool | get | |
FlipEnd | bool | get | |
FlipStart | bool | get | |
Keep | bool | get | |
Precise | bool | get | |
Shape | string | get | UShape, VShape, SquareShape, TrapezoidalShape, ChannelShape |
ShapeFactor | double | get | |
StartBend | double | get | signed |
StartExtension | double | get | signed |
StartHeight | double | get | |
StartOverGirdle | double | get | signed |
StartWidth | double | get | |
WidthByPercentage | bool | get | width sized as a % of each stone, one section per stone |
WidthPercentage | double | get |
| 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) |