Scripting API
Identify
from ArtisanPlugin.Scripting import ManufacturingApi as manufacturing
When several designs go into one casting flask, each ring needs its reference engraved so the pieces can be told apart after burnout. AddIdentifier is the ArtisanIdentifier tool run headless: a pipe between two points on the mesh carrying the engraved reference text. The two points play the role of the tool’s two interactive picks — both should lie on or near the mesh.
Usage
tagged = manufacturing.AddIdentifier(meshId, point1, point2, text = "REF-001",
diameter = 0, thickness = 0,
fontSize = 0, overlapping = 0)
| Parameter | Default | Meaning |
|---|---|---|
meshId | — | The closed ring mesh |
point1, point2 | — | The two ends of the tag, on/near the mesh (the tool’s two picks) |
text | None = saved default | The engraved reference |
diameter | 0 = 1.5 | Pipe diameter (mm) |
thickness | 0 = 1.5 | Tag thickness (mm) |
fontSize | 0 = 2 | Engraving size (mm) |
overlapping | 0 = 0.15 | How far the tag sinks into the ring (mm) |
0 keeps the tool default or your saved Identifier defaults, whichever apply — the call starts from the saved defaults when they exist, then applies your explicit overrides. An empty or whitespace text likewise keeps the saved text.
The result
Returns the Guid of a new mesh — the ring with the tag merged in — added to the last user layer. The original mesh is left untouched in the document, same as the tool: delete it yourself if you only want the tagged copy. The call adds an object, so it belongs inside a Transaction.
Validation that throws:
meshIdis not a mesh:"Object {meshId} is not a mesh."- The computation fails:
"Identifier computation failed. Check that both points lie on the mesh."
from ArtisanPlugin.Scripting import ManufacturingApi as manufacturing, Transaction
from Rhino.Geometry import Point3d
with Transaction.Begin("Identifier"):
tagged = manufacturing.AddIdentifier(ringId,
Point3d(-3, 0, -8), Point3d(3, 0, -8),
text = "REF-001")