diff options
author | Marius Kintel <marius@kintel.net> | 2011-09-03 20:44:41 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2011-09-03 20:44:41 (GMT) |
commit | 6096f2734a9a2f2c789f2e948c021def6b41f85b (patch) | |
tree | ed87e8732c45c19413de488ccd16fafe049111b2 /src/dxftess.cc | |
parent | 946605234c7cf35cadfe9bde5531ebe6655f1b42 (diff) |
De-Qt-ification continues, almost done with DxfData
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)); |