diff options
author | Don Bright <hugh.m.bright@gmail.com> | 2011-09-12 22:40:51 (GMT) |
---|---|---|
committer | Don Bright <hugh.m.bright@gmail.com> | 2011-09-12 22:40:51 (GMT) |
commit | f5f06c8e976ca45aebea42fe8c04bf7404357ac8 (patch) | |
tree | 8d0cdd2698e7806c1b12cc49e743b561e1082961 /src/dxftess.cc | |
parent | 007c40848db9efd704694f2e7596cabed80da50f (diff) | |
parent | 5ac9162f1c67fd21737ead11d7ebc638bf4eef5f (diff) |
merge
Merge remote branch 'upstream/visitor' into visitortests
Conflicts:
src/export.cc
src/openscad.cc
src/polyset.cc
src/transform.cc
tests/CMakeLists.txt
tests/FindGLEW.cmake
tests/csgtermtest.cc
Diffstat (limited to 'src/dxftess.cc')
-rw-r--r-- | src/dxftess.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/dxftess.cc b/src/dxftess.cc index 73d235f..d2cb172 100644 --- a/src/dxftess.cc +++ b/src/dxftess.cc @@ -37,17 +37,17 @@ without tesselating. Vertex ordering of the resulting polygons will follow the paths' is_inner flag. */ -void dxf_border_to_ps(PolySet *ps, DxfData *dxf) +void dxf_border_to_ps(PolySet *ps, const DxfData &dxf) { - for (int i = 0; i < dxf->paths.count(); i++) { - const DxfData::Path &pt = dxf->paths[i]; - if (!pt.is_closed) + for (size_t i = 0; i < dxf.paths.size(); i++) { + const DxfData::Path &path = dxf.paths[i]; + if (!path.is_closed) continue; ps->borders.push_back(PolySet::Polygon()); - for (int j = 1; j < pt.points.count(); j++) { - double x = (*pt.points[j])[0], y = (*pt.points[j])[1], z = 0.0; + for (size_t j = 1; j < path.indices.size(); j++) { + double x = dxf.points[path.indices[j]][0], y = dxf.points[path.indices[j]][1], z = 0.0; ps->grid.align(x, y, z); - if (pt.is_inner) { + if (path.is_inner) { ps->borders.back().push_back(Vector3d(x, y, z)); } else { ps->borders.back().insert(ps->borders.back().begin(), Vector3d(x, y, z)); |