Skip to content

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)
ParameterDefaultMeaning
objectIdsNone = current selectionMeshes to check. Non-mesh objects are skipped silently

Returns one MeshCheckResult per checked mesh:

FieldTypeMeaning
IdGuidThe checked mesh
IsValidboolThe mesh data is valid
IsClosedboolWatertight — no naked edges
IsManifoldboolManifold and consistently oriented
PrintableboolIsValid 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}")