mirror of https://github.com/CGAL/cgal
When reading a file with 2D points, read the x and y, and ignore the rest of the line. This implies 1 point per line.
This commit is contained in:
parent
0955b5de75
commit
1ae5df0172
|
|
@ -330,6 +330,8 @@ MainWindow::open(QString fileName)
|
||||||
K::Point_2 p;
|
K::Point_2 p;
|
||||||
std::vector<K::Point_2> points;
|
std::vector<K::Point_2> points;
|
||||||
while(ifs >> p) {
|
while(ifs >> p) {
|
||||||
|
// ignore whatever comes after x and y
|
||||||
|
ifs.ignore((std::numeric_limits<std::streamsize>::max)(), '\n');
|
||||||
points.push_back(p);
|
points.push_back(p);
|
||||||
}
|
}
|
||||||
dt.insert(points.begin(), points.end());
|
dt.insert(points.begin(), points.end());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue