Skip to content

.NET API

RingToolsApi

Utilities that act on existing ring geometry: opening the finger hole at a ring size and estimating the size of a modelled ring.

from ArtisanPlugin.Scripting import RingToolsApi

See also the Python package, ra.ring_tools.

Methods

Method
CutByRingSizeCuts the finger hole through objects (the ArtisanCutByRingSize tool, headless): subtracts a cylinder of fingerDiameter running along world Y — rings are modelled at the origin by convention — from every brep / extrusion / SubD / mesh in ids.
EstimateRingSizeEstimates 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).

CutByRingSize

CutByRingSizeResult RingToolsApi.CutByRingSize(
    IEnumerable<Guid> ids,
    double fingerDiameter = 0)

Cuts the finger hole through objects (the ArtisanCutByRingSize tool, headless): subtracts a cylinder of fingerDiameter 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.

ParameterTypeDefault
idsIEnumerable<Guid>required
fingerDiameterdouble0

Returns CutByRingSizeResult.

EstimateRingSize

RingSizeEstimate RingToolsApi.EstimateRingSize(
    IEnumerable<Guid> ids = null,
    string region = null,
    bool addRingCurve = false)

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. addRingCurve 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).

ParameterTypeDefault
idsIEnumerable<Guid>null
regionstringnull
addRingCurveboolfalse

Returns RingSizeEstimate.