Skip to content

.NET API

AdvancedBezelApi

Bezels with a custom profile.

from ArtisanPlugin.Scripting import AdvancedBezelApi

See also the guide, Gemsets › Advanced bezel, and the Python package, ra.advanced_bezel.

Methods

Method
AllIAdvancedBezel handles for every object of this kind in the active document (empty when there is no document).
ByLayerIAdvancedBezel 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 an advanced bezel around an existing gem (gemId must be a gem in the active document — the bezel is a parametric child of that gem).
FindThe handle for id, or null when the id does not belong to an object of this kind.
ForGemIAdvancedBezel handles whose mother gem is gemId (empty for Guid.Empty).
SelectedAdvanced bezels currently selected in the active doc.

All

IReadOnlyList<IAdvancedBezel> AdvancedBezelApi.All()

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

Returns IReadOnlyList<IAdvancedBezel>.

ByLayer

IReadOnlyList<IAdvancedBezel> AdvancedBezelApi.ByLayer(string layerName)

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

ParameterTypeDefault
layerNamestringrequired

Returns IReadOnlyList<IAdvancedBezel>.

Count

int AdvancedBezelApi.Count()

Number of objects of this kind in the active document.

Returns int.

Create

IAdvancedBezel AdvancedBezelApi.Create(
    Guid gemId,
    double height = 0,
    double width = 0,
    double girdleHeight = 0,
    double girdleWidth = 0,
    double gemInside = 0,
    string profile = null,
    string element = null)

Builds an advanced bezel around an existing gem (gemId must be a gem in the active document — the bezel is a parametric child of that gem). Same compute pipeline as the ArtisanAdvancedBezel tool, so the result is identical to accepting one from the panel. The wall cross-section comes from the model’s point profile (the saved defaults’ profile when the user stored one, the 6-point default otherwise); cutters and airgaps stay as the defaults configure them. All dimensional arguments are millimetres. Pass 0 (or omit) to keep the tool’s default — or the user’s saved defaults — for that parameter (height 3.8, width 1.5, girdle height 0.3, girdle width 1.5, gem inside 0). profile picks a BEZEL_PROFILE asset from the library by name (see AssetsApi.List(“BEZEL_PROFILE”)); omitted = the default profile (an explicit profile also skips the saved defaults so it cannot be overwritten by them). element = name of a saved AdvancedBezel element (ElementsApi.List(“AdvancedBezel”)) to start from instead of the defaults; explicit arguments (profile included) override it. Throws ArgumentException if gemId is not a gem and InvalidOperationException when the geometry fails to compute.

ParameterTypeDefault
gemIdGuidrequired
heightdouble0
widthdouble0
girdleHeightdouble0
girdleWidthdouble0
gemInsidedouble0
profilestringnull
elementstringnull

Returns IAdvancedBezel.

Find

IAdvancedBezel AdvancedBezelApi.Find(Guid id)

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

ParameterTypeDefault
idGuidrequired

Returns IAdvancedBezel.

ForGem

IReadOnlyList<IAdvancedBezel> AdvancedBezelApi.ForGem(Guid gemId)

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

ParameterTypeDefault
gemIdGuidrequired

Returns IReadOnlyList<IAdvancedBezel>.

Selected

IReadOnlyList<IAdvancedBezel> AdvancedBezelApi.Selected()

Advanced bezels currently selected in the active doc. Empty list if nothing is selected or the selection contains no advanced bezels.

Returns IReadOnlyList<IAdvancedBezel>.

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.

IAdvancedBezel

Handle — extends IGemSetting, IParametricObject.

An advanced bezel wraps exactly one mother gem, like IBezel, but its wall is a freely editable point profile instead of a swept asset. The setters below recompute it against the current mother gem and replace it in place (same Guid); SetElement applies a saved preset.

PropertyType
GemCaratWeightdoubleget(from IGemSetting)
GemInsidedoubleget
GemMaterialstringget(from IGemSetting)
GemShapestringget(from IGemSetting)
GirdleHeightdoublegetmillimetres
GirdleWidthdoublegetmillimetres
Heightdoublegetwall height, millimetres
IdGuidget(from IParametricObject)
LayerNamestringget(from IParametricObject)
MotherGemIdGuidget(from IParametricObject)
ObjectTypestringget(from IParametricObject)
PositionPoint3dget(from IParametricObject)
Widthdoublegetwall width, millimetres
Method
void Delete()(from IParametricObject)
void Move(Vector3d translation)(from IParametricObject)
void SetElement(string element)Applies a saved AdvancedBezel element (ElementsApi.List(“AdvancedBezel”)) to this bezel: its parameters replace the current ones, the mother gem stays, and the bezel is recomputed in place (same Guid).
void SetGemInside(double gemInside)how deep the gem sits inside, millimetres
void SetGirdleHeight(double girdleHeight)
void SetGirdleWidth(double girdleWidth)
void SetHeight(double height)Parametric edits — each recomputes against the CURRENT mother gem and replaces the bezel in place (same Guid), calling LicenseGate.RequireValid() first. Millimetres; GemInside is signed.
void SetWidth(double width)