Skip to content

.NET API

BasketApi

Basket settings: prongs, upper and base rails.

from ArtisanPlugin.Scripting import BasketApi

See also the guide, Gemsets › Basket, and the Python package, ra.basket.

Methods

Method
AllIBasket handles for every object of this kind in the active document (empty when there is no document).
ByGemMaterial
ByLayerIBasket 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 a basket setting under an existing gem — the ArtisanBasket tool, headless.
FindThe handle for id, or null when the id does not belong to an object of this kind.
ForGemIBasket handles whose mother gem is gemId (empty for Guid.Empty).
SelectedBaskets currently selected in the active doc.

All

IReadOnlyList<IBasket> BasketApi.All()

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

Returns IReadOnlyList<IBasket>.

ByGemMaterial

IReadOnlyList<IBasket> BasketApi.ByGemMaterial(string materialName)
ParameterTypeDefault
materialNamestringrequired

Returns IReadOnlyList<IBasket>.

ByLayer

IReadOnlyList<IBasket> BasketApi.ByLayer(string layerName)

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

ParameterTypeDefault
layerNamestringrequired

Returns IReadOnlyList<IBasket>.

Count

int BasketApi.Count()

Number of objects of this kind in the active document.

Returns int.

Create

IReadOnlyList<IBasket> BasketApi.Create(
    IEnumerable<Guid> gemIds = null,
    int prongs = 0,
    double prongDiameter = 0,
    double prongHeight = 0,
    double prongHeightOverGirdle = 0,
    double gemInside = double.NaN,
    bool? upperRail = null,
    bool? baseRail = null,
    string support = null,
    string prongMode = null,
    string prongProfile = null,
    double prongDiameterBottom = 0,
    double prongRotation = double.NaN,
    bool? straightProng = null,
    double supportWidth = 0,
    double supportThickness = 0,
    double upperRailWidth = 0,
    double upperRailHeight = 0,
    double upperRailHeightUnderGirdle = 0,
    double upperRailGemSizePercentage = 0,
    string upperRailProfile = null,
    double baseRailWidth = 0,
    double baseRailHeight = 0,
    double baseRailMoveInZ = double.NaN,
    double baseRailGemSizePercentage = 0,
    string baseRailProfile = null,
    string element = null)

Builds a basket setting under an existing gem — the ArtisanBasket tool, headless. One basket (its own group) per gem; gemIds null/empty = the currently selected gems. Millimetres; 0 keeps the tool default (or the user’s saved defaults): prongDiameter 1.5 (sets top/girdle/bottom together), prongHeight 4, prongHeightOverGirdle 0.3. prongs 0 keeps the default (4 rotated); positive/negative counts follow the tool (negative = rotated variant). gemInside defaults to 0.35. upperRail/baseRail null keep the defaults (both enabled). support is NONE (default), SINGLE or DOUBLE. prongMode is ROUND (default), CUSTOM (the prongProfile section; a profile alone implies it, and the section starts turned 90 degrees unless prongRotation says otherwise) or CLAW; DEFAULT and CIRCLE also mean ROUND. Claw tips are built in Render mode only; tune them through the handle’s Prong section (SetClawGemInside…). Returns one IBasket handle per gem, in input order. element = name of a saved Basket element (ElementsApi.List(“Basket”)) to start from instead of the defaults; explicit arguments override it.

ParameterTypeDefault
gemIdsIEnumerable<Guid>null
prongsint0
prongDiameterdouble0
prongHeightdouble0
prongHeightOverGirdledouble0
gemInsidedoubledouble.NaN
upperRailbool?null
baseRailbool?null
supportstringnull
prongModestringnull
prongProfilestringnull
prongDiameterBottomdouble0
prongRotationdoubledouble.NaN
straightProngbool?null
supportWidthdouble0
supportThicknessdouble0
upperRailWidthdouble0
upperRailHeightdouble0
upperRailHeightUnderGirdledouble0
upperRailGemSizePercentagedouble0
upperRailProfilestringnull
baseRailWidthdouble0
baseRailHeightdouble0
baseRailMoveInZdoubledouble.NaN
baseRailGemSizePercentagedouble0
baseRailProfilestringnull
elementstringnull

Returns IReadOnlyList<IBasket>.

Find

IBasket BasketApi.Find(Guid id)

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

ParameterTypeDefault
idGuidrequired

Returns IBasket.

ForGem

IReadOnlyList<IBasket> BasketApi.ForGem(Guid gemId)

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

ParameterTypeDefault
gemIdGuidrequired

Returns IReadOnlyList<IBasket>.

Selected

IReadOnlyList<IBasket> BasketApi.Selected()

Baskets currently selected in the active doc.

Returns IReadOnlyList<IBasket>.

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.

IBasket

Handle — extends IGemSetting, IParametricObject.

