Skip to content

.NET API

TulipApi

Tulip settings.

from ArtisanPlugin.Scripting import TulipApi

See also the guide, Gemsets › Tulip, and the Python package, ra.tulip.

Methods

Method
AllITulip handles for every object of this kind in the active document (empty when there is no document).
ByLayerITulip 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 tulip setting — petal-shaped SubD prongs holding an existing gem — the ArtisanTulip tool, headless.
FindThe handle for id, or null when the id does not belong to an object of this kind.
ForGemITulip handles whose mother gem is gemId (empty for Guid.Empty).
SelectedTulips currently selected in the active doc.

All

IReadOnlyList<ITulip> TulipApi.All()

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

Returns IReadOnlyList<ITulip>.

ByLayer

IReadOnlyList<ITulip> TulipApi.ByLayer(string layerName)

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

ParameterTypeDefault
layerNamestringrequired

Returns IReadOnlyList<ITulip>.

Count

int TulipApi.Count()

Number of objects of this kind in the active document.

Returns int.

Create

ITulip TulipApi.Create(
    Guid gemId,
    int prongCount = 0,
    double pipeDiameter = 0,
    double height = 0,
    double bulgeWidth = 0,
    string mode = null,
    string ornament = null,
    string ornamentPlacement = null,
    double ornamentDiameter = 0,
    double gemInside = double.NaN,
    double moveInZ = double.NaN,
    double bulgeInside = double.NaN,
    double bulgeSpread = 0,
    double capDistanceToCenter = double.NaN,
    double capHeight = double.NaN,
    double tipWidth = 0,
    string prongMode = null)

Builds a tulip setting — petal-shaped SubD prongs holding an existing gem — the ArtisanTulip tool, headless. gemId must be a gem in the active document; any shape works. On asymmetric stones (oval, marquise, …) the ornament placement defaults to the X axis with per-axis leaf editing, exactly like the panel. 0 keeps the tool default (or the user’s saved defaults): prongCount 4 (valid values 4 or 6), pipeDiameter 1.15 mm, height 1.7 (a vertical SCALE FACTOR of the whole setting, not mm), bulgeWidth 1.5 (multiplier on the reference tangential bow). prongMode is ROUND (default) or CLAW (mode is its older name; DEFAULT and CIRCLE also mean ROUND); claw tips are built in Render mode only and shaped by capDistanceToCenter, capHeight and tipWidth here or the handle’s Claw* setters. ornament is NONE (default), UNION or LEAF. Returns an ITulip handle to the new tulip group.

ParameterTypeDefault
gemIdGuidrequired
prongCountint0
pipeDiameterdouble0
heightdouble0
bulgeWidthdouble0
modestringnull
ornamentstringnull
ornamentPlacementstringnull
ornamentDiameterdouble0
gemInsidedoubledouble.NaN
moveInZdoubledouble.NaN
bulgeInsidedoubledouble.NaN
bulgeSpreaddouble0
capDistanceToCenterdoubledouble.NaN
capHeightdoubledouble.NaN
tipWidthdouble0
prongModestringnull

Returns ITulip.

Find

ITulip TulipApi.Find(Guid id)

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

ParameterTypeDefault
idGuidrequired

Returns ITulip.

ForGem

IReadOnlyList<ITulip> TulipApi.ForGem(Guid gemId)

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

ParameterTypeDefault
gemIdGuidrequired

Returns IReadOnlyList<ITulip>.

Selected

IReadOnlyList<ITulip> TulipApi.Selected()

Tulips currently selected in the active doc.

Returns IReadOnlyList<ITulip>.

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.

ITulip

Handle — extends IGemSetting, IParametricObject.

PropertyType
BulgeWidthdoublegetthe model’s DepthBulge
ClawCapDistancedoublegetThe claw tips, CLAW mode only (built in Render mode only), under the names the other settings use. The cap distance (in toward the gem centre) and height (up/down) scale with the stone: mm at the tulip’s reference size.
ClawCapHeightdoubleget
ClawTipLengthdoublegetlength of the claw tip, times the tube diameter (default 1)
ClawTipSmoothnessdoublegetbody-to-tip blend, 0-1 (the panel leaves it at 0)
ClawTipWidthdoublegetapex thickness as a fraction of the petal tube: 0 sharp point - 1 full
GemCaratWeightdoubleget(from IGemSetting)
GemInsidedoublegetsigned
GemMaterialstringget(from IGemSetting)
GemShapestringget(from IGemSetting)
Heightdoublegetvertical scale factor (not mm)
IdGuidget(from IParametricObject)
LayerNamestringget(from IParametricObject)
Modestringget”Round” or “Claw” (older name of ProngMode)
MotherGemIdGuidget(from IParametricObject)
MoveInZdoublegetsigned
ObjectTypestringget(from IParametricObject)
Ornamentstringget”None”, “Union” or “Leaf”
OrnamentPlacementstringget”AXIS_X”, “AXIS_Y” or “BOTH”
PipeDiameterdoublegetmm
PositionPoint3dget(from IParametricObject)
ProngCountintgetPetal prongs holding the center gem 4 or 6
ProngModestringget”ROUND” or “CLAW”, as on every setting with prongs
Method
void Delete()(from IParametricObject)
void Move(Vector3d translation)(from IParametricObject)
void SetBulgeCloseBottom(double close)
void SetBulgeCloseTop(double close)
void SetBulgeInside(double bulgeInside)signed
void SetBulgeSpread(double spread)
void SetBulgeWidth(double bulgeWidth)the model’s DepthBulge
void SetCapDistanceToCenter(double distance)Older names of SetClawCapDistance, SetClawCapHeight and SetClawTipWidth.
void SetCapHeight(double height)
void SetClawCapDistance(double distance)signed
void SetClawCapHeight(double height)signed
void SetClawTipLength(double length)> 0
void SetClawTipSmoothness(double smoothness)0-1
void SetClawTipWidth(double width)0-1
void SetExtensionForManufacturing(double extension)
void SetGemInside(double gemInside)signed
void SetHeight(double height)scale factor, > 0
void SetMode(string mode)older name of SetProngMode
void SetMoveInZ(double moveInZ)signed
void SetOrnament(string ornament)NONE | UNION | LEAF
void SetOrnamentDiameter(double diameter)
void SetOrnamentPlacement(string placement)AXIS_X | AXIS_Y | BOTH
void SetPipeDiameter(double pipeDiameter)Parametric edits — each regenerates the tulip (the group keeps its id, so this handle stays valid; the member objects are rebuilt) and calls LicenseGate.RequireValid() first. LITERAL values: 0 and negatives are allowed where the parameter is signed. mm
void SetProngCount(int count)4 or 6
void SetProngMode(string mode)ROUND | CLAW (DEFAULT and CIRCLE also mean ROUND)
void SetTipWidth(double width)