Skip to content

.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
AllIAdvancedBasket handles for every object of this kind in the active document (empty when there is no document).
ByLayerIAdvancedBasket 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 basket setting under an existing gem — the ArtisanAdvancedBasket tool, headless.
FindThe handle for id, or null when the id does not belong to an object of this kind.
ForGemIAdvancedBasket handles whose mother gem is gemId (empty for Guid.Empty).
PresetsThe prong layouts the tool ships for a gem shape, by name — the same list the panel draws as its preset row.
SelectedAdvanced 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).

ParameterTypeDefault
layerNamestringrequired

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.

ParameterTypeDefault
gemIdsIEnumerable<Guid>null
prongsint0
prongModestringnull
prongDiameterdouble0
prongHeightdouble0
railsint?null
railWidthdouble0
profilestringnull
presetstringnull
positionsarray<double>null
elementstringnull

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.

ParameterTypeDefault
idGuidrequired

Returns IAdvancedBasket.

ForGem

IReadOnlyList<IAdvancedBasket> AdvancedBasketApi.ForGem(Guid gemId)

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

ParameterTypeDefault
gemIdGuidrequired

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…).

ParameterTypeDefault
gemIdGuidrequired

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.

PropertyType
ClawCapDistancedoublegetThe claw tips of CLAW prongs (built in Render mode only), first prong’s values. mm the apex is pulled in toward the gem centre.
ClawCapHeightdoublegetmm the apex moves up (+) or down (-)
ClawTipSmoothnessdoublegetbody-to-tip blend, 0-1
ClawTipWidthdoublegetapex thickness as a fraction of the prong: 0 sharp point - 1 full
GemCaratWeightdoubleget(from IGemSetting)
GemMaterialstringget(from IGemSetting)
GemShapestringget(from IGemSetting)
IdGuidget(from IParametricObject)
LayerNamestringget(from IParametricObject)
MotherGemIdGuidget(from IParametricObject)
ObjectTypestringget(from IParametricObject)
ParametersJsonstringgetEvery 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.
PositionPoint3dget(from IParametricObject)
ProngCountintgetUnlike 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).
ProngDiameterdoubleget
ProngHeightdoubleget
ProngModestringget”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.
RailCountintget
RailGemsICathedralGemsgetThe 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.
RailModestringget”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.

PropertyType
Angledoublegetdegrees of the band covered by gems (180 = top half)
AutomaticProngDiameterboolget
AutomaticProngDistanceboolgetSHARED: 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
BrightCutdoublegetbright-cut width, mm
Countintgetnumber of gems per side (per arm) in “COUNT” mode
DoubleProngSettingboolget
DrillAllowIntersectionboolget
DrillEnabledboolget
DrillHeightdoublegetmm
DrillTypestringget”NONE”, “ROUND” or “QUAD”
DrillVisibleboolgetbake the drill cutters as visible objects
DrillWidthdoublegetmm
Enabledboolget
ExtensionForManufacturingdoublegetmm
GemInsidedoublegethow deep the gems sit inside, mm
GemShapestringget”ROUND”, “PRINCESS”, …
GemSizedoublegetmm
InnerHeightdoublegetinner channel height, mm
InnerMargindoublegetinner margin, mm
InnerWidthdoublegetinner channel width, mm
Margindoublegetside margin, mm
MinDistancedoublegetminimum distance between gems, mm
Modestringget”ANGLE” (the gems cover Angle, the count follows) or “COUNT” (exactly Count gems per side, the angle follows)
ProngDiameterdoublegetmm — used when AutomaticProngDiameter is false
ProngDistancedoublegetSHARED, 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
ProngHeightdoublegetmm
ProngTypestringget”FLUSH” (no channel), “NONE” (channel), “SHARED” or “SCALLOPED”
ScallopGemHeightdoubleget
ScallopGemWidthdoublegetScalloped-setting proportions (percentages, not mm).
ScallopProngHeightdoubleget
ScallopProngWidthdoubleget
ScallopRailHeightdoubleget
ScallopRailWidthdoubleget
ScallopRemoveChannelboolgetSHARED and SCALLOPED: true drops the channel under the stones (FLUSH never has it)
Verticaldoublegetvertical 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)