.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 | |
|---|---|
All | ITrellisGemset handles for every object of this kind in the active document (empty when there is no document). |
ByLayer | ITrellisGemset handles on the layer with the given full path (empty when the layer does not exist). |
Count | Number of objects of this kind in the active document. |
Create | 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. |
Find | The handle for id, or null when the id does not belong to an object of this kind. |
ForGem | ITrellisGemset handles whose mother gem is gemId (empty for Guid.Empty). |
Selected | Trellis 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).
| Parameter | Type | Default |
|---|---|---|
layerName | string | required |
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.
| Parameter | Type | Default |
|---|---|---|
gemId | Guid | required |
prongsDiameter | double | 0 |
openingAngle | double | 0 |
curveVerticalSeparation | double | 0 |
railWidth | double | 0 |
railHeight | double | 0 |
rotate90 | bool? | null |
ringCurveId | Guid? | null |
prongMode | string | null |
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.
| Parameter | Type | Default |
|---|---|---|
id | Guid | required |
Returns ITrellisGemset.
ForGem
IReadOnlyList<ITrellisGemset> TrellisGemsetApi.ForGem(Guid gemId)
ITrellisGemset handles whose mother gem is gemId (empty for Guid.Empty).
| Parameter | Type | Default |
|---|---|---|
gemId | Guid | required |
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.
| Property | Type | ||
|---|---|---|---|
BottomProfile | string | get | ”CIRCLE” | “SQUARE” | “CUSTOM” |
ClawCapDistance | double | get | The 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.) |
ClawCapHeight | double | get | mm the apex moves up (+) or down (-) |
ClawTipSmoothness | double | get | body-to-tip blend, 0-1 |
ClawTipWidth | double | get | apex thickness as a fraction of the prong: 0 sharp point - 1 full |
CrossHeight | double | get | signed |
CurveVerticalSeparation | double | get | Vertical gap between the gem girdle plane and the top of the auto-generated default ring curve (only meaningful when no ring curve was selected). |
FaceTangent | bool | get | |
GemCaratWeight | double | get | (from IGemSetting) |
GemInside | double | get | signed |
GemMaterial | string | get | (from IGemSetting) |
GemShape | string | get | (from IGemSetting) |
Id | Guid | get | (from IParametricObject) |
LayerName | string | get | (from IParametricObject) |
MotherGemId | Guid | get | (from IParametricObject) |
ObjectType | string | get | (from IParametricObject) |
OpeningAngle | double | get | |
OverGirdle | double | get | |
Position | Point3d | get | (from IParametricObject) |
ProngMode | string | get | Construction 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. |
ProngsDiameter | double | get | Crossing prongs (the trellis “X” descending from the gem girdle to the ring curve). Millimetres / degrees. |
RingCurveId | Guid | get | Rhino id of the ring curve the trellis was built on, or Guid.Empty when the auto-generated default curve under the gem was used. |
RingSeparationY | double | get | |
Rotate90 | bool | get | |
UpperRailEnabled | bool | get | Upper rail wrapping the gem under the girdle. |
UpperRailHeight | double | get | |
UpperRailMode | string | get | ”CIRCLE” | “CUSTOM” |
UpperRailWidth | double | get |
| 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) |