Scripting API
Sprue inner tree
from ArtisanPlugin.Scripting import ManufacturingApi as manufacturing
The inner tree feeds a ring from the inside: a vertical trunk stands under the band and short branches reach up from it to several contact points on the shank, so the metal enters through the hidden inner face and the visible surfaces stay clean. This is the ArtisanSprueInnerTree tool run headless — its two interactive picks become the basePoint and contactPoints arguments.
Usage
ids = manufacturing.SprueInnerTree(meshId, basePoint, contactPoints,
height = 0, topDiameter = 0,
bottomDiameter = 0,
branchContactDiameter = 0) # -> [ids]
| Parameter | Default | Meaning |
|---|---|---|
meshId | required | The closed ring mesh |
basePoint | required | Where the trunk starts — below/inside the ring |
contactPoints | required | Points on the mesh the branches reach; at least one |
height | 10 | Trunk height, mm |
topDiameter | 3 | Trunk diameter at the top, mm |
bottomDiameter | 5 | Trunk diameter at the base, mm |
branchContactDiameter | 0.8 | Branch diameter where it touches the ring, mm |
Every numeric parameter follows the house 0-keeps-default convention: 0 means “use the tool’s default, or my saved inner-tree defaults”. There is no -1 sentinel.
It returns an IReadOnlyList<Guid> — the ids of the sprue meshes added (trunk and branches). Each one goes to the last user layer, the same destination as the tool’s Accept. The ring mesh itself is only read, never modified.
It needs a valid licence and fails with “No active document.” when there is none. If meshId does not resolve to a mesh it raises “Object {id} is not a mesh.”; an empty contactPoints raises “At least one contact point on the mesh is required.”; and if the geometry cannot be built it raises “Sprue computation failed. Check that the contact points lie on the mesh and the base point is below/inside the ring.” and nothing is added. Wrap the call in a Transaction to get one-step undo.