Revision: 73866
          http://sourceforge.net/p/brlcad/code/73866
Author:   starseeker
Date:     2019-09-09 22:30:18 +0000 (Mon, 09 Sep 2019)
Log Message:
-----------
2x is too big of a differential.  However, we also need to cap the depth to 
which we're splitting - faces like NIST2 172 will split almost indefinitely if 
allowed.

Modified Paths:
--------------
    brlcad/trunk/src/libbrep/cdt_edge.cpp

Modified: brlcad/trunk/src/libbrep/cdt_edge.cpp
===================================================================
--- brlcad/trunk/src/libbrep/cdt_edge.cpp       2019-09-09 21:54:51 UTC (rev 
73865)
+++ brlcad/trunk/src/libbrep/cdt_edge.cpp       2019-09-09 22:30:18 UTC (rev 
73866)
@@ -329,8 +329,8 @@
     double cdist = cp2d1.DistanceTo(cp2d2);
     double tdist = tp2d1.DistanceTo(tp2d2);
 
-    // If tseg is significantly longer - it should be the one to split
-    if (cdist < 2*tdist) return true;
+    // If tseg is longer - it should be the one to split
+    if (cdist < tdist && !NEAR_EQUAL(cdist, tdist, ON_ZERO_TOLERANCE)) return 
true;
 
     // Mark this segment down as a segment to split
     if (context->cseg->eseg) {
@@ -1675,7 +1675,7 @@
        // that aren't our neighbor boxes.  For any that do, split and check 
again.  Keep refining until we
        // don't have any non-neighbor overlaps.
        int split_cnt = 0;
-       while (ws.size()) {
+       while (ws.size() && split_cnt < 10) {
            std::set<cdt_mesh::cpolyedge_t *> trims_to_split;
            std::set<cdt_mesh::bedge_seg_t *> edges_to_split;
            std::set<cdt_mesh::cpolyedge_t *> current_trims;

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

Reply via email to