Revision: 74689
          http://sourceforge.net/p/brlcad/code/74689
Author:   starseeker
Date:     2020-01-14 21:09:33 +0000 (Tue, 14 Jan 2020)
Log Message:
-----------
Don't attempt an update if we have no associated edges.

Modified Paths:
--------------
    brlcad/trunk/src/libbrep/cdt/overt.cpp

Modified: brlcad/trunk/src/libbrep/cdt/overt.cpp
===================================================================
--- brlcad/trunk/src/libbrep/cdt/overt.cpp      2020-01-14 20:55:55 UTC (rev 
74688)
+++ brlcad/trunk/src/libbrep/cdt/overt.cpp      2020-01-14 21:09:33 UTC (rev 
74689)
@@ -50,6 +50,16 @@
 
 void
 overt_t::update() {
+
+    // Get pnt's associated edges.
+    std::set<edge_t> edges = omesh->fmesh->v2edges[p_id];
+
+    // If we don't have any edge information, this method of
+    // updating the vertex isn't viable - leave it as is.
+    if (!edges.size()) {
+       return;
+    }
+
     double fMin[3], fMax[3];
     if (init) {
        // Previously updated - remove old instance from tree
@@ -62,9 +72,6 @@
        omesh->vtree.Remove(fMin, fMax, p_id);
     }
 
-    // Get pnt's associated edges.
-    std::set<edge_t> edges = omesh->fmesh->v2edges[p_id];
-
     // find the shortest edge associated with pnt
     std::set<edge_t>::iterator e_it;
     double elen = DBL_MAX;

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



_______________________________________________
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to