Skip to content

Python package

ra.trellis_gemset

Trellis settings.

import rhinoartisan as ra

Wraps ArtisanPlugin.Scripting.TrellisGemsetApi.

Functions

Function
all()TrellisGemset handles for every object of this kind in the active document (empty when there is no document).
by_layer()TrellisGemset 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 None when the id does not belong to an object of this kind.
for_gem()TrellisGemset handles whose mother gem is gem_id (empty for None).
selected()Trellis gemsets currently selected in the active doc.

ra.trellis_gemset.all()

ra.trellis_gemset.all() -> List[TrellisGemset]

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

ra.trellis_gemset.by_layer()

ra.trellis_gemset.by_layer(layer_name: str) -> List[TrellisGemset]

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

ParameterType
layer_namestrrequired

ra.trellis_gemset.count()

ra.trellis_gemset.count() -> int

Number of objects of this kind in the active document.

ra.trellis_gemset.create()

ra.trellis_gemset.create(gem_id: IdLike, prongs_diameter=None, opening_angle=None, curve_vertical_separation=None, rail_width=None, rail_height=None, rotate90=None, ring_curve_id=None) -> TrellisGemset

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. gem_id must be a gem in the active document; pointed / irregular outlines (PEAR, HEART, TRILLION, TRIANGLE, CALF, COFFIN, BAGUETTE) are not supported. Millimetres / degrees; omitting keeps the tool default (or the user’s saved defaults): prongs_diameter 1.05, opening_angle 52, curve_vertical_separation 5.6, rail_width 1.5, rail_height 1.2. rotate90 True rotates the whole gemset 90 degrees around the gem’s table normal (False keeps the model’s value). ring_curve_id picks an existing document curve the prongs land on — it must lie entirely below the gem girdle; None (the default) generates the same finger-size circle under the gem the panel builds. Returns an TrellisGemset handle to the new trellis group.

ParameterType
gem_idIdLikerequired
prongs_diameterfloatoptional — None = the tool default
opening_anglefloatoptional — None = the tool default
curve_vertical_separationfloatoptional — None = the tool default
rail_widthfloatoptional — None = the tool default
rail_heightfloatoptional — None = the tool default
rotate90Optional[bool]optional — None = the tool default
ring_curve_idOptional[IdLike]optional — None = the tool default

ra.trellis_gemset.find()

ra.trellis_gemset.find(id: IdLike) -> TrellisGemset

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

ParameterType
idIdLikerequired

ra.trellis_gemset.for_gem()

ra.trellis_gemset.for_gem(gem_id: IdLike) -> List[TrellisGemset]

TrellisGemset handles whose mother gem is gem_id (empty for None).

ParameterType
gem_idIdLikerequired

ra.trellis_gemset.selected()

ra.trellis_gemset.selected() -> List[TrellisGemset]

Trellis gemsets currently selected in the active doc.

Handles

Objects returned by the functions above. Assigning a settable property regenerates the object; the change is one undo step inside ra.transaction().

TrellisGemset (handle)

PropertyTypeSettable
bottom_profilestryes”CIRCLE” | “SQUARE” | “CUSTOM”
cross_heightfloatyessigned
curve_vertical_separationfloatyesVertical gap between the gem girdle plane and the top of the auto-generated default ring curve (only meaningful when no ring curve was selected).
face_tangentboolyes
gem_carat_weightfloat
gem_insidefloatyessigned
gem_materialstr
gem_shapestr
layer_namestr
mother_gem_idstr
object_typestr
opening_anglefloatyes
over_girdlefloatyes
positionPoint3d
prong_modestryesConstruction modes and the rest of the current values. “CIRCLE” | “CLAW”
prongs_diameterfloatyesCrossing prongs (the trellis “X” descending from the gem girdle to the ring curve). Millimetres / degrees.
ring_curve_idstrRhino id of the ring curve the trellis was built on, or None when the auto-generated default curve under the gem was used.
ring_separation_yfloatyes
rotate90boolyes
upper_rail_enabledboolyesUpper rail wrapping the gem under the girdle.
upper_rail_heightfloatyes
upper_rail_modestryes”CIRCLE” | “CUSTOM”
upper_rail_widthfloatyes
Method
delete()
move(translation: VectorLike)
set_bottom_height(height: float)
set_bottom_width(width: float)
set_claw_cap_distance(distance: float)
set_claw_cap_height(height: float)signed
set_claw_tip_smoothness(smoothness: float)
set_claw_tip_width(width: float)
set_extension_for_manufacturing(extension: float)
set_profile_start(start: float)0-0.95
set_upper_rail_chamfer(chamfer: bool)
set_upper_rail_chamfer_offset(offset: float)signed
set_upper_rail_external_x(x: float)
set_upper_rail_external_y(y: float)
set_upper_rail_height_under_girdle(height: float)
set_upper_rail_profile(asset_name: str)CLOSED_PROFILE asset
set_upper_rail_rotation(degrees: float)signed

Plus what every handle has: id, delete(), update(**kwargs), parameters(), equality and hashing by id, and raw (the underlying .NET object).