.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 | |
|---|---|
All | Ids of every Artisan prong (ProngCustomObject) in the active document. |
AutomaticProngs | 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. |
CustomProngs | 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. |
DynamicProngs | 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. |
ProngAxis | 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. |
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.
| Parameter | Type | Default |
|---|---|---|
gemIds | IEnumerable<Guid> | null |
mode | string | null |
diameter | double | 0 |
diameterTop | double | 0 |
diameterMid | double | 0 |
diameterBottom | double | 0 |
heightOverGirdle | double | 0 |
heightUnderGirdle | double | 0 |
extensionForManufacturing | double | 0 |
minDiameter | double | 0 |
gemInside | double | double.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.
| Parameter | Type | Default |
|---|---|---|
objectIds | IEnumerable<Guid> | null |
prongIds | IEnumerable<Guid> | null |
scale | string | null |
moveInZ | double | 0 |
deleteOriginals | bool | false |
basePlane | Plane? | 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).
| Parameter | Type | Default |
|---|---|---|
baseIds | IEnumerable<Guid> | required |
points | IEnumerable<Point3d> | required |
mode | string | null |
diameter | double | 0 |
diameterTop | double | 0 |
diameterMid | double | 0 |
diameterBottom | double | 0 |
heightOverGirdle | double | 0 |
heightUnderGirdle | double | 0 |
extensionForManufacturing | double | 0 |
minDiameter | double | 0 |
gemInside | double | double.NaN |
flip | bool | false |
symmetry | string | null |
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.
| Parameter | Type | Default |
|---|---|---|
gemIds | IEnumerable<Guid> | null |
prongs | int | 0 |
straight | bool? | null |
height | double | 0 |
gemInside | double | double.NaN |
overGirdle | double | double.NaN |
bottomRailInside | double | double.NaN |
Returns IReadOnlyList<Guid>.