.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 | |
|---|---|
All | IAdvancedBezel handles for every object of this kind in the active document (empty when there is no document). |
ByLayer | IAdvancedBezel 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 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). |
Find | The handle for id, or null when the id does not belong to an object of this kind. |
ForGem | IAdvancedBezel handles whose mother gem is gemId (empty for Guid.Empty). |
Selected | Advanced 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).
| Parameter | Type | Default |
|---|---|---|
layerName | string | required |
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.
| Parameter | Type | Default |
|---|---|---|
gemId | Guid | required |
height | double | 0 |
width | double | 0 |
girdleHeight | double | 0 |
girdleWidth | double | 0 |
gemInside | double | 0 |
profile | string | null |
element | string | null |
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.
| Parameter | Type | Default |
|---|---|---|
id | Guid | required |
Returns IAdvancedBezel.
ForGem
IReadOnlyList<IAdvancedBezel> AdvancedBezelApi.ForGem(Guid gemId)
IAdvancedBezel handles whose mother gem is gemId (empty for Guid.Empty).
| Parameter | Type | Default |
|---|---|---|
gemId | Guid | required |
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.
| Property | Type | ||
|---|---|---|---|
GemCaratWeight | double | get | (from IGemSetting) |
GemInside | double | get | |
GemMaterial | string | get | (from IGemSetting) |
GemShape | string | get | (from IGemSetting) |
GirdleHeight | double | get | millimetres |
GirdleWidth | double | get | millimetres |
Height | double | get | wall height, millimetres |
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) |
Width | double | get | wall 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) |