mirror of https://github.com/CGAL/cgal
Solve a bug when visitor is called before the creation of the associated triangle
This commit is contained in:
parent
0197d1bfd5
commit
b01eb047df
|
|
@ -1576,13 +1576,13 @@ bool autorefine_triangle_soup(PointRange& soup_points,
|
|||
soup_triangles_out.reserve(offset + new_triangles.size());
|
||||
for (const std::pair<std::array<EK::Point_3,3>, std::size_t>& t_and_id : new_triangles)
|
||||
{
|
||||
soup_triangles_out.push_back({ get_point_id(t_and_id.first[0]),
|
||||
get_point_id(t_and_id.first[1]),
|
||||
get_point_id(t_and_id.first[2]) });
|
||||
if constexpr(std::is_same_v<Visitor, Wrap_snap_visitor>)
|
||||
visitor.new_subdivision(soup_triangles_out[soup_triangles_out.size()-1], soup_triangles[tri_inter_ids_inverse[t_and_id.second]]);
|
||||
else
|
||||
visitor.new_subtriangle(soup_triangles_out.size(), tri_inter_ids_inverse[t_and_id.second]);
|
||||
soup_triangles_out.push_back({ get_point_id(t_and_id.first[0]),
|
||||
get_point_id(t_and_id.first[1]),
|
||||
get_point_id(t_and_id.first[2]) });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue