STL mesh check: open edges, non-manifold edges, inverted normals

$0.005 USDC per call · Developer and security · POST /api/v1/mesh-check · Id mesh-check

Checks a binary or ASCII STL mesh of up to 4000 triangles for a 3D-printing or CAD agent: open (boundary) edges, edges shared by more than two triangles, inconsistent winding, degenerate and duplicate triangles, normals that disagree with the vertex order, and an inside-out (negative signed volume) closed mesh, with triangle indices as witnesses. Input is base64 of the STL file (up to 200084 bytes). It does not measure wall thickness, repair the mesh, check self-intersections, or know the model units; a pass means closed, manifold, consistently wound and outward-facing, not printable.

What you get

A slicer failing on a non-manifold edge after a ten-minute export costs a retry loop; this names the edge and triangle first.

Call it

Send the JSON body below to https://agents.writerslogic.com/api/v1/mesh-check. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.

curl -i -X POST https://agents.writerslogic.com/api/v1/mesh-check \
  -H 'content-type: application/json' \
  -d '{"data":"c29saWQgdGV0cmEKZmFjZXQgbm9ybWFsIDAgMCAtMQogb3V0ZXIgbG9vcAogIHZlcnRleCAwIDAgMAogIHZlcnRleCAwIDEgMAogIHZlcnRleCAxIDAgMAogZW5kbG9vcAplbmRmYWNldApmYWNldCBub3JtYWwgLTEgMCAwCiBvdXRlciBsb29wCiAgdmVydGV4IDAgMCAwCiAgdmVydGV4IDAgMCAxCiAgdmVydGV4IDAgMSAwCiBlbmRsb29wCmVuZGZhY2V0CmZhY2V0IG5vcm1hbCAwIC0xIDAKIG91dGVyIGxvb3AKICB2ZXJ0ZXggMCAwIDAKICB2ZXJ0ZXggMSAwIDAKICB2ZXJ0ZXggMCAwIDEKIGVuZGxvb3AKZW5kZmFjZXQKZmFjZXQgbm9ybWFsIDAuNTc3MzUwIDAuNTc3MzUwIDAuNTc3MzUwCiBvdXRlciBsb29wCiAgdmVydGV4IDEgMCAwCiAgdmVydGV4IDAgMSAwCiAgdmVydGV4IDAgMCAxCiBlbmRsb29wCmVuZGZhY2V0CmVuZHNvbGlkIHRldHJhCg=="}'

Input

FieldTypeRequiredDescription
datastring; length 0..266780yesPadded base64 of the STL file, binary or ASCII.
weldTolerancenumber; 0..1noVertices closer than this (grid-snapped, model units) are treated as the same vertex. Default 0: exact float32 equality.

Example request body

{
  "data": "c29saWQgdGV0cmEKZmFjZXQgbm9ybWFsIDAgMCAtMQogb3V0ZXIgbG9vcAogIHZlcnRleCAwIDAgMAogIHZlcnRleCAwIDEgMAogIHZlcnRleCAxIDAgMAogZW5kbG9vcAplbmRmYWNldApmYWNldCBub3JtYWwgLTEgMCAwCiBvdXRlciBsb29wCiAgdmVydGV4IDAgMCAwCiAgdmVydGV4IDAgMCAxCiAgdmVydGV4IDAgMSAwCiBlbmRsb29wCmVuZGZhY2V0CmZhY2V0IG5vcm1hbCAwIC0xIDAKIG91dGVyIGxvb3AKICB2ZXJ0ZXggMCAwIDAKICB2ZXJ0ZXggMSAwIDAKICB2ZXJ0ZXggMCAwIDEKIGVuZGxvb3AKZW5kZmFjZXQKZmFjZXQgbm9ybWFsIDAuNTc3MzUwIDAuNTc3MzUwIDAuNTc3MzUwCiBvdXRlciBsb29wCiAgdmVydGV4IDEgMCAwCiAgdmVydGV4IDAgMSAwCiAgdmVydGV4IDAgMCAxCiBlbmRsb29wCmVuZGZhY2V0CmVuZHNvbGlkIHRldHJhCg=="
}

Result

The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.

FieldTypeRequiredDescription
statusstring; one of "pass", "fail", "unknown", "unsupported"nopass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass.
formatstring; one of "binary", "ascii"no
trianglesintegerno
verticesintegernoDistinct vertices after welding.
edgesintegerno
componentsintegernoVertex-connected shells.
boundaryEdgesintegernoEdges used by exactly one triangle (holes).
nonManifoldEdgesintegernoEdges used by more than two triangles.
inconsistentEdgesintegernoEdges whose two triangles traverse it in the same direction.
degenerateTrianglesintegerno
duplicateTrianglesintegerno
flippedNormalsintegernoTriangles whose stored normal opposes the right-hand-rule normal.
zeroNormalsintegerno
closedbooleanno
eulerCharacteristicone ofnoV - E + F.
signedVolumeone ofnoOnly for a closed mesh; negative means inside-out.
surfaceAreaone ofno
bboxone ofno
notesarray<string>no
witnessesarray<object>no
versionsobjectnoEvery semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile).
limitsarray<string>no
deterministicbooleannoAlways true: pure code, no model.

Pay and connect

Available through: x402 (USDC on Base), MCP. MCP clients reach it through the infra-preflight-kit package.

Machine-readable