May 13, 2026

CAD Fight Club: picture this

Golden Testing a CAD Library

He turned 3D drawings into picture tests, and the comments had notes

TLDR: The developer of an open-source 3D design library found a clever way to test it by comparing generated images instead of hard-to-check 3D objects. In the comments, readers immediately debated whether image comparison is the best method, with veterans flexing old tools and others proposing stricter reality checks like measuring shape volume.

A Haskell developer behind the open-source CAD tool Waterfall-CAD has finally tackled a problem that had been nagging him for years: how do you test software that spits out 3D models? His answer was surprisingly relatable — stop treating the result like a mysterious math object and start treating it like a picture. By leaning on SVG image output and so-called “golden tests,” he’s basically comparing today’s drawing to yesterday’s drawing and sounding the alarm if they don’t match.

But the real action was in the replies, where the community instantly turned into a panel of backseat engineers. One commenter was politely supportive, but others showed up with the classic internet energy of “cool idea, now here’s how I’d do it better.” One person pushed an image-diff tool and argued that if the files are already vector drawings, comparing the raw SVG first would be smarter and cheaper than saving loads of image files. Another commenter rolled in with big veteran energy, basically saying, “we’ve had tools for this forever.” And then things got delightfully nerdy: someone suggested checking whether exported 3D shapes keep the same volume after being saved and loaded again — a very serious-sounding way of saying, “make sure your digital object still weighs what it should.”

There was even a wild side quest into whether large language models — the AI systems behind chatbots — could someday speed-run circuit and machine design. So yes, the post was about testing drawings, but the comments turned it into a mini-drama about the right way to prove a machine-made shape is real.

Key Points

  • Joe Warren says Waterfall-CAD, his Haskell programmable CAD library released in 2023, did not initially have meaningful tests.
  • He added SVG support to Waterfall-CAD in 2025 and converted README visuals from mesh-viewer screenshots to Haskell-generated vector diagrams.
  • The article argues that SVG output is more testable than 3D model output because it can use visual regression testing techniques.
  • Warren explains visual regression testing as a form of golden testing in which image snapshots are stored, compared, and updated when behavior is accepted.
  • He implemented the tests with the Haskell library tasty-golden and reused README SVG diagrams as both documentation assets and test fixtures.

Hottest takes

"compare those without rasterizing them first" — leeoniya
"BRL-CAD has had the pixdiff, bwdiff, and pixcmp tools for a very long time" — brlcad
"measure the volume of the solid" — mk_stjames
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.