manifold icon indicating copy to clipboard operation
manifold copied to clipboard

Add MinkowskiSum and MinkowskiDifference

Open zalo opened this issue 6 months ago • 23 comments

This is the minimal code to get the naive minkowksi sum working ~~with basic affordances for multithreading~~. This is essentially the other PR, but without the in-progress experimentation or the controversial voro++ dependency.

The benefits of the Naive Technique are that:

  1. The output mesh topology looks much nicer without any need for surface simplification.
  2. It doesn't need any additional dependencies.

The drawbacks to the Naive Technique are that:

  1. Sometimes, it's a bit slower than the general technique (especially for Non-Convex/Non-Convex).
  2. Sometimes, it appears to run out of memory when performing the final union (especially during Non-Convex/Non-Convex).
  3. Sometimes, the topology gets messed up (especially during Non-Convex/Non-Convex).

~~There are two basic versions of the function, one with significant threading and the other without.
I expect we'll consolidate to one or the other as their respective pros/cons make themselves apparent; the speed appears to be pretty comparable on my windows machine (but perhaps that's not true on Linux?).~~ I've decided the speed difference is too negligible (1-2% at best), and it's now a source of failing unit tests. So no more threading!

Tests and Bindings have been added 😎

zalo avatar Dec 20 '23 02:12 zalo