diff options
author | Marius Kintel <marius@kintel.net> | 2012-04-22 23:31:23 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2012-04-22 23:35:15 (GMT) |
commit | dda5195130c6f0628768ad2a441b91c6fe5955e5 (patch) | |
tree | b96565ce8a58574f82f19b294ae723cabd5129d3 /src/PolySetCGALEvaluator.cc | |
parent | 2c2731598aac00589be3f525687e0b3d272ed7eb (diff) |
Align tesselation of cylinders and rotate_extrude. Fixes #108
Diffstat (limited to 'src/PolySetCGALEvaluator.cc')
-rw-r--r-- | src/PolySetCGALEvaluator.cc | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/PolySetCGALEvaluator.cc b/src/PolySetCGALEvaluator.cc index 6ed1ab4..1cc6b16 100644 --- a/src/PolySetCGALEvaluator.cc +++ b/src/PolySetCGALEvaluator.cc @@ -454,15 +454,10 @@ PolySet *PolySetCGALEvaluator::rotateDxfData(const RotateExtrudeNode &node, DxfD } for (int j = 0; j < fragments; j++) { - double a = (j*2*M_PI) / fragments; + double a = (j*2*M_PI) / fragments - M_PI/2; // start on the X axis for (size_t k = 0; k < dxf.paths[i].indices.size(); k++) { - if (dxf.points[dxf.paths[i].indices[k]][0] == 0) { - points[j][k][0] = 0; - points[j][k][1] = 0; - } else { - points[j][k][0] = dxf.points[dxf.paths[i].indices[k]][0] * sin(a); - points[j][k][1] = dxf.points[dxf.paths[i].indices[k]][0] * cos(a); - } + points[j][k][0] = dxf.points[dxf.paths[i].indices[k]][0] * sin(a); + points[j][k][1] = dxf.points[dxf.paths[i].indices[k]][0] * cos(a); points[j][k][2] = dxf.points[dxf.paths[i].indices[k]][1]; } } |