.NET API
AdvancedBasketApi
Baskets with independent prong and rail profiles.
from ArtisanPlugin.Scripting import AdvancedBasketApi
See also the guide, Gemsets › Advanced basket, and the Python package, ra.advanced_basket.
Methods
| Method | |
|---|---|
All | IAdvancedBasket handles for every object of this kind in the active document (empty when there is no document). |
ByLayer | IAdvancedBasket 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 basket setting under an existing gem — the ArtisanAdvancedBasket tool, headless. |
Find | The handle for id, or null when the id does not belong to an object of this kind. |
ForGem | IAdvancedBasket handles whose mother gem is gemId (empty for Guid.Empty). |
Presets | The prong layouts the tool ships for a gem shape, by name — the same list the panel draws as its preset row. |
Selected | Advanced baskets currently selected in the active doc. |
All
IReadOnlyList<IAdvancedBasket> AdvancedBasketApi.All()
IAdvancedBasket handles for every object of this kind in the active document (empty when there is no document).
Returns IReadOnlyList<IAdvancedBasket>.
ByLayer
IReadOnlyList<IAdvancedBasket> AdvancedBasketApi.ByLayer(string layerName)
IAdvancedBasket handles on the layer with the given full path (empty when the layer does not exist).
| Parameter | Type | Default |
|---|---|---|
layerName | string | required |
Returns IReadOnlyList<IAdvancedBasket>.
Count
int AdvancedBasketApi.Count()
Number of objects of this kind in the active document.
Returns int.
Create
IReadOnlyList<IAdvancedBasket> AdvancedBasketApi.Create(
IEnumerable<Guid> gemIds = null,
int prongs = 0,
string prongMode = null,
double prongDiameter = 0,
double prongHeight = 0,
int? rails = null,
double railWidth = 0,
string profile = null,
string preset = null,
array<double> positions = null,
string element = null)
Builds an advanced basket setting under an existing gem — the ArtisanAdvancedBasket tool, headless. One basket (its own group) per gem; gemIds null/empty = the currently selected gems. Unlike the basic Basket, the advanced basket is a free layout: a list of individually placed prongs plus a list of rails. This facade lays both out evenly, like the tool’s presets. Millimetres; 0/null keeps the tool default (or the user’s saved defaults): prongs 0 keeps the saved layout, or 4 prongs at the diagonals when there is none (the tool’s “4” preset); a positive count places that many prongs evenly around the gem. prongMode null = ROUND; also DOUBLE (the 2-2 presets), TRIPLE (3-3), CLAW, OFFSET or CUSTOM, applied to every prong (DEFAULT and CIRCLE also mean ROUND; claw tips are built in Render mode only and are tuned through the handle). prongDiameter 0 keeps 1.5 (sets top and bottom together), prongHeight 0 keeps 4. rails null keeps the saved rails (a fresh basket has none); 0 = no rails, 1 = one rail 1 mm under the girdle, 2 adds a second at 3.66 (the tool’s 1-rail / 2-rail presets; more keep the same spacing). railWidth 0 keeps 1.5, applied to every rail. profile names a CLOSED_PROFILE asset for the prongs (see AssetsApi.List) and switches them to CUSTOM mode unless prongMode says otherwise; null keeps each mode’s built-in section. Returns one IAdvancedBasket handle per gem, in input order. element = name of a saved AdvancedBasket element (ElementsApi.List(“AdvancedBasket”)) to start from instead of the defaults, re-seeded onto each gem; explicit arguments override it.
| Parameter | Type | Default |
|---|---|---|
gemIds | IEnumerable<Guid> | null |
prongs | int | 0 |
prongMode | string | null |
prongDiameter | double | 0 |
prongHeight | double | 0 |
rails | int? | null |
railWidth | double | 0 |
profile | string | null |
preset | string | null |
positions | array<double> | null |
element | string | null |
Returns IReadOnlyList<IAdvancedBasket>.
Find
IAdvancedBasket AdvancedBasketApi.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 IAdvancedBasket.
ForGem
IReadOnlyList<IAdvancedBasket> AdvancedBasketApi.ForGem(Guid gemId)
IAdvancedBasket handles whose mother gem is gemId (empty for Guid.Empty).
| Parameter | Type | Default |
|---|---|---|
gemId | Guid | required |
Returns IReadOnlyList<IAdvancedBasket>.
Presets
IReadOnlyList<string> AdvancedBasketApi.Presets(Guid gemId)
The prong layouts the tool ships for a gem shape, by name — the same list the panel draws as its preset row. Pass one of these as Create’s preset. Names look like “4”, “4-V”, “2-2”, “3-3”, “6”, “8” or “NONE”; which ones exist depends on the shape (an emerald gets corner layouts, a marquise gets tip layouts…).
| Parameter | Type | Default |
|---|---|---|
gemId | Guid | required |
Returns IReadOnlyList<string>.
Selected
IReadOnlyList<IAdvancedBasket> AdvancedBasketApi.Selected()
Advanced baskets currently selected in the active doc.
Returns IReadOnlyList<IAdvancedBasket>.
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.
IAdvancedBasket
Handle — extends IGemSetting, IParametricObject.
| Property | Type | ||
|---|---|---|---|
ClawCapDistance | double | get | The claw tips of CLAW prongs (built in Render mode only), first prong’s values. mm the apex is pulled in toward the gem centre. |
ClawCapHeight | double | get | mm the apex moves up (+) or down (-) |
ClawTipSmoothness | double | get | body-to-tip blend, 0-1 |
ClawTipWidth | double | get | apex thickness as a fraction of the prong: 0 sharp point - 1 full |
GemCaratWeight | double | get | (from IGemSetting) |
GemMaterial | string | get | (from IGemSetting) |
GemShape | string | get | (from IGemSetting) |
Id | Guid | get | (from IParametricObject) |
LayerName | string | get | (from IParametricObject) |
MotherGemId | Guid | get | (from IParametricObject) |
ObjectType | string | get | (from IParametricObject) |
ParametersJson | string | get | Every value of every prong and rail, as the panel’s per-prong and per-rail editors hold them: the model’s JSON, whose paths GetParameter / SetParameter take. |
Position | Point3d | get | (from IParametricObject) |
ProngCount | int | get | Unlike the basic Basket, the advanced basket stores one entry per prong/rail, each with its own settings. The scalar getters report the first prong’s values (0 when there are none). |
ProngDiameter | double | get | |
ProngHeight | double | get | |
ProngMode | string | get | ”ROUND” | “CUSTOM” | “CLAW” | “OFFSET” | “DOUBLE” | “TRIPLE” when every prong shares it, “MIXED” when the prongs differ (the panel’s per-prong editor), "" with no prongs. |
RailCount | int | get | |
RailGems | ICathedralGems | get | The gems on the rails’ outer face, between the prongs (the panel’s Rail Gems): the same section a cathedral’s gems use, off by default. The getters report the first rail’s; every setter applies to every rail (for one rail alone use SetParameter, “rails[1].gems.enable”). Every free stretch between prongs takes as many stones as fit, so Mode, Count and Angle are not used. ProngType is “FLUSH”, “SHARED” (prongs) or “SCALLOPED”, never “NONE”. While they are enabled a rail is built with the SQUARE section and grows to hold the stones; a bent rail takes none. |
RailMode | string | get | ”ROUND” | “SQUARE” | “CUSTOM” when every rail shares it, “MIXED” when the rails differ (the panel’s per-rail editor), "" with no rails. |
| Method | |
|---|---|
void Delete() | (from IParametricObject) |
string GetParameter(string path) | One value by path: “Prongs[0].Inclination”, “rails[1].fillet_radius” (case and underscores ignored); null for an unknown path. |
void Move(Vector3d translation) | (from IParametricObject) |
void SetClawCapDistance(double distance) | signed; every prong |
void SetClawCapHeight(double height) | signed; every prong |
void SetClawTipSmoothness(double smoothness) | 0-1; every prong |
void SetClawTipWidth(double width) | 0-1; every prong |
void SetElement(string element) | Applies a saved AdvancedBasket element (ElementsApi.List(“AdvancedBasket”)) to this basket: its prongs and rails replace the current ones, re-seeded onto the mother gem (which stays) so the layout keeps its direction on this cut, and the basket regenerates in place (same id). |
void SetParameter(string path, string value) | Sets one value by path, as text (“0.4”, “true”); ”[]” sets it on every prong or rail (“prongs[].gem_inside”). Enum fields take their number. edit_object sends the keys it has no setter for here. |
void SetProngCount(int prongs) | Parametric edits — each regenerates the basket (the group keeps its id, so this handle stays valid; the member objects are rebuilt) and calls LicenseGate.RequireValid() first. Millimetres. The Set*Count methods rebuild the prong/rail set evenly spaced, cloning the first existing entry’s settings (tool defaults when empty); the other setters apply to every prong. |
void SetProngDiameter(double diameter) | |
void SetProngHeight(double height) | |
void SetProngMode(string mode) | ROUND | CUSTOM | CLAW | OFFSET | DOUBLE | TRIPLE, on every prong (DEFAULT and CIRCLE also mean ROUND) |
void SetRailCount(int rails) | |
void SetRailMode(string mode) | ROUND | SQUARE | CUSTOM, on every rail (DEFAULT also means ROUND). SQUARE is a rectangular section with slightly rounded corners; CUSTOM uses the rail’s profile. |
ICathedralGems
Section.
The pavé row a cathedral carries along its top — one run per arm.
| Property | Type | ||
|---|---|---|---|
Angle | double | get | degrees of the band covered by gems (180 = top half) |
AutomaticProngDiameter | bool | get | |
AutomaticProngDistance | bool | get | SHARED: true, the two prongs of a gap sit where they fit tangent to the stones and the channel edges (they follow the channel width); false, at ProngDistance |
BrightCut | double | get | bright-cut width, mm |
Count | int | get | number of gems per side (per arm) in “COUNT” mode |
DoubleProngSetting | bool | get | |
DrillAllowIntersection | bool | get | |
DrillEnabled | bool | get | |
DrillHeight | double | get | mm |
DrillType | string | get | ”NONE”, “ROUND” or “QUAD” |
DrillVisible | bool | get | bake the drill cutters as visible objects |
DrillWidth | double | get | mm |
Enabled | bool | get | |
ExtensionForManufacturing | double | get | mm |
GemInside | double | get | how deep the gems sit inside, mm |
GemShape | string | get | ”ROUND”, “PRINCESS”, … |
GemSize | double | get | mm |
InnerHeight | double | get | inner channel height, mm |
InnerMargin | double | get | inner margin, mm |
InnerWidth | double | get | inner channel width, mm |
Margin | double | get | side margin, mm |
MinDistance | double | get | minimum distance between gems, mm |
Mode | string | get | ”ANGLE” (the gems cover Angle, the count follows) or “COUNT” (exactly Count gems per side, the angle follows) |
ProngDiameter | double | get | mm — used when AutomaticProngDiameter is false |
ProngDistance | double | get | SHARED, mm: centre-to-centre distance across the channel between the two prongs of a gap when AutomaticProngDistance is false; 0 = a single prong on the centre line |
ProngHeight | double | get | mm |
ProngType | string | get | ”FLUSH” (no channel), “NONE” (channel), “SHARED” or “SCALLOPED” |
ScallopGemHeight | double | get | |
ScallopGemWidth | double | get | Scalloped-setting proportions (percentages, not mm). |
ScallopProngHeight | double | get | |
ScallopProngWidth | double | get | |
ScallopRailHeight | double | get | |
ScallopRailWidth | double | get | |
ScallopRemoveChannel | bool | get | SHARED and SCALLOPED: true drops the channel under the stones (FLUSH never has it) |
Vertical | double | get | vertical displacement of the row, mm |
| Method | |
|---|---|
void SetAngle(double degrees) | |
void SetAutomaticProngDiameter(bool automatic) | |
void SetAutomaticProngDistance(bool automatic) | see AutomaticProngDistance |
void SetBrightCut(double brightCut) | |
void SetCount(int count) | Exact number of gems (switches the mode to “COUNT”) |
void SetDoubleProngSetting(bool enabled) | |
void SetDrillAllowIntersection(bool allow) | |
void SetDrillEnabled(bool enabled) | |
void SetDrillHeight(double height) | |
void SetDrillType(string drillType) | ”NONE”, “ROUND” or “QUAD” |
void SetDrillVisible(bool visible) | |
void SetDrillWidth(double width) | |
void SetEnabled(bool enabled) | |
void SetExtensionForManufacturing(double extension) | |
void SetGemInside(double gemInside) | |
void SetGemShape(string shape) | |
void SetGemSize(double size) | |
void SetInnerHeight(double height) | |
void SetInnerMargin(double margin) | |
void SetInnerWidth(double width) | |
void SetMargin(double margin) | |
void SetMinDistance(double distance) | |
void SetMode(string mode) | ”ANGLE” or “COUNT” |
void SetProngDiameter(double diameter) | |
void SetProngDistance(double distance) | mm, 0 or more (0 = one prong per gap on the centre line); used when AutomaticProngDistance is false |
void SetProngHeight(double height) | |
void SetProngType(string prongType) | ”FLUSH” (no channel), “NONE” (channel), “SHARED” or “SCALLOPED” |
void SetScallopGem(double width, double height) | |
void SetScallopProng(double width, double height) | |
void SetScallopRail(double width, double height) | |
void SetScallopRemoveChannel(bool enabled) | |
void SetVertical(double vertical) |