Skip to content

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)
ParameterDefaultMeaning
meshIdThe closed ring mesh
point1, point2The two ends of the tag, on/near the mesh (the tool’s two picks)
textNone = saved defaultThe engraved reference
diameter0 = 1.5Pipe diameter (mm)
thickness0 = 1.5Tag thickness (mm)
fontSize0 = 2Engraving size (mm)
overlapping0 = 0.15How 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:

  • meshId is 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")