Skip to content

Python package

ra.cabochon

Cabochon stones and their settings.

import rhinoartisan as ra

Wraps ArtisanPlugin.Scripting.CabochonApi.

Functions

Function
all()Cabochon handles for every object of this kind in the active document (empty when there is no document).
by_layer()Cabochon 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()Creates a cabochon stone (the ArtisanCabochon tool, headless) and adds it to the active document.
find()The handle for id, or None when the id does not belong to an object of this kind.
selected()Cabochons currently selected in the active doc.

ra.cabochon.all()

ra.cabochon.all() -> List[Cabochon]

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

ra.cabochon.by_layer()

ra.cabochon.by_layer(layer_name: str) -> List[Cabochon]

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

ParameterType
layer_namestrrequired

ra.cabochon.count()

ra.cabochon.count() -> int

Number of objects of this kind in the active document.

ra.cabochon.create()

ra.cabochon.create(x=None, y=None, z=None, shape=None, type=None, angle=None, girdle_height=None, plane=None, girdle_angle=None) -> Cabochon

Creates a cabochon stone (the ArtisanCabochon tool, headless) and adds it to the active document. Unlike Bezel/AdvancedBezel, a cabochon does NOT wrap a mother gem: it is its own stone, placed on plane (omitted = world XY, like the panel’s “add on plane”). All dimensional arguments are millimetres. Omit (None) to keep the tool’s default — or the user’s saved defaults — for that parameter (x 4, y 8, z 2, angle 15 degrees, girdle_height 1). shape accepts case-insensitive CabochonShape names (“Round”, “Oval”, “Rectangular”, “Heart”, “Pear”, “Marquise”, “Diamond”); type accepts CabochonType names (“Cabochon”, “FlatTopSingleBevel”, “FlatTopDoubleBevel”, “BuffTopSingleBevel”, “BuffTopDoubleBevel”). Omitted/None keeps the default (Round / Cabochon or the saved defaults). Throws ArgumentException for an unknown shape/type name and InvalidOperationException when the geometry fails to compute.

ParameterType
xfloatoptional — None = the tool default
yfloatoptional — None = the tool default
zfloatoptional — None = the tool default
shapestroptional — None = the tool default
typestroptional — None = the tool default
angleOptional[float]optional — None = the tool default
girdle_heightOptional[float]optional — None = the tool default
planeOptional[PlaneLike]optional — None = the tool default
girdle_angleOptional[float]optional — None = the tool default

ra.cabochon.find()

ra.cabochon.find(id: IdLike) -> Cabochon

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

ParameterType
idIdLikerequired

ra.cabochon.selected()

ra.cabochon.selected() -> List[Cabochon]

Cabochons currently selected in the active doc. Empty list if nothing is selected or the selection contains no cabochons.

Handles

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

Cabochon (handle)

A cabochon is its own stone (round / oval / rectangular / … dome cut): it is not built around a mother gem, so it extends ParametricObject directly and MotherGemId is always None. The setters recompute the stone and replace it in place, keeping its Guid (the same thing the panel does on accept), and take LITERAL values: a 0 angle is a straight wall and a 0 girdle height is no girdle.

PropertyTypeSettable
anglefloatyesdegrees
cut_typestryesCabochonType name (“Cabochon”, “FlatTopSingleBevel”, …)
girdle_anglefloatyesdegrees
girdle_heightfloatyesmillimetres
layer_namestr
mother_gem_idstr
object_typestr
positionPoint3d
shapestryesCabochonShape name (“Round”, “Oval”, …)
size_xfloatyesmillimetres
size_yfloatyesmillimetres
size_zfloatyesdome height, millimetres
Method
delete()
move(translation: VectorLike)
set_size(x: float, y: float, z: float)

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