summaryrefslogtreecommitdiff
path: root/src/PolySetCGALEvaluator.cc
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2013-12-09 04:12:13 (GMT)
committerMarius Kintel <marius@kintel.net>2013-12-09 04:12:13 (GMT)
commit462d4d447885594629fefb8a658f9f1d079bcc44 (patch)
tree6690951e4f814b87a1a372a913b75ceda1f6cc1a /src/PolySetCGALEvaluator.cc
parent435e0c021c5018ee5de69d3218c3e31c8ab75be5 (diff)
parent33c34b6f7c43d19bbfa3bf91e7b577bcc062e5bd (diff)
Merge branch 'master' into travis
Diffstat (limited to 'src/PolySetCGALEvaluator.cc')
-rw-r--r--src/PolySetCGALEvaluator.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/PolySetCGALEvaluator.cc b/src/PolySetCGALEvaluator.cc
index bc9206f..599fd7f 100644
--- a/src/PolySetCGALEvaluator.cc
+++ b/src/PolySetCGALEvaluator.cc
@@ -457,7 +457,14 @@ PolySet *PolySetCGALEvaluator::rotateDxfData(const RotateExtrudeNode &node, DxfD
{
double max_x = 0;
for (size_t j = 0; j < dxf.paths[i].indices.size(); j++) {
- max_x = fmax(max_x, dxf.points[dxf.paths[i].indices[j]][0]);
+ double point_x = dxf.points[dxf.paths[i].indices[j]][0];
+ if (point_x < 0) {
+ PRINT("ERROR: all points for rotate_extrude() must have non-negative X coordinates");
+ PRINTB("[Point %d on path %d has X coordinate %f]", j % i % point_x);
+ delete ps;
+ return NULL;
+ }
+ max_x = fmax(max_x, point_x);
}
int fragments = get_fragments_from_r(max_x, node.fn, node.fs, node.fa);
contact: Jan Huwald // Impressum