Revision: 73846
http://sourceforge.net/p/brlcad/code/73846
Author: starseeker
Date: 2019-09-06 15:46:18 +0000 (Fri, 06 Sep 2019)
Log Message:
-----------
Better yet, only go smaller if we really need to.
Modified Paths:
--------------
brlcad/trunk/src/libbrep/cdt.cpp
Modified: brlcad/trunk/src/libbrep/cdt.cpp
===================================================================
--- brlcad/trunk/src/libbrep/cdt.cpp 2019-09-06 15:44:12 UTC (rev 73845)
+++ brlcad/trunk/src/libbrep/cdt.cpp 2019-09-06 15:46:18 UTC (rev 73846)
@@ -31,6 +31,7 @@
#include "bg/chull.h"
#include "./cdt.h"
+#define BREP_PLANAR_TOL 0.05
#define MAX_TRIANGULATION_ATTEMPTS 5
#if 0
@@ -308,6 +309,7 @@
ON_Plane fplane;
const ON_Surface *s = trim->SurfaceOf();
double ptol = s->BoundingBox().Diagonal().Length()*0.001;
+ ptol = (ptol < BREP_PLANAR_TOL) ? ptol : BREP_PLANAR_TOL;
if (s->IsPlanar(&fplane, ptol)) {
norm = fplane.Normal();
} else {
@@ -1075,6 +1077,7 @@
ON_Plane fplane;
const ON_Surface *s = trim->SurfaceOf();
double ptol = s->BoundingBox().Diagonal().Length()*0.001;
+ ptol = (ptol < BREP_PLANAR_TOL) ? ptol : BREP_PLANAR_TOL;
if (s->IsPlanar(&fplane, ptol)) {
trim_norm = fplane.Normal();
if (trim->Face()->m_bRev) {
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits