Revision: 64378
          http://sourceforge.net/p/brlcad/code/64378
Author:   n_reed
Date:     2015-03-12 19:39:45 +0000 (Thu, 12 Mar 2015)
Log Message:
-----------
Should be using the intersection tolerance when looking for faces to intersect, 
since the bounding boxes could be tight to (planar) surfaces.

Modified Paths:
--------------
    brlcad/branches/brep-debug/src/libbrep/boolean.cpp

Modified: brlcad/branches/brep-debug/src/libbrep/boolean.cpp
===================================================================
--- brlcad/branches/brep-debug/src/libbrep/boolean.cpp  2015-03-12 18:49:05 UTC 
(rev 64377)
+++ brlcad/branches/brep-debug/src/libbrep/boolean.cpp  2015-03-12 19:39:45 UTC 
(rev 64378)
@@ -3424,7 +3424,7 @@
        std::set<int> *unused = i < face_count1 ? &unused1 : &unused2;
        std::set<int> *intact = i < face_count1 ? &finalform1 : &finalform2;
        int curr_index = i < face_count1 ? i : i - face_count1;
-       if (face.BoundingBox().MinimumDistanceTo(brep->BoundingBox()) > 
ON_ZERO_TOLERANCE) {
+       if (face.BoundingBox().MinimumDistanceTo(brep->BoundingBox()) > 
INTERSECTION_TOL) {
            switch (operation) {
            case BOOLEAN_UNION:
                intact->insert(curr_index);
@@ -3462,8 +3462,8 @@
                if (unused2.find(j) == unused2.end() &&  finalform2.find(j) == 
finalform2.end()) {
                    // If the two faces don't interact according to their 
bounding boxes,
                    // they won't be a source of events - otherwise, they must 
be checked.
-                   fastf_t disjoint = 
brep1->m_F[i].BoundingBox().MinimumDistanceTo(brep2->m_F[j].BoundingBox());
-                   if (!(disjoint > ON_ZERO_TOLERANCE)) {
+                   fastf_t face_dist = 
brep1->m_F[i].BoundingBox().MinimumDistanceTo(brep2->m_F[j].BoundingBox());
+                   if (face_dist <= INTERSECTION_TOL) {
                        intersection_candidates.insert(std::pair<int, int>(i, 
j));
                    }
                }

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to