Hacker News

Show HN: Robotics needs better CAD, so I wrote a B-rep kernel and 3,487 tests

34 points by atomarch ago | 9 comments
Hey HN, I’m Tony. I’m a co-founder of Springcraft, where we have been doing a lot of CAD modeling for robot parts. Our team kept running into limitations with existing kernels, and so I decided to write a new B-rep kernel and a new comprehensive, kernel-agnostic B-rep conformance test suite. Both are available today under MIT licenses.

The kernel, springrep, is written in safe Rust with no dependencies. It covers a broad range of our mechanical CAD needs, including advanced fillets, sweeps, lofts, shells, offsets, STEP and exact measurements and queries. Claude Code made it feasible to write this, but it took a lot of time and care to get it right.

The test suite, brep-conformance, has 3,487 cases covering the modeling operations common across kernels: booleans, fillets, chamfers, shells, offsets, sweeps, lofts, STEP, and queries with expected answers coming from closed forms and exact geometry. It caught hundreds of bugs, edge cases, and hot spots in springrep that our own tests had missed, and now springrep passes all of it. We’ve also run it on a few popular open-source kernels and anyone can run it on theirs. This is the first version, so there are surely mistakes in the test and adapters. Corrections, pull requests, and new kernels are welcome.

kernel: https://github.com/springcraft-ai/springrep conformance suite: https://springcraft-ai.github.io/brep-conformance/

ffdsc |next [-]

> so I wrote

No you didn't, you asked an LLM to write it.

v9v |next |previous [-]

Anything that makes this better suited to designing robot parts than other CAD software?

atomarch |root |parent [-]

[dead]

dofm |next |previous [-]

Now this is a great application of an LLM.

I'm sure you still have loads to solve and a lot of quite human decisions to make (because bRep is one thing; contemporary CAD 'default solutions' strike me as likely to be full of human compromises), but I can see that having an LLM on the team to help with the maths must help.

Best of luck with it :-)

atomarch |root |parent [-]

Thanks! This has been an exciting project so far, and lots more to come.

waterTanuki |next |previous [-]

Why this instead of extending/supporting solidcore? (also in Rust)

https://github.com/tangency-labs/solidcore

Your performance table is treating brep-conformance like it's some kind of backend server that processes x requests per n seconds, but that's now how geometry kernels work. How does this enable faster/smoother workflow than solidcore? Can you demonstrate that with a side-by-side video? No one, not even people who work with CAD all day can understand any benefits this has from a table.

rurban |root |parent |next [-]

See their benchmark why. Solidcore fails much more tests and is dramatically slower.

https://springcraft-ai.github.io/brep-conformance/

simplesocieties |root |parent [-]

Most of springrep's lead comes from the scoring rules. Any operation that doesn't match springrep's API counts as a failure for the other kernels, even if the other kernels can combine operations to output the same result.

Also "no dependencies" isn't really a brag when Solidcore's only two dependencies are serde and thiserror. I'm sure the author had good intentions but this does seem like another case of marketing hype getting ahead of the real engineering.

atomarch |root |parent [-]

Good callout, we don’t want to unfairly punish a kernel that supports an operation as two individual steps. However, it’s an explicit goal [1] that the adapter code isn’t acting as a compatibility layer that a user of the library wouldn’t get. As the suite evolves, we may add alternate operation types, in the case of chamfers being done differently for example.

[1] https://springcraft-ai.github.io/brep-conformance/docs/#the-...

atomarch |root |parent |previous [-]

Differing philosophies - Solidcore is a rust port of C++ SMLib. In comparison, springrep is a bottom up Rust implementation of a new kernel.

When it comes to timing, we run extensive build steps and assembly checks on our designed parts for which speed is a real bottleneck.

reactor3d |previous [-]

[dead]