star-geometry-3d

Clean and decorate 3D geometries
git clone git://git.meso-star.fr/star-geometry-3d.git
Log | Files | Refs | README | LICENSE

commit b6f0b79e35795c6d0106d062d28178ea22b56910
parent 68fa2585929f305816ffe3d003cef60d5047614d
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date:   Wed, 13 Sep 2023 09:17:01 +0200

Fix obj dump: was dumping all the geometry regardless of flags

Diffstat:
Msrc/sg3d_geometry.c | 18++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/src/sg3d_geometry.c b/src/sg3d_geometry.c @@ -874,12 +874,18 @@ sg3d_geometry_dump_as_obj fprintf(stream, "v %g %g %g\n", SPLIT3(vertices[i].coord)); /* Dump triangles by groups */ - dump_partition(geom, stream, - "Valid_triangles", SG3D_OBJ_DUMP_VALID_PRIMITIVE); - dump_partition(geom, stream, - "Merge_conflicts", SG3D_OBJ_DUMP_MERGE_CONFLICTS); - dump_partition(geom, stream, - "Property_conflicts", SG3D_OBJ_DUMP_PROPERTY_CONFLICTS); + if(flags & SG3D_OBJ_DUMP_VALID_PRIMITIVE) { + dump_partition(geom, stream, + "Valid_triangles", SG3D_OBJ_DUMP_VALID_PRIMITIVE); + } + if(flags & SG3D_OBJ_DUMP_MERGE_CONFLICTS) { + dump_partition(geom, stream, + "Merge_conflicts", SG3D_OBJ_DUMP_MERGE_CONFLICTS); + } + if(flags & SG3D_OBJ_DUMP_PROPERTY_CONFLICTS) { + dump_partition(geom, stream, + "Property_conflicts", SG3D_OBJ_DUMP_PROPERTY_CONFLICTS); + } exit: return res;