static uint32_t noutfacets;
static uint32_t noutfacets_counted;
+static long badfacets;
static void outfacet(int rev, const OutVertex *a,
const OutVertex *b, const OutVertex *c) {
triangle_normal(normal, a->p, b->p, c->p);
double multby= 1/magnD(normal);
- if (multby > 1e6)
+ if (multby > 1e6) {
+ badfacets++;
return;
+ }
noutfacets++;
if (!~noutfacets_counted) return;
assert(noutfacets == noutfacets_counted);
if (fflush(stdout)) diee("fflush stdout");
+
+ if (badfacets) {
+ fprintf(stderr,"%ld degenerate facets!\n",badfacets);
+ exit(4);
+ }
}