Python package
ra.prong
Prongs: dynamic (between stones), automatic, custom and axis-aligned.
import rhinoartisan as ra
Wraps ArtisanPlugin.Scripting.ProngApi.
Functions
| Function | |
|---|---|
all() | Ids of every Artisan prong (ProngCustomObject) in the active document. |
automatic_prongs() | The “Automatic” button of ArtisanDynamicProngs, headless: searches every triplet of neighbouring ROUND gems in gem_ids (None = 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. |
custom_prongs() | The ArtisanCustomProngs command, headless: copies object_ids (a custom prong modeled as a surface, polysurface, mesh or SubD; None = the current selection) onto every Artisan prong in prong_ids (None = every prong in the document), mapping from the source’s base plane (bottom-centre of its bounding box on the active CPlane, or base_plane when given) to each prong’s base plane. |
dynamic_prongs() | The ArtisanDynamicProngs panel, headless: drops one loose prong at each of points, seated on the closest point of base_ids (surfaces, polysurfaces or meshes; None = the current selection) and oriented by the face normal there. |
prong_axis() | The ArtisanProngAxis panel, headless: for each gem in gem_ids (None = 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. |
ra.prong.all()
ra.prong.all() -> List[str]
Ids of every Artisan prong (ProngCustomObject) in the active document.
ra.prong.automatic_prongs()
ra.prong.automatic_prongs(gem_ids=None, mode=None, diameter=None, diameter_top=None, diameter_mid=None, diameter_bottom=None, height_over_girdle=None, height_under_girdle=None, extension_for_manufacturing=None, min_diameter=None, gem_inside=None) -> List[str]
The “Automatic” button of ArtisanDynamicProngs, headless: searches every triplet of neighbouring ROUND gems in gem_ids (None = 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 (+ gem_inside, never below min_diameter). Returns the ids of the new prongs.
| Parameter | Type | |
|---|---|---|
gem_ids | Sequence[IdLike] | optional — None = the tool default |
mode | str | optional — None = the tool default |
diameter | float | optional — None = the tool default |
diameter_top | float | optional — None = the tool default |
diameter_mid | float | optional — None = the tool default |
diameter_bottom | float | optional — None = the tool default |
height_over_girdle | float | optional — None = the tool default |
height_under_girdle | float | optional — None = the tool default |
extension_for_manufacturing | float | optional — None = the tool default |
min_diameter | float | optional — None = the tool default |
gem_inside | float | optional — None = the tool default |
ra.prong.custom_prongs()
ra.prong.custom_prongs(object_ids=None, prong_ids=None, scale=None, move_in_z=None, delete_originals=None, base_plane=None) -> List[str]
The ArtisanCustomProngs command, headless: copies object_ids (a custom prong modeled as a surface, polysurface, mesh or SubD; None = the current selection) onto every Artisan prong in prong_ids (None = every prong in the document), mapping from the source’s base plane (bottom-centre of its bounding box on the active CPlane, or base_plane 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; delete_originals removes the replaced Artisan prongs. Returns the ids of the copies.
| Parameter | Type | |
|---|---|---|
object_ids | Sequence[IdLike] | optional — None = the tool default |
prong_ids | Sequence[IdLike] | optional — None = the tool default |
scale | str | optional — None = the tool default |
move_in_z | float | optional — None = the tool default |
delete_originals | bool | optional — None = the tool default |
base_plane | Optional[PlaneLike] | optional — None = the tool default |
ra.prong.dynamic_prongs()
ra.prong.dynamic_prongs(base_ids: Sequence[IdLike], points: Sequence[PointLike], mode=None, diameter=None, diameter_top=None, diameter_mid=None, diameter_bottom=None, height_over_girdle=None, height_under_girdle=None, extension_for_manufacturing=None, min_diameter=None, gem_inside=None, flip=None, symmetry=None) -> List[str]
The ArtisanDynamicProngs panel, headless: drops one loose prong at each of points, seated on the closest point of base_ids (surfaces, polysurfaces or meshes; None = the current selection) and oriented by the face normal there. Millimetres; omitting keeps the tool default (or the user’s saved prong defaults): BASIC mode with diameter 0.8, height_over_girdle 0.6, height_under_girdle 1, extension_for_manufacturing 0.8. mode BASIC (one diameter), ADVANCED (diameter_top/Mid/Bottom) or AUTOMATIC (min_diameter + gem_inside); 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 | |
|---|---|---|
base_ids | Sequence[IdLike] | required |
points | Sequence[PointLike] | required |
mode | str | optional — None = the tool default |
diameter | float | optional — None = the tool default |
diameter_top | float | optional — None = the tool default |
diameter_mid | float | optional — None = the tool default |
diameter_bottom | float | optional — None = the tool default |
height_over_girdle | float | optional — None = the tool default |
height_under_girdle | float | optional — None = the tool default |
extension_for_manufacturing | float | optional — None = the tool default |
min_diameter | float | optional — None = the tool default |
gem_inside | float | optional — None = the tool default |
flip | bool | optional — None = the tool default |
symmetry | str | optional — None = the tool default |
ra.prong.prong_axis()
ra.prong.prong_axis(gem_ids=None, prongs=None, straight=None, height=None, gem_inside=None, over_girdle=None, bottom_rail_inside=None) -> List[str]
The ArtisanProngAxis panel, headless: for each gem in gem_ids (None = 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. omitting keeps the tool default (or the user’s saved defaults): prongs 4, height 4 mm, over_girdle 0.3, gem_inside 0, bottom_rail_inside 0; straight True (False = the axis rises vertically then leans in). Returns the ids of the created curves.
| Parameter | Type | |
|---|---|---|
gem_ids | Sequence[IdLike] | optional — None = the tool default |
prongs | int | optional — None = the tool default |
straight | Optional[bool] | optional — None = the tool default |
height | float | optional — None = the tool default |
gem_inside | float | optional — None = the tool default |
over_girdle | float | optional — None = the tool default |
bottom_rail_inside | float | optional — None = the tool default |