Skip to content

Scripting API

IBasket

Returned by BasketApi — a prong basket under one mother gem. Adds to IGemSetting:

MemberMeaning
ProngCountNumber of prongs
ProngHeightProng height, mm
ProngDiameterTopProng diameter at the top, mm
ProngDiameterGirdleProng diameter at the girdle, mm
ProngDiameterBottomProng diameter at the bottom, mm
SetProngCount(prongs)Rebuild with this many prongs — negative counts follow the tool’s rotated-variant convention
SetProngDiameter(diameter)Prong diameter, mm
SetProngHeight(height)Prong height, mm
UpperRail / BaseRailThe rails (IBasketRail): Enabled, Width, Height, Rotation, GemSizePercentage, ProfileName, Mode ("DEFAULT", "SQUARE" or "CUSTOM"), with their Set… setters, and Gems, the stones on the rail’s outer face (see Rail gems). The base rail also carries the flush fit: FlushFit (no rail, the prongs converge under the gem and meet at the centre), FlushFitOffset (mm, 0 = the centre), FlushFitAngle (degrees 0-75, the arrival angle from vertical), FlushFitBend (0-90 %, how far down the prong drops straight before turning in) and FlushFitRoundFoot (domed feet), with SetFlushFit…; on the upper rail they throw NotSupportedException. Rails explains the modes
SetElement(name)Applies a saved Basket element. The basket keeps its gem

Each setter regenerates the basket: the group keeps its id, so the handle stays valid; the member objects are rebuilt.

Rail gems

Each rail has a Gems section: an ICathedralGems for the small stones on the rail’s outer face, between the prongs (the panel’s Gallery Rail Gems on the upper rail and Lower Rail Gems on the base rail). It is off by default, and it reads and writes like the pavé row of a cathedral, with these differences:

  • Every free stretch between two prongs takes as many stones as fit, centred on it. Mode, Count and Angle are not used.
  • SetProngType takes "FLUSH", "SHARED" (prongs; SetScallopRemoveChannel(true) leaves them without their channel) or "SCALLOPED". "NONE" is rejected.
  • SetGemShape takes "ROUND" or "SQUARE" (princess-cut).
  • While the gems are enabled the rail is built with the square section, whatever its Mode, and Width and Height grow to hold the stones. They do not shrink back.
  • The base rail takes no gems in flush fit: enabling them there throws.
import rhinoartisan as ra

basket = ra.basket.create([gem_id], prongs=4)[0]
basket.upper_rail.gems.enabled = True
basket.upper_rail.gems.gem_size = 1.2
basket.upper_rail.gems.prong_type = "FLUSH"
basket.base_rail.mode = "SQUARE"