Revision: 55245
http://sourceforge.net/p/brlcad/code/55245
Author: starseeker
Date: 2013-04-25 15:08:39 +0000 (Thu, 25 Apr 2013)
Log Message:
-----------
Don't make a zero lenght edge (i.e. the x and y points are identical) - avoids
a crash
Modified Paths:
--------------
brlcad/trunk/src/other/poly2tri/poly2tri/sweep/sweep_context.cc
Modified: brlcad/trunk/src/other/poly2tri/poly2tri/sweep/sweep_context.cc
===================================================================
--- brlcad/trunk/src/other/poly2tri/poly2tri/sweep/sweep_context.cc
2013-04-25 14:45:47 UTC (rev 55244)
+++ brlcad/trunk/src/other/poly2tri/poly2tri/sweep/sweep_context.cc
2013-04-25 15:08:39 UTC (rev 55245)
@@ -146,7 +146,8 @@
size_t num_points = polyline.size();
for (size_t i = 0; i < num_points; i++) {
size_t j = i < num_points - 1 ? i + 1 : 0;
- edge_list.push_back(new Edge(*polyline[i], *polyline[j]));
+ if (!(EQ((*polyline[i]).x, (*polyline[j]).x) && EQ((*polyline[i]).y,
(*polyline[j]).y)))
+ edge_list.push_back(new Edge(*polyline[i], *polyline[j]));
}
}
@@ -251,4 +252,4 @@
points_set_.clear();
}
-}
\ No newline at end of file
+}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits