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).
| Parameter | Type | |
|---|---|---|
layer_name | str | required |
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.
| Parameter | Type | |
|---|---|---|
gem_id | IdLike | required |
prongs_diameter | float | optional — None = the tool default |
opening_angle | float | optional — None = the tool default |
curve_vertical_separation | float | optional — None = the tool default |
rail_width | float | optional — None = the tool default |
rail_height | float | optional — None = the tool default |
rotate90 | Optional[bool] | optional — None = the tool default |
ring_curve_id | Optional[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.
| Parameter | Type | |
|---|---|---|
id | IdLike | required |
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).
| Parameter | Type | |
|---|---|---|
gem_id | IdLike | required |
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)
| Property | Type | Settable | |
|---|---|---|---|
bottom_profile | str | yes | ”CIRCLE” | “SQUARE” | “CUSTOM” |
cross_height | float | yes | signed |
curve_vertical_separation | float | yes | 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). |
face_tangent | bool | yes | |
gem_carat_weight | float | ||
gem_inside | float | yes | signed |
gem_material | str | ||
gem_shape | str | ||
layer_name | str | ||
mother_gem_id | str | ||
object_type | str | ||
opening_angle | float | yes | |
over_girdle | float | yes | |
position | Point3d | ||
prong_mode | str | yes | Construction modes and the rest of the current values. “CIRCLE” | “CLAW” |
prongs_diameter | float | yes | Crossing prongs (the trellis “X” descending from the gem girdle to the ring curve). Millimetres / degrees. |
ring_curve_id | str | Rhino 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_y | float | yes | |
rotate90 | bool | yes | |
upper_rail_enabled | bool | yes | Upper rail wrapping the gem under the girdle. |
upper_rail_height | float | yes | |
upper_rail_mode | str | yes | ”CIRCLE” | “CUSTOM” |
upper_rail_width | float | yes |
| 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).