Ignore malformed polygons

brodykenrick-master
Marius Kintel 2013-10-19 17:15:25 -04:00
parent 257d1f7115
commit d2a729bdfa
2 changed files with 6 additions and 2 deletions

View File

@ -513,8 +513,12 @@ sphere_next_r2:
if (this->paths.toVector().size() == 0)
{
if (dd.points.size() <= 2) { // Ignore malformed polygons
delete p;
return NULL;
}
dd.paths.push_back(DxfData::Path());
for (size_t i=0; i<this->points.toVector().size(); i++) {
for (size_t i=0; i<dd.points.size(); i++) {
assert(i < dd.points.size()); // FIXME: Not needed, but this used to be an 'if'
dd.paths.back().indices.push_back(i);
}

View File

@ -1 +1 @@
(((((((sphere12 + cube25) + sphere26) + cylinder27) + polyhedron28) + square29) + circle30) + polygon31)
((((((sphere12 + cube25) + sphere26) + cylinder27) + polyhedron28) + square29) + circle30)