Skip to content

.NET API

TrellisGemsetApi

Trellis settings.

from ArtisanPlugin.Scripting import TrellisGemsetApi

See also the guide, Gemsets › Trellis, and the Python package, ra.trellis_gemset.

Methods

Method
AllITrellisGemset handles for every object of this kind in the active document (empty when there is no document).
ByLayerITrellisGemset 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 trellis gemset (four crossing prongs descending from the gem girdle to a ring curve, plus an optional upper rail) around an existing gem — the ArtisanTrellisGemset tool, headless.
FindThe handle for id, or null when the id does not belong to an object of this kind.
ForGemITrellisGemset handles whose mother gem is gemId (empty for Guid.Empty).
SelectedTrellis gemsets currently selected in the active doc.

All

IReadOnlyList<ITrellisGemset> TrellisGemsetApi.All()

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

Returns IReadOnlyList<ITrellisGemset>.

ByLayer

IReadOnlyList<ITrellisGemset> TrellisGemsetApi.ByLayer(string layerName)

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

ParameterTypeDefault
layerNamestringrequired

Returns IReadOnlyList<ITrellisGemset>.

Count

int TrellisGemsetApi.Count()

Number of objects of this kind in the active document.

Returns int.

Create

ITrellisGemset TrellisGemsetApi.Create(
    Guid gemId,
    double prongsDiameter = 0,
    double openingAngle = 0,
    double curveVerticalSeparation = 0,
    double railWidth = 0,
    double railHeight = 0,
    bool? rotate90 = null,
    Guid? ringCurveId = null,
    string prongMode = null)

Builds a trellis gemset (four crossing prongs descending from the gem girdle to a ring curve, plus an optional upper rail) around an existing gem — the ArtisanTrellisGemset tool, headless. gemId must be a gem in the active document; pointed / irregular outlines (PEAR, HEART, TRILLION, TRIANGLE, CALF, COFFIN, BAGUETTE) are not supported. Millimetres / degrees; 0 keeps the tool default (or the user’s saved defaults): prongsDiameter 1.05, openingAngle 52, curveVerticalSeparation 5.6, railWidth 1.5, railHeight 1.2. rotate90 true rotates the whole gemset 90 degrees around the gem’s table normal (false keeps the model’s value). ringCurveId picks an existing document curve the prongs land on — it must lie entirely below the gem girdle; Guid.Empty (the default) generates the same finger-size circle under the gem the panel builds. prongMode is ROUND (default) or CLAW, the top of every prong (DEFAULT and CIRCLE also mean ROUND); claw tips are built in Render mode only and tuned through the handle (SetClawCapDistance…). Returns an ITrellisGemset handle to the new trellis group.

ParameterTypeDefault
gemIdGuidrequired
prongsDiameterdouble0
openingAngledouble0
curveVerticalSeparationdouble0
railWidthdouble0
railHeightdouble0
rotate90bool?null
ringCurveIdGuid?null
prongModestringnull

Returns ITrellisGemset.

Find

ITrellisGemset TrellisGemsetApi.Find(Guid id)

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

ParameterTypeDefault
idGuidrequired

Returns ITrellisGemset.

ForGem

IReadOnlyList<ITrellisGemset> TrellisGemsetApi.ForGem(Guid gemId)

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

ParameterTypeDefault
gemIdGuidrequired

Returns IReadOnlyList<ITrellisGemset>.

Selected

IReadOnlyList<ITrellisGemset> TrellisGemsetApi.Selected()

Trellis gemsets currently selected in the active doc.

Returns IReadOnlyList<ITrellisGemset>.

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.

ITrellisGemset

Handle — extends IGemSetting, IParametricObject.

PropertyType
BottomProfilestringget”CIRCLE” | “SQUARE” | “CUSTOM”
ClawCapDistancedoublegetThe claw actually built, the same numbers as on a martini: mm the apex is pulled in toward the gem centre. (The panel shows these as adjustments from 0 = the default claw: 1.00 / -0.50 / 0.25 / 0.05.)
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
CrossHeightdoublegetsigned
CurveVerticalSeparationdoublegetVertical gap between the gem girdle plane and the top of the auto-generated default ring curve (only meaningful when no ring curve was selected).
FaceTangentboolget
GemCaratWeightdoubleget(from IGemSetting)
GemInsidedoublegetsigned
GemMaterialstringget(from IGemSetting)
GemShapestringget(from IGemSetting)
IdGuidget(from IParametricObject)
LayerNamestringget(from IParametricObject)
MotherGemIdGuidget(from IParametricObject)
ObjectTypestringget(from IParametricObject)
OpeningAngledoubleget
OverGirdledoubleget
PositionPoint3dget(from IParametricObject)
ProngModestringgetConstruction modes and the rest of the current values. The top of every prong: “ROUND” | “CLAW” (claw tips are built in Render mode only); BottomProfile is the section at the bottom.
ProngsDiameterdoublegetCrossing prongs (the trellis “X” descending from the gem girdle to the ring curve). Millimetres / degrees.
RingCurveIdGuidgetRhino id of the ring curve the trellis was built on, or Guid.Empty when the auto-generated default curve under the gem was used.
RingSeparationYdoubleget
Rotate90boolget
UpperRailEnabledboolgetUpper rail wrapping the gem under the girdle.
UpperRailHeightdoubleget
UpperRailModestringget”CIRCLE” | “CUSTOM”
UpperRailWidthdoubleget
Method
void Delete()(from IParametricObject)
void Move(Vector3d translation)(from IParametricObject)
void SetBottomHeight(double height)
void SetBottomProfile(string profile)CIRCLE | SQUARE | CUSTOM
void SetBottomWidth(double width)
void SetClawCapDistance(double distance)signed, the claw actually built (see ClawCapDistance)
void SetClawCapHeight(double height)signed
void SetClawTipSmoothness(double smoothness)0-1
void SetClawTipWidth(double width)0-1
void SetCrossHeight(double crossHeight)signed
void SetCurveVerticalSeparation(double separation)
void SetExtensionForManufacturing(double extension)
void SetFaceTangent(bool faceTangent)
void SetGemInside(double gemInside)signed
void SetOpeningAngle(double degrees)panel range 10-170
void SetOverGirdle(double overGirdle)
void SetProfileStart(double start)0-0.95
void SetProngMode(string mode)Parametric edits — each regenerates the trellis (the group keeps its id) and calls LicenseGate.RequireValid() first. LITERAL values: 0 and negatives are allowed where the parameter is signed. ROUND | CLAW (DEFAULT and CIRCLE also mean ROUND)
void SetProngsDiameter(double diameter)
void SetRingSeparationY(double separation)
void SetRotate90(bool rotate90)
void SetUpperRailChamfer(bool chamfer)
void SetUpperRailChamferOffset(double offset)signed
void SetUpperRailEnabled(bool enabled)
void SetUpperRailExternalX(double x)
void SetUpperRailExternalY(double y)
void SetUpperRailHeight(double height)
void SetUpperRailHeightUnderGirdle(double height)
void SetUpperRailMode(string mode)CIRCLE | CUSTOM
void SetUpperRailProfile(string assetName)CLOSED_PROFILE asset
void SetUpperRailRotation(double degrees)signed
void SetUpperRailWidth(double width)