Scripting API
Verify
from ArtisanPlugin.Scripting import ManufacturingApi as manufacturing
Before a mesh goes to the printer or the caster it must be valid, watertight and manifold. QuickCheck is the ArtisanQuickCheck tool run headless: it checks each mesh and, like the tool, recolours it green when printable and red when not, so the verdict is visible in the viewport as well as in the returned data.
Usage
checks = manufacturing.QuickCheck(objectIds = None)
| Parameter | Default | Meaning |
|---|---|---|
objectIds | None = current selection | Meshes to check. Non-mesh objects are skipped silently |
Returns one MeshCheckResult per checked mesh:
| Field | Type | Meaning |
|---|---|---|
Id | Guid | The checked mesh |
IsValid | bool | The mesh data is valid |
IsClosed | bool | Watertight — no naked edges |
IsManifold | bool | Manifold and consistently oriented |
Printable | bool | IsValid and IsClosed and IsManifold — the same green/red verdict the tool paints |
The geometry itself is never touched, but the call is not a pure read: it changes each checked mesh’s object colour (green or red) and commits that attribute change to the document. Wrap it in a Transaction if you want the recolouring to undo as one step.
The only validation that throws is the missing document: "No active document." An empty selection simply returns an empty list.
checks = manufacturing.QuickCheck()
for c in checks:
if not c.Printable:
print(f"{c.Id}: valid={c.IsValid} closed={c.IsClosed} manifold={c.IsManifold}")