Show HN: NestForge, true-shape nesting in the browser, every layout re-verified (nestforge.dauerschicht.com)

1 points by Cayan ↗ HN
I come at this from the software side, not the workshop side. I kept seeing laser and plasma people complain about nesting tools that crash on real-world DXF exports or quietly produce layout they didn't fully trust, so I built NestForge: a true-shape nesting studio that runs entirely client-side (Rust compiled to WASM), with one design decision I'd like feedback on

The core idea: the optimizer is never trusted. After nesting, a second, independently implemented validator re-checks the layout from scratch (no-overlap, sheet containment, kerf and spacing distances, grain constraints) using robust geometric predicates, Shewchuk-style orientation tests, with borderline distance comparisons re-derived in double-double arithmetic from the og inputs. The two components share no geometry code, so the validator can't inherit the optimizer's bugs. A layout that fails validation is discarded and never shown. Failures produce witnesses: the exact pair of parts and the measured vs. required gap.

Other technical bits:

- Arcs are first-class. DXF bulges survive import, kerf/spacing offsetting and export. Flattening only happens inside the optimizer (sagitta-bounded and conservative: the flattened silhouette strictly contains the true shape, so proven clearances can't be violated by approximation error). Exports emit real ARC entities; round-trip accuracy is verified to 1e-6 mm in tests.

- The importer is built for dirty files. It's fuzz-tested against a corpus of deliberately broken DXF/SVG, and real-world defects (open contours, self-intersections, truncated files, missing units) produce named errors with the measured gap and a fix hint instead of a crash.

- Deterministic by construction: seeded ChaCha8, ordered containers, iteration budgets instead of wall-clock cutoffs. Same input plus same seed gives a bit-identical result.

- NFP-based placement (Minkowski sums on convex decompositions), GA on top of bottom-left seeding, multi-sheet, per-part rotation sets, mirroring, grain direction. Placement inside holes of other parts works too: a plug nested into a ring's bore passes the same validator as any placement.

- Everything runs locally: no server, no account, files never leave the machine. Installable PWA, works offline.

You can try it without signing up: https://nestforge.dauerschicht.com/app/ (free tier is 10 parts on 1 sheet with no time limit; the paid version is a one-time 39 EUR plus VAT depending on your country, no subscription).

Honest limitations: free rotation is discretized; exact-fit gaps need a hair of slack (regularized booleans); and utilization quality varies by input. Benchmark table with seeds: https://nestforge.dauerschicht.com/#benchmarks

I'd especially appreciate adversarial DXF files that break the importer. :)

1 comment

[ 5.0 ms ] story [ 10.7 ms ] thread