Skip to content

.NET API

AdvancedRingApi

Rings built from positioned sections along the finger curve.

from ArtisanPlugin.Scripting import AdvancedRingApi

See also the Python package, ra.advanced_ring.

Methods

Method
AllIAdvancedRing handles for every object of this kind in the active document (empty when there is no document).
ByLayerIAdvancedRing handles on the layer with the given full path (empty when the layer does not exist).
CountNumber of objects of this kind in the active document.
CreateBuilds an advanced ring body (the ArtisanAdvancedRing tool, headless): a ring curve swept through profile sections placed along it.
FindThe handle for id, or null when the id does not belong to an object of this kind.
SelectedAdvanced rings currently selected in the active doc.

All

IReadOnlyList<IAdvancedRing> AdvancedRingApi.All()

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

Returns IReadOnlyList<IAdvancedRing>.

ByLayer

IReadOnlyList<IAdvancedRing> AdvancedRingApi.ByLayer(string layerName)

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

ParameterTypeDefault
layerNamestringrequired

Returns IReadOnlyList<IAdvancedRing>.

Count

int AdvancedRingApi.Count()

Number of objects of this kind in the active document.

Returns int.

Create

IAdvancedRing AdvancedRingApi.Create(
    IEnumerable<double> positions = null,
    IEnumerable<double> widths = null,
    IEnumerable<double> heights = null,
    double width = 0,
    double height = 0,
    string sectionType = null,
    double thickness = 0,
    double comfort = 0,
    string curveType = null,
    double openingLength = 0,
    double fingerDiameter = 0,
    string profile = null,
    Plane? plane = null,
    string element = null)

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). sectionType COMFORT (default) | SOLID | THICKNESS with thickness (0.7) and comfort (0.3). curveType CLOSE (default) | OPEN | BYPASS | SHAPE, openingLength mm for the open types (5 / 14 / 14). fingerDiameter 0 = document ring size. profile = RING_PROFILE asset name. plane omitted = world XY. element = name of a saved AdvancedRing element (ElementsApi.List(“AdvancedRing”)) to start from; explicit arguments override it (its finger size is always replaced). Returns an IAdvancedRing handle to the new ring body.

ParameterTypeDefault
positionsIEnumerable<double>null
widthsIEnumerable<double>null
heightsIEnumerable<double>null
widthdouble0
heightdouble0
sectionTypestringnull
thicknessdouble0
comfortdouble0
curveTypestringnull
openingLengthdouble0
fingerDiameterdouble0
profilestringnull
planePlane?null
elementstringnull

Returns IAdvancedRing.

Find

IAdvancedRing AdvancedRingApi.Find(Guid id)

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

ParameterTypeDefault
idGuidrequired

Returns IAdvancedRing.

Selected

IReadOnlyList<IAdvancedRing> AdvancedRingApi.Selected()

Advanced rings currently selected in the active doc.

Returns IReadOnlyList<IAdvancedRing>.

Handles and sections

What the methods above hand back. A handle’s setters regenerate the object; wrap changes in a Transaction so they land as one undo step.

IAdvancedRing

Handle — extends IParametricObject.

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.

PropertyType
CurveTypestringget”CLOSE”, “OPEN”, “BYPASS” or “SHAPE”.
IdGuidget(from IParametricObject)
LayerNamestringget(from IParametricObject)
MotherGemIdGuidget(from IParametricObject)
ObjectTypestringget(from IParametricObject)
PositionPoint3dget(from IParametricObject)
RingDiameterMmdoubleget
RingSizeLabelstringget
RingSizeRegionstringget
SectionCountintget
SectionHeightsIReadOnlyList<double>getmm, same order
SectionPositionsIReadOnlyList<double>gett of each section, sorted
SectionWidthsIReadOnlyList<double>getmm, same order
Method
void Delete()(from IParametricObject)
void Move(Vector3d translation)(from IParametricObject)
void SetAllSections(double width, double height)
void SetCurveType(string curveType)CLOSE | OPEN | BYPASS | SHAPE
void SetElement(string element)Applies a saved AdvancedRing element (ElementsApi.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).
void SetFingerDiameter(double fingerDiameter)
void SetHeight(double height)every section
void SetOpeningLength(double openingLength)of the current open curve type
void SetSection(int index, double width = 0, double height = 0)Mutations regenerate the ring in place (same Guid) and call LicenseGate.RequireValid() first. Millimetres; 0 keeps the value.
void SetSectionPosition(int index, double t)
void SetSectionRotation(int index, double degrees)
void SetWidth(double width)every section