Skip to content

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).

ParameterType
layer_namestrrequired

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.

ParameterType
gem_idIdLikerequired
prong_countintoptional — None = the tool default
pipe_diameterfloatoptional — None = the tool default
heightfloatoptional — None = the tool default
bulge_widthfloatoptional — None = the tool default
modestroptional — None = the tool default
ornamentstroptional — None = the tool default
ornament_placementstroptional — None = the tool default
ornament_diameterfloatoptional — None = the tool default
gem_insidefloatoptional — None = the tool default
move_in_zfloatoptional — None = the tool default
bulge_insidefloatoptional — None = the tool default
bulge_spreadfloatoptional — None = the tool default
cap_distance_to_centerfloatoptional — None = the tool default
cap_heightfloatoptional — None = the tool default
tip_widthfloatoptional — 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.

ParameterType
idIdLikerequired

ra.tulip.for_gem()

ra.tulip.for_gem(gem_id: IdLike) -> List[Tulip]

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

ParameterType
gem_idIdLikerequired

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)

PropertyTypeSettable
bulge_widthfloatyesthe model’s DepthBulge
gem_carat_weightfloat
gem_insidefloatyessigned
gem_materialstr
gem_shapestr
heightfloatyesvertical scale factor (not mm)
layer_namestr
modestryes”Round” or “Claw”
mother_gem_idstr
move_in_zfloatyessigned
object_typestr
ornamentstryes”None”, “Union” or “Leaf”
ornament_placementstryes”AXIS_X”, “AXIS_Y” or “BOTH”
pipe_diameterfloatyesmm
positionPoint3d
prong_countintyesPetal 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).