validate
Verifies OpenSCAD models for syntax errors, geometry issues, predicates, includes, and printability, returning findings and fixes.
Instructions
Check a model. "valid" is false whenever an ERROR was reported, whatever OpenSCAD's exit code was. mode: "syntax": parse and evaluate without geometry (fast): errors, warnings, echo_output, hints, unresolved_includes with locations. "geometry": export the mesh and report findings: not watertight, non-manifold, several solids, cavities, empty; with the numbers. "predicates": predicates=["W > 10", ...] evaluated in the model's own scope; each must be true. sweep={variable, values:[..]} re-runs them per value and reports the first failure and the crossing. "includes": every include/use/import/surface reference with its resolved path, plus the BOSL2 lint: a module from a use<>d file placed by attach()/position() is silently put at CENTER; findings carry a fix plan, applied to the file when autofix=true and safe. "printability": rules from reference(topic=dfm) over measure(mode=printability) facts in orientation=; profile= {overhang_deg, nozzle_mm, max_unsupported_reach_mm, min_wall_mm} overrides thresholds. Findings carry magnitude and location.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | syntax | |
| sweep | No | ||
| autofix | No | ||
| profile | No | ||
| scad_file | No | ||
| variables | No | ||
| predicates | No | ||
| orientation | No | ||
| scad_content | No | ||
| include_paths | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||