star-cad

Geometric operators for computer-aided design
git clone git://git.meso-star.fr/star-cad.git
Log | Files | Refs | README | LICENSE

commit b1acfaf1c565f054ba6ea23413d36a9bf5d2caa2
parent 2e6c01569061f188801a27db913afeddff8b8004
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date:   Tue, 16 Apr 2024 11:03:45 +0200

Add a warning message

Warn if a call to common boundaries returns an empty geometry

Diffstat:
Msrc/scad_geometry.c | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/scad_geometry.c b/src/scad_geometry.c @@ -1343,7 +1343,12 @@ scad_geometries_common_boundaries ERR(geometry_create(name, &geom)); geom->gmsh_dimTags_n = tagoutn; - if (tagoutn == 0) { + if(tagoutn == 0) { + if(name) { + log_message(dev, "Common boundary '%s' is empty.\n", name); + } else { + log_message(dev, "Unamed common boundary %p is empty.\n", (void*)geom); + } geom->gmsh_dimTags = NULL; } else { geom->gmsh_dimTags = MEM_ALLOC(allocator, tagoutn * sizeof(*tagout));