gkjohnson / three-bvh-csg

A flexible, memory compact, fast and dynamic CSG implementation on top of three-mesh-bvh
MIT License
552 stars 45 forks source link

Fix degenerate triangle case, missing clipped triangle #147

Closed gkjohnson closed 10 months ago

gkjohnson commented 10 months ago

Fix #141

gkjohnson commented 10 months ago

BEFORE

Library Comparison mean median min max
three-bvh-csg 13.76777 ms 13.78158 ms 13.39808 ms 18.78879 ms
three-bvh-csg w/ rebuild 32.77991 ms 32.71469 ms 32.30529 ms 42.74158 ms
three-csg-ts 3118.69832 ms 3098.22442 ms 3026.40708 ms 3214.22738 ms
three-csg 3007.65078 ms 3016.18871 ms 2960.91217 ms 3046.82037 ms
three-csg w/ rebuild 3046.76870 ms 3056.38333 ms 3008.65250 ms 3078.32054 ms
General mean median min max
Subtract w/ Groups 254.55759 ms 254.49746 ms 250.77400 ms 260.10300 ms
Subtract w/o Groups 255.10558 ms 254.69192 ms 251.95062 ms 259.35942 ms
Subtract w/ Inverted 301.66779 ms 300.99546 ms 297.33337 ms 314.66371 ms

AFTER

Library Comparison mean median min max
three-bvh-csg 13.89413 ms 13.90492 ms 13.45533 ms 16.22871 ms
three-bvh-csg w/ rebuild 33.26281 ms 33.21200 ms 32.41833 ms 45.32883 ms
three-csg-ts 3009.44425 ms 2970.79883 ms 2933.24971 ms 3132.42738 ms
three-csg 2878.24920 ms 2883.01408 ms 2851.13079 ms 2900.13075 ms
three-csg w/ rebuild 2997.21419 ms 2998.76142 ms 2959.75871 ms 3021.64025 ms
General mean median min max
Subtract w/ Groups 255.24208 ms 254.91871 ms 251.58904 ms 260.20108 ms
Subtract w/o Groups 255.60386 ms 255.28233 ms 252.83575 ms 260.64350 ms
Subtract w/ Inverted 304.08558 ms 303.27406 ms 298.40013 ms 312.61508 ms