Skip to content

Python package

ra.advanced_ring

Rings built from positioned sections along the finger curve.

import rhinoartisan as ra

Wraps ArtisanPlugin.Scripting.AdvancedRingApi.

Functions

Function
all()AdvancedRing handles for every object of this kind in the active document (empty when there is no document).
by_layer()AdvancedRing 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 an advanced ring body (the ArtisanAdvancedRing tool, headless): a ring curve swept through profile sections placed along it.
find()The handle for id, or None when the id does not belong to an object of this kind.
selected()Advanced rings currently selected in the active doc.

ra.advanced_ring.all()

ra.advanced_ring.all() -> List[AdvancedRing]

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

ra.advanced_ring.by_layer()

ra.advanced_ring.by_layer(layer_name: str) -> List[AdvancedRing]

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

ParameterType
layer_namestrrequired

ra.advanced_ring.count()

ra.advanced_ring.count() -> int

Number of objects of this kind in the active document.

ra.advanced_ring.create()

ra.advanced_ring.create(positions=None, widths=None, heights=None, width=None, height=None, section_type=None, thickness=None, comfort=None, curve_type=None, opening_length=None, finger_diameter=None, profile=None, plane=None, element=None) -> AdvancedRing

Builds an advanced ring body (the ArtisanAdvancedRing tool, headless): a ring curve swept through profile sections placed along it. Each section sits at a normalized position t in 0..1 along the curve (0 = bottom of the finger, 0.5 = top) and has its own width/height. positions omitted = the user’s saved default sections, or two identical sections at t 0 and 0.5 (open curves: 0 and 1). widths / heights are per-section lists parallel to positions; width / height apply one value to every section (0 = section default 2.25 x 1.5 mm). section_type COMFORT (default) | SOLID | THICKNESS with thickness (0.7) and comfort (0.3). curve_type CLOSE (default) | OPEN | BYPASS | SHAPE, opening_length mm for the open types (5 / 14 / 14). finger_diameter 0 = document ring size. profile = RING_PROFILE asset name. plane omitted = world XY. Returns an AdvancedRing handle to the new ring body. element = name of a saved element (ra.elements.list) to start from; explicit arguments override it.

ParameterType
positionsSequence[float]optional — None = the tool default
widthsSequence[float]optional — None = the tool default
heightsSequence[float]optional — None = the tool default
widthfloatoptional — None = the tool default
heightfloatoptional — None = the tool default
section_typestroptional — None = the tool default
thicknessfloatoptional — None = the tool default
comfortfloatoptional — None = the tool default
curve_typestroptional — None = the tool default
opening_lengthfloatoptional — None = the tool default
finger_diameterfloatoptional — None = the tool default
profilestroptional — None = the tool default
planeOptional[PlaneLike]optional — None = the tool default
elementstroptional — None = the tool default

ra.advanced_ring.find()

ra.advanced_ring.find(id: IdLike) -> AdvancedRing

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

ParameterType
idIdLikerequired

ra.advanced_ring.selected()

ra.advanced_ring.selected() -> List[AdvancedRing]

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

AdvancedRing (handle)

Advanced ring body (the ArtisanAdvancedRing tool): a ring curve (closed / open / bypass / shape) swept through N profile sections, each placed at a normalized position t along the curve (0 = bottom of the finger, 0.5 = top). No single MotherGem.

PropertyTypeSettable
curve_typestryes”CLOSE”, “OPEN”, “BYPASS” or “SHAPE”.
layer_namestr
mother_gem_idstr
object_typestr
positionPoint3d
ring_diameter_mmfloat
ring_size_labelstr
ring_size_regionstr
section_countint
section_heightsList[float]mm, same order
section_positionsList[float]t of each section, sorted
section_widthsList[float]mm, same order
Method
delete()
move(translation: VectorLike)
set_all_sections(width: float, height: float)
set_element(element: str)Applies a saved AdvancedRing element (ra.elements.list(“AdvancedRing”)) to this ring: its sections, curve and options replace the current ones, the ring size stays, and the ring regenerates in place (same id).
set_finger_diameter(finger_diameter: float)
set_height(height: float)every section
set_opening_length(opening_length: float)of the current open curve type
set_section(index: int, width=None, height=None)Mutations regenerate the ring in place (same Guid) and call LicenseGate.RequireValid() first.
set_section_position(index: int, t: float)
set_section_rotation(index: int, degrees: float)
set_width(width: float)every section

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