Skip to content

Python package

ra.micro_setting

Micro settings (micro-pave heads).

import rhinoartisan as ra

Wraps ArtisanPlugin.Scripting.MicroSettingApi.

Functions

Function
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.
by_layer()MicroSetting 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 None when the id does not belong to an object of this kind.
selected()MicroSettings currently selected in the active doc.

ra.micro_setting.all()

ra.micro_setting.all() -> List[MicroSetting]

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.

ra.micro_setting.by_layer()

ra.micro_setting.by_layer(layer_name: str) -> List[MicroSetting]

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

ParameterType
layer_namestrrequired

ra.micro_setting.count()

ra.micro_setting.count() -> int

Number of objects of this kind in the active document.

ra.micro_setting.create()

ra.micro_setting.create(gem_ids=None, cutters=None, v_cutters=None, channel=None, row_prongs=None, settings=None) -> List[str]

Builds the micro-setting (pavé infrastructure: cutters, V-cutters, optional channel and row prongs) for a run of small gems — the ArtisanMicroSetting tool, headless. gem_ids None/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 None 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 MicroSettingCutters, MicroSettingChannel and MicroSettingRowProngs 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 (ra.micro_setting.find / All).

ParameterType
gem_idsSequence[IdLike]optional — None = the tool default
cuttersOptional[bool]optional — None = the tool default
v_cuttersOptional[bool]optional — None = the tool default
channelOptional[bool]optional — None = the tool default
row_prongsOptional[bool]optional — None = the tool default
settingsstroptional — None = the tool default

ra.micro_setting.find()

ra.micro_setting.find(id: IdLike) -> MicroSetting

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

ParameterType
idIdLikerequired

ra.micro_setting.selected()

ra.micro_setting.selected() -> List[MicroSetting]

MicroSettings currently selected in the active doc.

Handles

Objects returned by the functions above. Assigning a settable property regenerates the object; the change is one undo step inside ra.transaction().

MicroSetting (handle)

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.

PropertyTypeSettable
channelMicroSettingChannel
channel_enabledboolyes
cuttersMicroSettingCutters
cutters_enabledboolyes
layer_namestr
mother_gem_idstr
object_typestr
positionPoint3d
row_prongsMicroSettingRowProngs
row_prongs_enabledboolyes
v_cuttersMicroSettingCutters
v_cutters_enabledboolyes
Method
delete()
move(translation: VectorLike)
set_parameters(settings: str)Changes any number of parameters with ONE rebuild.

Plus what every handle has: id, delete(), update(**kwargs), parameters(), equality and hashing by id, and raw (the underlying .NET object).

MicroSettingChannel (section)

The channel rail running under the stones.

PropertyTypeSettable
closeboolyes
enabledboolyes
end_bendfloatyessigned
end_extensionfloatyessigned
end_heightfloatyes
end_over_girdlefloatyessigned
end_widthfloatyes
extend_factorfloatyes
flat_endsboolyes
flip_cap_endboolyes
flip_cap_startboolyes
flip_endboolyes
flip_startboolyes
keepboolyes
preciseboolyes
shapestryesUShape, VShape, SquareShape, TrapezoidalShape, ChannelShape
shape_factorfloatyes
start_bendfloatyessigned
start_extensionfloatyessigned
start_heightfloatyes
start_over_girdlefloatyessigned
start_widthfloatyes
width_by_percentageboolyeswidth sized as a % of each stone, one section per stone
width_percentagefloatyes

MicroSettingCutters (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.

PropertyTypeSettable
enabledboolyes
end_heightfloatyesmm
end_widthfloatyesmm
keepboolyesthe cutter solids are kept instead of booleaned
lengthfloatyesmm
over_girdlefloatyesmm, signed
over_girdle_middlefloatyesmm, signed
shapestryescutters only: U_SHAPE, V_SHAPE, SQUARE_SHAPE, TRAPEZOIDAL_SHAPE, FRENCH_SETTING_SHAPE
shape_factorfloatyescutters only
start_heightfloatyesmm
start_widthfloatyesmm
width_by_percentageboolyeswidth sized as a % of each stone (V-cutters: of the two stones of the gap, averaged)
width_percentagefloatyespercent of the gem size, used when WidthByPercentage is on

MicroSettingRowProngs (section)

The prongs shared between consecutive stones.

PropertyTypeSettable
allow_collisionsboolyes
closeboolyes
diameterfloatyesmm
diameter_by_percentageboolyesdiameter sized as a % of the gap between stones
enabledboolyes
end_prongsstryesTwo, One, None: prongs closing the first and last stone of an open row
height_over_girdlefloatyesmm, signed
height_under_girdlefloatyesmm, signed
inside_percentagefloatyes
position_by_percentageboolyesprongs placed from the two gems of each gap instead of fixed offsets
side_percentagefloatyesdistance from the row axis as a % of the gem radius
smart_adaptboolyes
x_center_prongsfloatyesmm, signed: offset of the prongs along the row
y_center_prongsfloatyesmm, signed: offset of the prongs across the row