PropertyType
BaseRailIBasketRailget
GemCaratWeightdoubleget(from IGemSetting)
GemMaterialstringget(from IGemSetting)
GemShapestringget(from IGemSetting)
IdGuidget(from IParametricObject)
LayerNamestringget(from IParametricObject)
MotherGemIdGuidget(from IParametricObject)
ObjectTypestringget(from IParametricObject)
PositionPoint3dget(from IParametricObject)
ProngIBasketPronggetThe rest of the tool’s parameters, grouped as the panel groups them.
ProngCountintgetsigned: negative = the rotated layout
ProngDiameterBottomdoubleget
ProngDiameterGirdledoublegetstored for older files only: the prong’s girdle section is built from ProngDiameterTop
ProngDiameterTopdoubleget
ProngHeightdoubleget
ProngModestringget”ROUND” | “CUSTOM” | “CLAW”: the prong construction, as on every setting with prongs. The claw values live in the Prong section.
ProngsRotatedboolget
UpperRailIBasketRailget
Method
void Delete()(from IParametricObject)
void Move(Vector3d translation)(from IParametricObject)
void SetElement(string element)Applies a saved Basket element (ElementsApi.List(“Basket”)) to this basket: its parameters replace the current ones, the mother gem stays, and the basket regenerates in place (same id).
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; negative prong counts follow the tool’s rotated-variant convention.
void SetProngDiameter(double diameter)writes all three diameters
void SetProngHeight(double height)
void SetProngMode(string mode)ROUND | CUSTOM | CLAW (DEFAULT and CIRCLE also mean ROUND). A prong that becomes CUSTOM starts with its section turned 90 degrees (Prong.Rotation). Claw tips are built in Render mode only.

IBasketRail

Section.

One of the basket’s two rails. The upper rail additionally carries the chamfer; the base rail carries its vertical offset. Members that do not apply to a rail throw NotSupportedException rather than silently doing nothing.

PropertyType
Chamferboolgetupper rail only
ChamferOffsetdoublegetupper rail only
Enabledboolget
GemSizePercentagedoublegetrail diameter as % of the gem
Heightdoublegetmm
HeightUnderGirdledoublegetupper rail only
ModestringgetDEFAULT (elliptical section) or CUSTOM (the CLOSED_PROFILE)
MoveInZdoublegetbase rail only, signed
ProfileNamestringgetCLOSED_PROFILE asset name (used in CUSTOM mode)
Rotationdoublegetdegrees, signed
Widthdoublegetmm
Method
void SetChamfer(bool chamfer)upper rail only
void SetChamferOffset(double offset)upper rail only, signed
void SetEnabled(bool enabled)
void SetGemSizePercentage(double percentage)
void SetHeight(double height)
void SetHeightUnderGirdle(double height)upper rail only
void SetMode(string mode)DEFAULT (elliptical section) or CUSTOM (the rail’s CLOSED_PROFILE)
void SetMoveInZ(double moveInZ)base rail only, signed
void SetProfile(string assetName)also switches the rail to CUSTOM mode, where the profile is used
void SetRotation(double degrees)signed
void SetWidth(double width)

IBasketProng

Section.

The prongs and their support posts.

PropertyType
BottomRailInsidedoubleget
CapBumpdoublegetmm
ClawGemInsidedoublegetThe basket’s claw tip, CLAW mode only (built in Render mode only). mm the tip reaches in toward the gem.
ClawHeightdoublegetmm added to the height over the girdle, signed
ClawOnCurveintgetthe panel’s “Smoothness” (1-30): on STRAIGHT prongs, where the claw starts to bend, as a % of the girdle-to-base distance; curved prongs (the default) ignore it
ClawTensiondoublegetdegrees, the panel’s “Tip direction” (10-60)
Countintgetnegative = the rotated layout
DiameterBottomdoublegetmm
DiameterTopdoublegetmm
ExtensionForManufacturingdoubleget
GemInsidedoublegetmm, signed
Heightdoublegetmm
HeightOverGirdledoublegetmm
Modestringget”ROUND” | “CUSTOM” | “CLAW” (the same as IBasket.ProngMode)
ProfileNamestringgetCLOSED_PROFILE asset name, "" when unset
Rotationdoublegetdegrees, signed
Straightboolgetstraight vs curved prong body
Supportstringget”NONE” | “SINGLE” | “DOUBLE”
SupportThicknessdoublegetmm
SupportWidthdoublegetmm
Method
void SetBottomRailInside(double value)
void SetCapBump(double capBump)
void SetClawGemInside(double gemInside)
void SetClawHeight(double height)signed
void SetClawOnCurve(int onCurve)
void SetClawTension(double tension)
void SetCount(int count)negative = rotated; 0 = no prongs
void SetDiameterBottom(double diameter)
void SetDiameterTop(double diameter)
void SetExtensionForManufacturing(double extension)
void SetGemInside(double gemInside)signed
void SetHeight(double height)
void SetHeightOverGirdle(double height)
void SetMode(string mode)ROUND | CUSTOM | CLAW (DEFAULT and CIRCLE also mean ROUND); becoming CUSTOM starts Rotation at 90
void SetProfile(string assetName)CLOSED_PROFILE asset; also switches the prongs to CUSTOM mode, where the profile is used (from another mode, Rotation starts at 90)
void SetRotation(double degrees)signed
void SetStraight(bool straight)
void SetSupport(string support)NONE | SINGLE | DOUBLE
void SetSupportThickness(double thickness)
void SetSupportWidth(double width)