Python package
ra.tulip
Tulip settings.
import rhinoartisan as ra
Wraps ArtisanPlugin.Scripting.TulipApi.
Functions
| Function | |
|---|---|
all() | Tulip handles for every object of this kind in the active document (empty when there is no document). |
by_layer() | Tulip 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 tulip setting — petal-shaped SubD prongs holding an existing gem — the ArtisanTulip tool, headless. |
find() | The handle for id, or None when the id does not belong to an object of this kind. |
for_gem() | Tulip handles whose mother gem is gem_id (empty for None). |
selected() | Tulips currently selected in the active doc. |
ra.tulip.all()
ra.tulip.all() -> List[Tulip]
Tulip handles for every object of this kind in the active document (empty when there is no document).
ra.tulip.by_layer()
ra.tulip.by_layer(layer_name: str) -> List[Tulip]
Tulip handles on the layer with the given full path (empty when the layer does not exist).
| Parameter | Type | |
|---|---|---|
layer_name | str | required |
ra.tulip.count()
ra.tulip.count() -> int
Number of objects of this kind in the active document.
ra.tulip.create()
ra.tulip.create(gem_id: IdLike, prong_count=None, pipe_diameter=None, height=None, bulge_width=None, mode=None, ornament=None, ornament_placement=None, ornament_diameter=None, gem_inside=None, move_in_z=None, bulge_inside=None, bulge_spread=None, cap_distance_to_center=None, cap_height=None, tip_width=None) -> Tulip
Builds a tulip setting — petal-shaped SubD prongs holding an existing gem — the ArtisanTulip tool, headless. gem_id 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. omitting keeps the tool default (or the user’s saved defaults): prong_count 4 (valid values 4 or 6), pipe_diameter 1.15 mm, height 1.7 (a vertical SCALE FACTOR of the whole setting, not mm), bulge_width 1.5 (multiplier on the reference tangential bow). mode is ROUND (default) or CLAW; ornament is NONE (default), UNION or LEAF. Returns an Tulip handle to the new tulip group.
| Parameter | Type | |
|---|---|---|
gem_id | IdLike | required |
prong_count | int | optional — None = the tool default |
pipe_diameter | float | optional — None = the tool default |
height | float | optional — None = the tool default |
bulge_width | float | optional — None = the tool default |
mode | str | optional — None = the tool default |
ornament | str | optional — None = the tool default |
ornament_placement | str | optional — None = the tool default |
ornament_diameter | float | optional — None = the tool default |
gem_inside | float | optional — None = the tool default |
move_in_z | float | optional — None = the tool default |
bulge_inside | float | optional — None = the tool default |
bulge_spread | float | optional — None = the tool default |
cap_distance_to_center | float | optional — None = the tool default |
cap_height | float | optional — None = the tool default |
tip_width | float | optional — None = the tool default |
ra.tulip.find()
ra.tulip.find(id: IdLike) -> Tulip
The handle for id, or None when the id does not belong to an object of this kind.
| Parameter | Type | |
|---|---|---|
id | IdLike | required |
ra.tulip.for_gem()
ra.tulip.for_gem(gem_id: IdLike) -> List[Tulip]
Tulip handles whose mother gem is gem_id (empty for None).
| Parameter | Type | |
|---|---|---|
gem_id | IdLike | required |
ra.tulip.selected()
ra.tulip.selected() -> List[Tulip]
Tulips 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().
Tulip (handle)
| Property | Type | Settable | |
|---|---|---|---|
bulge_width | float | yes | the model’s DepthBulge |
gem_carat_weight | float | ||
gem_inside | float | yes | signed |
gem_material | str | ||
gem_shape | str | ||
height | float | yes | vertical scale factor (not mm) |
layer_name | str | ||
mode | str | yes | ”Round” or “Claw” |
mother_gem_id | str | ||
move_in_z | float | yes | signed |
object_type | str | ||
ornament | str | yes | ”None”, “Union” or “Leaf” |
ornament_placement | str | yes | ”AXIS_X”, “AXIS_Y” or “BOTH” |
pipe_diameter | float | yes | mm |
position | Point3d | ||
prong_count | int | yes | Petal prongs holding the center gem 4 or 6 |
| Method | |
|---|---|
delete() | |
move(translation: VectorLike) | |
set_bulge_close_bottom(close: float) | |
set_bulge_close_top(close: float) | |
set_bulge_inside(bulge_inside: float) | signed |
set_bulge_spread(spread: float) | |
set_cap_distance_to_center(distance: float) | Claw mode only — cap_height is signed. |
set_cap_height(height: float) | |
set_extension_for_manufacturing(extension: float) | |
set_ornament_diameter(diameter: float) | |
set_tip_width(width: float) |
Plus what every handle has: id, delete(), update(**kwargs), parameters(), equality and hashing by id, and raw (the underlying .NET object).