Skip to content

Python package

ra.martini

Martini settings.

import rhinoartisan as ra

Wraps ArtisanPlugin.Scripting.MartiniApi.

Functions

Function
all()Martini handles for every object of this kind in the active document (empty when there is no document).
by_layer()Martini 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 martini setting — four tapering prongs meeting in a point below an existing gem, with an optional upper rail and two lateral side gems — the ArtisanMartini tool, headless.
find()The handle for id, or None when the id does not belong to an object of this kind.
for_gem()Martini handles whose mother gem is gem_id (empty for None).
selected()Martinis currently selected in the active doc.

ra.martini.all()

ra.martini.all() -> List[Martini]

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

ra.martini.by_layer()

ra.martini.by_layer(layer_name: str) -> List[Martini]

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

ParameterType
layer_namestrrequired

ra.martini.count()

ra.martini.count() -> int

Number of objects of this kind in the active document.

ra.martini.create()

ra.martini.create(gem_id: IdLike, prong_height=None, prong_diameter_top=None, prong_diameter_bottom=None, upper_rail=None, side_gems=None, side_gem_size=None, prong_mode=None, face_tangent=None, prong_profile_name=None, rail_width=None, rail_height=None, rail_height_under_girdle=None, rail_profile_name=None, side_gem_shape=None, side_bezel_width=None, side_distance=None) -> Martini

Builds a martini setting — four tapering prongs meeting in a point below an existing gem, with an optional upper rail and two lateral side gems — the ArtisanMartini tool, headless. gem_id must be a gem in the active document with a martini-friendly shape (any shape except TRIANGLE and COFFIN). Millimetres; 0 (or None) keeps the tool default (or the user’s saved defaults): prong_height 5.40, prong_diameter_top 1.30, prong_diameter_bottom 1.30, side_gem_size 1.40; upper_rail and side_gems are both enabled by default. As in the panel, the prong “face tangent” behaviour is seeded from the gem’s symmetry unless face_tangent says otherwise. prong_mode picks the prong construction: DEFAULT, CUSTOM or CLAW. The claw tips are shaped through the returned handle (martini.claw_cap_height = … and friends), because their defaults are signed and this signature reads 0 as “keep the default”. Returns an Martini handle to the new martini group.

ParameterType
gem_idIdLikerequired
prong_heightfloatoptional — None = the tool default
prong_diameter_topfloatoptional — None = the tool default
prong_diameter_bottomfloatoptional — None = the tool default
upper_railOptional[bool]optional — None = the tool default
side_gemsOptional[bool]optional — None = the tool default
side_gem_sizefloatoptional — None = the tool default
prong_modestroptional — None = the tool default
face_tangentOptional[bool]optional — None = the tool default
prong_profile_namestroptional — None = the tool default
rail_widthfloatoptional — None = the tool default
rail_heightfloatoptional — None = the tool default
rail_height_under_girdlefloatoptional — None = the tool default
rail_profile_namestroptional — None = the tool default
side_gem_shapestroptional — None = the tool default
side_bezel_widthfloatoptional — None = the tool default
side_distancefloatoptional — None = the tool default

ra.martini.find()

ra.martini.find(id: IdLike) -> Martini

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

ParameterType
idIdLikerequired

ra.martini.for_gem()

ra.martini.for_gem(gem_id: IdLike) -> List[Martini]

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

ParameterType
gem_idIdLikerequired

ra.martini.selected()

ra.martini.selected() -> List[Martini]

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

Martini (handle)

PropertyTypeSettable
claw_cap_distancefloatyes
claw_cap_heightfloatyes
claw_tip_smoothnessfloatyes
claw_tip_widthfloatyes
face_tangentboolyes
gem_carat_weightfloat
gem_materialstr
gem_shapestr
layer_namestr
mother_gem_idstr
object_typestr
positionPoint3d
prong_diameter_bottomfloatyes
prong_diameter_topfloatyes
prong_heightfloatyesProngs (4, tapering to a point below the gem). Millimetres.
prong_modestryesProng construction: “DEFAULT”, “CUSTOM” or “CLAW”. The claw values only shape the prong tips in CLAW mode; ClawCapHeight is signed.
side_gem_sizefloatyes
side_gems_enabledboolyes
upper_rail_enabledboolyesUpper rail and lateral side gems
Method
delete()
move(translation: VectorLike)

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