mirror of https://github.com/CGAL/cgal
Solve bug with macro that skip repair_polygon_soup
This commit is contained in:
parent
fddc0aa400
commit
d48a003069
|
|
@ -105,7 +105,7 @@ int main(int argc, char** argv)
|
|||
|
||||
CGAL::Real_timer t;
|
||||
t.start();
|
||||
#if 1
|
||||
#if 0
|
||||
Track_visitor visitor;
|
||||
bool success=PMP::autorefine_triangle_soup(input_points, input_triangles, CGAL::parameters::apply_iterative_snap_rounding(true).erase_all_duplicates(true).concurrency_tag(CGAL::Parallel_if_available_tag()).snap_grid_size(grid_size).visitor(visitor));
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -287,10 +287,10 @@ bool polygon_soup_snap_rounding_impl(PointRange &points,
|
|||
}
|
||||
);
|
||||
} else
|
||||
#else
|
||||
#endif
|
||||
for (Point_3 &p : points)
|
||||
p = Point_3(to_double(p.x()), to_double(p.y()), to_double(p.z()));
|
||||
#endif
|
||||
|
||||
repair_polygon_soup(points, triangles, np);
|
||||
|
||||
// Get all intersecting triangles
|
||||
|
|
@ -372,14 +372,14 @@ bool polygon_soup_snap_rounding_impl(PointRange &points,
|
|||
}
|
||||
);
|
||||
} else
|
||||
#else
|
||||
#endif
|
||||
for (Point_3 &p : points)
|
||||
{
|
||||
Point_3 p_snap = snap_p(p);
|
||||
if (std::binary_search(snap_points.begin(), snap_points.end(), p_snap))
|
||||
p = p_snap;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#elif 1
|
||||
// Version where points in a voxel are rounded to the closest point
|
||||
|
|
@ -530,7 +530,6 @@ bool polygon_soup_snap_rounding(PointRange &soup_points,
|
|||
size_t id=0;
|
||||
for(typename PolygonRange::iterator it=soup_triangles.begin(); it!=soup_triangles.end(); ++it)
|
||||
indexes_soup_triangles.emplace_back((*it), id++);
|
||||
std::cout << "Test 0" << std::endl;
|
||||
|
||||
bool res=polygon_soup_snap_rounding_impl(soup_points, indexes_soup_triangles, np);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue