star-enclosures-3d

Extract enclosures from 3D geometry
git clone git://git.meso-star.fr/star-enclosures-3d.git
Log | Files | Refs | README | LICENSE

commit a93fb9a08f6cead6b4c23e9358a72cb0194dc7f7
parent 5552792081ab85dcd3d2d2f0d25b6bd591a15381
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date:   Tue, 16 Jul 2024 15:02:40 +0200

Improve a test

Improvements from the new test bad_grouping3

Diffstat:
Msrc/test_senc3d_bad_grouping2.c | 5++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/test_senc3d_bad_grouping2.c b/src/test_senc3d_bad_grouping2.c @@ -187,10 +187,9 @@ main(int argc, char** argv) OK(senc3d_enclosure_get_header(enclosure, &header)); OK(senc3d_enclosure_ref_put(enclosure)); for(i = 0; i < sizeof(volumes)/sizeof(*volumes); i++) { - if(volumes[i] == header.volume) { - found = 1; - if(volume_used[i]) return 1; + if(!volume_used[i] && fabs(volumes[i] - header.volume) < DBL_EPSILON) { volume_used[i] = 1; + found = 1; break; } }