Skip to content

.NET API

ProngApi

Headless versions of the prong commands that live outside the parametric settings: ArtisanDynamicProngs (loose prongs on a base geometry, manual or automatic between round gems), ArtisanCustomProngs (copy a custom prong shape onto every existing prong) and ArtisanProngAxis (prong axis lines around a gem).

from ArtisanPlugin.Scripting import ProngApi

See also the Python package, ra.prong.

Methods

Method
AllIds of every Artisan prong (ProngCustomObject) in the active document.
AutomaticProngsThe “Automatic” button of ArtisanDynamicProngs, headless: searches every triplet of neighbouring ROUND gems in gemIds (null = every visible round gem in the document, like the panel) and drops one prong in the gap between them, oriented by the gems’ planes — no base geometry needed.
CustomProngsThe ArtisanCustomProngs command, headless: copies objectIds (a custom prong modeled as a surface, polysurface, mesh or SubD; null = the current selection) onto every Artisan prong in prongIds (null = every prong in the document), mapping from the source’s base plane (bottom-centre of its bounding box on the active CPlane, or basePlane when given) to each prong’s base plane.
DynamicProngsThe ArtisanDynamicProngs panel, headless: drops one loose prong at each of points, seated on the closest point of baseIds (surfaces, polysurfaces or meshes; null = the current selection) and oriented by the face normal there.
ProngAxisThe ArtisanProngAxis panel, headless: for each gem in gemIds (null = the selected gems) draws the central axis line of every prong (curves only, no thickness) as one editable “ProngAxis” group per gem, ready for ArtisanEdit.

All

IReadOnlyList<Guid> ProngApi.All()

Ids of every Artisan prong (ProngCustomObject) in the active document.

Returns IReadOnlyList<Guid>.

AutomaticProngs

IReadOnlyList<Guid> ProngApi.AutomaticProngs(
    IEnumerable<Guid> gemIds = null,
    string mode = null,
    double diameter = 0,
    double diameterTop = 0,
    double diameterMid = 0,
    double diameterBottom = 0,
    double heightOverGirdle = 0,
    double heightUnderGirdle = 0,
    double extensionForManufacturing = 0,
    double minDiameter = 0,
    double gemInside = double.NaN)

The “Automatic” button of ArtisanDynamicProngs, headless: searches every triplet of neighbouring ROUND gems in gemIds (null = every visible round gem in the document, like the panel) and drops one prong in the gap between them, oriented by the gems’ planes — no base geometry needed. Candidates within 0.5 mm of an existing visible prong are skipped. Prong parameters as in DynamicProngs; in AUTOMATIC mode each prong takes the diameter that fits its gap (+ gemInside, never below minDiameter). Returns the ids of the new prongs.

ParameterTypeDefault
gemIdsIEnumerable<Guid>null
modestringnull
diameterdouble0
diameterTopdouble0
diameterMiddouble0
diameterBottomdouble0
heightOverGirdledouble0
heightUnderGirdledouble0
extensionForManufacturingdouble0
minDiameterdouble0
gemInsidedoubledouble.NaN

Returns IReadOnlyList<Guid>.

CustomProngs

IReadOnlyList<Guid> ProngApi.CustomProngs(
    IEnumerable<Guid> objectIds = null,
    IEnumerable<Guid> prongIds = null,
    string scale = null,
    double moveInZ = 0,
    bool deleteOriginals = false,
    Plane? basePlane = null)

The ArtisanCustomProngs command, headless: copies objectIds (a custom prong modeled as a surface, polysurface, mesh or SubD; null = the current selection) onto every Artisan prong in prongIds (null = every prong in the document), mapping from the source’s base plane (bottom-centre of its bounding box on the active CPlane, or basePlane when given) to each prong’s base plane. scale is the command’s option: NO (default, copy as-is), 1D (height only), 2D (width only, from the prong diameter) or 3D (uniform, from the prong diameter). moveInZ lifts each copy along its prong axis in mm; deleteOriginals removes the replaced Artisan prongs. Returns the ids of the copies.

ParameterTypeDefault
objectIdsIEnumerable<Guid>null
prongIdsIEnumerable<Guid>null
scalestringnull
moveInZdouble0
deleteOriginalsboolfalse
basePlanePlane?null

Returns IReadOnlyList<Guid>.

DynamicProngs

IReadOnlyList<Guid> ProngApi.DynamicProngs(
    IEnumerable<Guid> baseIds,
    IEnumerable<Point3d> points,
    string mode = null,
    double diameter = 0,
    double diameterTop = 0,
    double diameterMid = 0,
    double diameterBottom = 0,
    double heightOverGirdle = 0,
    double heightUnderGirdle = 0,
    double extensionForManufacturing = 0,
    double minDiameter = 0,
    double gemInside = double.NaN,
    bool flip = false,
    string symmetry = null)

The ArtisanDynamicProngs panel, headless: drops one loose prong at each of points, seated on the closest point of baseIds (surfaces, polysurfaces or meshes; null = the current selection) and oriented by the face normal there. Millimetres; 0 keeps the tool default (or the user’s saved prong defaults): BASIC mode with diameter 0.8, heightOverGirdle 0.6, heightUnderGirdle 1, extensionForManufacturing 0.8. mode BASIC (one diameter), ADVANCED (diameterTop/Mid/Bottom) or AUTOMATIC (minDiameter + gemInside); omitted = saved mode, or ADVANCED when a top/mid/bottom diameter is given. flip turns the prongs upside down; symmetry NONE (default), X, Y or XY mirrors each prong across the world YZ / ZX planes like the panel combo. Returns the ids of the new prongs (one group, metal layer).

ParameterTypeDefault
baseIdsIEnumerable<Guid>required
pointsIEnumerable<Point3d>required
modestringnull
diameterdouble0
diameterTopdouble0
diameterMiddouble0
diameterBottomdouble0
heightOverGirdledouble0
heightUnderGirdledouble0
extensionForManufacturingdouble0
minDiameterdouble0
gemInsidedoubledouble.NaN
flipboolfalse
symmetrystringnull

Returns IReadOnlyList<Guid>.

ProngAxis

IReadOnlyList<Guid> ProngApi.ProngAxis(
    IEnumerable<Guid> gemIds = null,
    int prongs = 0,
    bool? straight = null,
    double height = 0,
    double gemInside = double.NaN,
    double overGirdle = double.NaN,
    double bottomRailInside = double.NaN)

The ArtisanProngAxis panel, headless: for each gem in gemIds (null = the selected gems) draws the central axis line of every prong (curves only, no thickness) as one editable “ProngAxis” group per gem, ready for ArtisanEdit. 0 keeps the tool default (or the user’s saved defaults): prongs 4, height 4 mm, overGirdle 0.3, gemInside 0, bottomRailInside 0; straight true (false = the axis rises vertically then leans in). Returns the ids of the created curves.

ParameterTypeDefault
gemIdsIEnumerable<Guid>null
prongsint0
straightbool?null
heightdouble0
gemInsidedoubledouble.NaN
overGirdledoubledouble.NaN
bottomRailInsidedoubledouble.NaN

Returns IReadOnlyList<Guid>.