Check printability
print_checkChecks a finished STL or run folder for printability: mesh integrity, bed fit, overhangs, supports, wall thickness, and plate contact, reporting pass/fail/unknown against limits.
Instructions
Check a finished part for printing. Geometry only: no solve, no run. It gives the same report as topopt printcheck.
path: an STL file or a run folder (it has result/final.stl); relative paths start at the work folder. With no path, the last run is used. It works on any STL (final.stl, a nominal.stl, an edited.stl): no metrics.json and no YAML are needed. About 2 to 5 s for an 85,000-triangle part.
yaml_path: a problem YAML whose print block gives the settings and limits. A run folder already has the print block of its run. print_settings: a dict with keys of the print block, for example {"min_wall_mm": 1.2, "bed_mm": [250, 210]}; it wins over the YAML.
resolution_mm: the size of the smallest member that the mesh holds: the voxel size (a run folder gives it), or 0 for exact CAD. The default is the voxel size of the run, else the median mesh edge.
strict: opt in to the gate. Without it the tool only reports.
gate: with strict, state is fail only when a check that has a limit fails (unknown never sets it); exit_code is then 4 and override names the way on. No run stops on it.
On an input that cannot be read: {"ok": false, "error": ...}. A failed check is data, not an error.
A print pass is not a structural pass. A finished run already has this report as result/print_check.json (run_result shows its counts): call this tool again for other limits or another direction.
Each check has id, state (pass, fail or unknown), reason, value, limit (value, key and source: run.json, yaml, option, profile:, assumed or none) and method. Checks: mesh_closed (the STL as a float32 file: open and non-manifold edges, winding, volume), bodies, closed_voids (count and volume), bed_fit, overhang, support_volume, plate_contact, wall_thickness. The limits are print-block keys: bed_mm, max_bodies, min_wall_mm, min_wall_area_pct, max_closed_void_mm3, max_overhang_area_mm2, max_support_volume_mm3, min_plate_contact_mm2, and the V2 keys build_direction, printer_type and self_supporting_angle_deg. printer_model (a printer of find_printer) gives the bed, the type (source profile:) and the build height: bed_fit then also compares the part height with it. A check with no limit is unknown and its value is a fact. The thickness is an estimate: by the rule of this check it passes only if the limit is at least 3 x the resolution; a thin wall that is measured fails at any resolution. When it is unknown only for that rule, value.pass_needs gives the resolution that a pass needs (resolution_mm_at_most, and voxel_count_factor for a run folder: an estimate of the voxels of that grid against this one).
Also: summary, settings (with from: where each source came from), input (path, sha256), timing_s, definitions.
partial, coverage: partial is true when a check that is asked for stopped with an error (its record has state unknown and error; the other checks go on) or has a limit and could not decide. coverage has ran, failed (name, reason) and not_run (name, reason, asked); a check that is not asked for (the support volume of a powder-bed printer) does not make it partial.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | ||
| strict | No | ||
| yaml_path | No | ||
| resolution_mm | No | ||
| print_settings | No |