star-geometry-2d

Cleaning and decorating 2D geometries
git clone git://git.meso-star.fr/star-geometry-2d.git
Log | Files | Refs | README | LICENSE

commit dcbc0a734497ec587862f3411c68bcba775b86d9
parent 1bb3fd019c66014f305b386cc9f2d3e355cd7b88
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date:   Thu, 12 Mar 2020 11:58:05 +0100

Stop dumping errors in vtk when error free

Diffstat:
Msrc/sg2_geometry.c | 2+-
Msrc/sg2d_geometry.c | 24++++++++++++++----------
2 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/src/sg2_geometry.c b/src/sg2_geometry.c @@ -538,7 +538,7 @@ sg2d_geometry_validate_properties } } } - /* Call vaildation */ + /* Call validation */ ERR(validate(i, props, ctx, &segd->properties_conflict)); if(segd->properties_conflict) geom->properties_conflict_count++; diff --git a/src/sg2d_geometry.c b/src/sg2d_geometry.c @@ -906,17 +906,21 @@ sg2d_geometry_dump_as_vtk fprintf(stream, "LOOKUP_TABLE default\n"); FOR_EACH(i, 0, ssz) fprintf(stream, PRTF_SEG"\n", segments[i].user_id); - /* Dump merge conflict status */ - fprintf(stream, "SCALARS Merge_conflict int\n"); - fprintf(stream, "LOOKUP_TABLE default\n"); - FOR_EACH(i, 0, ssz) - fprintf(stream, PRTF_SEG"\n", descriptions[i].merge_conflict); + /* Dump merge conflict status (if any) */ + if(geom->merge_conflict_count) { + fprintf(stream, "SCALARS Merge_conflict int\n"); + fprintf(stream, "LOOKUP_TABLE default\n"); + FOR_EACH(i, 0, ssz) + fprintf(stream, PRTF_SEG"\n", descriptions[i].merge_conflict); + } - /* Dump property conflict status */ - fprintf(stream, "SCALARS Property_conflict int\n"); - fprintf(stream, "LOOKUP_TABLE default\n"); - FOR_EACH(i, 0, ssz) - fprintf(stream, PRTF_SEG"\n", descriptions[i].properties_conflict); + /* Dump property conflict status (if any) */ + if(geom->properties_conflict_count) { + fprintf(stream, "SCALARS Property_conflict int\n"); + fprintf(stream, "LOOKUP_TABLE default\n"); + FOR_EACH(i, 0, ssz) + fprintf(stream, PRTF_SEG"\n", descriptions[i].properties_conflict); + } /* Dump rank of the sg2d_geometry_add that created the segment */ fprintf(stream, "SCALARS Created_at_sg2d_geometry_add int\n");