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).
| Parameter | Type | |
|---|---|---|
layer_name | str | required |
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.
| Parameter | Type | |
|---|---|---|
positions | Sequence[float] | optional — None = the tool default |
widths | Sequence[float] | optional — None = the tool default |
heights | Sequence[float] | optional — None = the tool default |
width | float | optional — None = the tool default |
height | float | optional — None = the tool default |
section_type | str | optional — None = the tool default |
thickness | float | optional — None = the tool default |
comfort | float | optional — None = the tool default |
curve_type | str | optional — None = the tool default |
opening_length | float | optional — None = the tool default |
finger_diameter | float | optional — None = the tool default |
profile | str | optional — None = the tool default |
plane | Optional[PlaneLike] | optional — None = the tool default |
element | str | optional — 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.
| Parameter | Type | |
|---|---|---|
id | IdLike | required |
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.
| Property | Type | Settable | |
|---|---|---|---|
curve_type | str | yes | ”CLOSE”, “OPEN”, “BYPASS” or “SHAPE”. |
layer_name | str | ||
mother_gem_id | str | ||
object_type | str | ||
position | Point3d | ||
ring_diameter_mm | float | ||
ring_size_label | str | ||
ring_size_region | str | ||
section_count | int | ||
section_heights | List[float] | mm, same order | |
section_positions | List[float] | t of each section, sorted | |
section_widths | List[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).