Skip to content

Python package

ra.class_ring

Class rings.

import rhinoartisan as ra

Wraps ArtisanPlugin.Scripting.ClassRingApi.

Functions

Function
all()ClassRing handles for every object of this kind in the active document (empty when there is no document).
by_layer()ClassRing 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 class ring (the ArtisanClassRing tool, headless): a heavy signet-style body with a flat top seat and one stone on it — a faceted gem or a cabochon, regenerated with the ring.
find()The handle for id, or None when the id does not belong to an object of this kind.
selected()Class rings currently selected in the active doc.

ra.class_ring.all()

ra.class_ring.all() -> List[ClassRing]

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

ra.class_ring.by_layer()

ra.class_ring.by_layer(layer_name: str) -> List[ClassRing]

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

ParameterType
layer_namestrrequired

ra.class_ring.count()

ra.class_ring.count() -> int

Number of objects of this kind in the active document.

ra.class_ring.create()

ra.class_ring.create(top_width=None, top_height=None, depth=None, offset=None, stand_height=None, bottom_width=None, bottom_height=None, side_width=None, top_surface_height=None, angle=None, gem_shape=None, stone_type=None, cabochon_height=None, move_z=None, finger_diameter=None, plane=None, element=None) -> ClassRing

Builds a class ring (the ArtisanClassRing tool, headless): a heavy signet-style body with a flat top seat and one stone on it — a faceted gem or a cabochon, regenerated with the ring. Millimetres; omitting keeps the tool default (or the user’s saved defaults). Top seat: top_width 2, top_height 3, depth 1, offset 1, stand_height 1. Shank: bottom_width 2, bottom_height 2, side_width 2, top_surface_height 1, angle 3 degrees. gem_shape ROUND | OVAL (default) | CUSHION; stone_type GEMSTONE (default) | CABOCHON with cabochon_height (2) and moveZ (stone lift, NaN = default 0). finger_diameter 0 = document ring size. plane omitted = world ZX (the tool’s own frame: finger axis along world Y). Returns an ClassRing handle to the new ring (its stone is a child). element = name of a saved element (ra.elements.list) to start from; explicit arguments override it.

ParameterType
top_widthfloatoptional — None = the tool default
top_heightfloatoptional — None = the tool default
depthfloatoptional — None = the tool default
offsetfloatoptional — None = the tool default
stand_heightfloatoptional — None = the tool default
bottom_widthfloatoptional — None = the tool default
bottom_heightfloatoptional — None = the tool default
side_widthfloatoptional — None = the tool default
top_surface_heightfloatoptional — None = the tool default
anglefloatoptional — None = the tool default
gem_shapestroptional — None = the tool default
stone_typestroptional — None = the tool default
cabochon_heightfloatoptional — None = the tool default
move_zfloatoptional — None = the tool default
finger_diameterfloatoptional — None = the tool default
planeOptional[PlaneLike]optional — None = the tool default
elementstroptional — None = the tool default

ra.class_ring.find()

ra.class_ring.find(id: IdLike) -> ClassRing

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

ParameterType
idIdLikerequired

ra.class_ring.selected()

ra.class_ring.selected() -> List[ClassRing]

Class rings 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().

ClassRing (handle)

Class ring (the ArtisanClassRing tool): a signet-like body with a flat top seat holding one stone (faceted gem or cabochon). The stone is a child object regenerated together with the ring — it is NOT a free-standing gem, so it has no MotherGem.

PropertyTypeSettable
anglefloatyes
bottom_heightfloatyes
bottom_widthfloatyesShank (mm / degrees)
cabochon_heightfloatyes
childrenList[str]The baked stone (gem or cabochon brep), if any.
depthfloatyes
gem_shapestryesStone: “ROUND” | “OVAL” | “CUSHION”; “GEMSTONE” | “CABOCHON”.
layer_namestr
mother_gem_idstr
move_zfloatyes
object_typestr
offsetfloatyes
positionPoint3d
ring_diameter_mmfloat
ring_size_labelstr
ring_size_regionstr
side_widthfloatyes
stand_heightfloatyes
stone_typestryes
top_heightfloatyes
top_surface_heightfloatyes
top_widthfloatyesTop seat (mm)
Method
delete()
move(translation: VectorLike)
set_element(element: str)Applies a saved ClassRing element (ra.elements.list(“ClassRing”)) to this ring: its top, shank and stone replace the current ones, the ring size stays, and the ring and its stone regenerate in place (same id).
set_finger_diameter(finger_diameter: float)
set_gem(gem_shape=None, stone_type=None, cabochon_height=None, move_z=None)
set_shank(bottom_width=None, bottom_height=None, side_width=None, top_surface_height=None, angle=None)
set_top_side(top_width=None, top_height=None, depth=None, offset=None, stand_height=None)Mutations regenerate the ring and its stone in place (same ring Guid; the stone gets a new id) and call LicenseGate.RequireValid() first.

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