Python package
ra.ring_tools
Utilities on ring geometry: cut by ring size, estimate size, rail helpers.
import rhinoartisan as ra
Wraps ArtisanPlugin.Scripting.RingToolsApi.
Functions
| Function | |
|---|---|
cut_by_ring_size() | Cuts the finger hole through objects (the ArtisanCutByRingSize tool, headless): subtracts a cylinder of finger_diameter running along world Y — rings are modelled at the origin by convention — from every brep / extrusion / SubD / mesh in ids. |
estimate_ring_size() | Estimates the finger size of a modelled ring (the ArtisanEstimateRingSize tool): sections the geometry with the XY and YZ planes through the origin, measures the inner gap along X (diameter) and along Z (inner height), scores how ring-like the result is (0..100) and looks up the closest catalog size in region (omitted = the document’s region, USA without one). |
ra.ring_tools.cut_by_ring_size()
ra.ring_tools.cut_by_ring_size(ids: Sequence[IdLike], finger_diameter=None) -> CutByRingSizeResult
Cuts the finger hole through objects (the ArtisanCutByRingSize tool, headless): subtracts a cylinder of finger_diameter running along world Y — rings are modelled at the origin by convention — from every brep / extrusion / SubD / mesh in ids. 0 = the document’s ring size. The pieces replace the originals with the same attributes; objects the boolean cannot cut are left as they are and reported in FailedIds. Returns the count of cut / failed objects and the new ids.
| Parameter | Type | |
|---|---|---|
ids | Sequence[IdLike] | required |
finger_diameter | float | optional — None = the tool default |
ra.ring_tools.estimate_ring_size()
ra.ring_tools.estimate_ring_size(ids=None, region=None, add_ring_curve=None) -> RingSizeEstimate
Estimates the finger size of a modelled ring (the ArtisanEstimateRingSize tool): sections the geometry with the XY and YZ planes through the origin, measures the inner gap along X (diameter) and along Z (inner height), scores how ring-like the result is (0..100) and looks up the closest catalog size in region (omitted = the document’s region, USA without one). ids omitted = every visible, unlocked brep / surface / mesh. Read-only. add_ring_curve True also inserts an Artisan ring curve at the estimated size (requires a licence, like the command). Returns a RingSizeEstimate; IsRing False when nothing ring-like was found (Probability, Size empty).
| Parameter | Type | |
|---|---|---|
ids | Sequence[IdLike] | optional — None = the tool default |
region | str | optional — None = the tool default |
add_ring_curve | bool | optional — None = the tool default |