mirror of https://github.com/CGAL/cgal
use previous vertex as hint
This commit is contained in:
parent
de16b71eba
commit
48d8f54796
|
|
@ -235,6 +235,7 @@ private:
|
||||||
Weight w,
|
Weight w,
|
||||||
int dim,
|
int dim,
|
||||||
const Index& index,
|
const Index& index,
|
||||||
|
Vertex_handle prev,
|
||||||
ErasedVeOutIt out);
|
ErasedVeOutIt out);
|
||||||
|
|
||||||
/// Inserts balls between the points identified by the handles `vp` and `vq`
|
/// Inserts balls between the points identified by the handles `vp` and `vq`
|
||||||
|
|
@ -550,7 +551,7 @@ Protect_edges_sizing_field<C3T3, MD, Sf, Df>::
|
||||||
operator()(const bool refine)
|
operator()(const bool refine)
|
||||||
{
|
{
|
||||||
// This class is only meant to be used with non-periodic triangulations
|
// This class is only meant to be used with non-periodic triangulations
|
||||||
CGAL_assertion(!(std::is_same<typename Tr::Periodic_tag, CGAL::Tag_true>::value));
|
CGAL_assertion(!(std::is_same_v<typename Tr::Periodic_tag, CGAL::Tag_true>));
|
||||||
|
|
||||||
#ifdef CGAL_MESH_3_VERBOSE
|
#ifdef CGAL_MESH_3_VERBOSE
|
||||||
std::cerr << "Inserting protection balls..." << std::endl
|
std::cerr << "Inserting protection balls..." << std::endl
|
||||||
|
|
@ -664,7 +665,7 @@ insert_corners()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Insert corner with ball (dim is zero because p is a corner)
|
// Insert corner with ball (dim is zero because p is a corner)
|
||||||
Vertex_handle v = smart_insert_point(p, w, 0, p_index,
|
Vertex_handle v = smart_insert_point(p, w, 0, p_index, Vertex_handle(),
|
||||||
CGAL::Emptyset_iterator()).first;
|
CGAL::Emptyset_iterator()).first;
|
||||||
CGAL_assertion(v != Vertex_handle());
|
CGAL_assertion(v != Vertex_handle());
|
||||||
|
|
||||||
|
|
@ -765,7 +766,7 @@ template <typename ErasedVeOutIt>
|
||||||
std::pair<typename Protect_edges_sizing_field<C3T3, MD, Sf, Df>::Vertex_handle,
|
std::pair<typename Protect_edges_sizing_field<C3T3, MD, Sf, Df>::Vertex_handle,
|
||||||
ErasedVeOutIt>
|
ErasedVeOutIt>
|
||||||
Protect_edges_sizing_field<C3T3, MD, Sf, Df>::
|
Protect_edges_sizing_field<C3T3, MD, Sf, Df>::
|
||||||
smart_insert_point(const Bare_point& p, Weight w, int dim, const Index& index,
|
smart_insert_point(const Bare_point& p, Weight w, int dim, const Index& index, Vertex_handle prev,
|
||||||
ErasedVeOutIt out)
|
ErasedVeOutIt out)
|
||||||
{
|
{
|
||||||
#if CGAL_MESH_3_PROTECTION_DEBUG & 1
|
#if CGAL_MESH_3_PROTECTION_DEBUG & 1
|
||||||
|
|
@ -796,7 +797,7 @@ smart_insert_point(const Bare_point& p, Weight w, int dim, const Index& index,
|
||||||
// Check that new point will not be inside a power sphere
|
// Check that new point will not be inside a power sphere
|
||||||
typename Tr::Locate_type lt;
|
typename Tr::Locate_type lt;
|
||||||
int li, lj;
|
int li, lj;
|
||||||
Cell_handle ch = tr.locate(wp0, lt, li, lj);
|
Cell_handle ch = tr.locate(wp0, lt, li, lj, prev);
|
||||||
|
|
||||||
Vertex_handle nearest_vh = tr.nearest_power_vertex(p, ch);
|
Vertex_handle nearest_vh = tr.nearest_power_vertex(p, ch);
|
||||||
FT sq_d = sq_distance(p, cp(tr.point(nearest_vh)));
|
FT sq_d = sq_distance(p, cp(tr.point(nearest_vh)));
|
||||||
|
|
@ -1063,6 +1064,7 @@ insert_balls_on_edges()
|
||||||
CGAL::square(p_size),
|
CGAL::square(p_size),
|
||||||
1 /*dim*/,
|
1 /*dim*/,
|
||||||
p_index,
|
p_index,
|
||||||
|
Vertex_handle(),
|
||||||
CGAL::Emptyset_iterator()).first;
|
CGAL::Emptyset_iterator()).first;
|
||||||
}
|
}
|
||||||
// No 'else' because in that case 'is_vertex(..)' already filled
|
// No 'else' because in that case 'is_vertex(..)' already filled
|
||||||
|
|
@ -1252,6 +1254,7 @@ insert_balls(const Vertex_handle& vp,
|
||||||
point_weight,
|
point_weight,
|
||||||
dim,
|
dim,
|
||||||
index,
|
index,
|
||||||
|
Vertex_handle(),
|
||||||
out);
|
out);
|
||||||
if(forced_stop()) return out;
|
if(forced_stop()) return out;
|
||||||
const Vertex_handle new_vertex = pair.first;
|
const Vertex_handle new_vertex = pair.first;
|
||||||
|
|
@ -1342,7 +1345,7 @@ insert_balls(const Vertex_handle& vp,
|
||||||
|
|
||||||
// Insert point into c3t3
|
// Insert point into c3t3
|
||||||
std::pair<Vertex_handle, ErasedVeOutIt> pair =
|
std::pair<Vertex_handle, ErasedVeOutIt> pair =
|
||||||
smart_insert_point(new_point, point_weight, dim, index, out);
|
smart_insert_point(new_point, point_weight, dim, index, prev, out);
|
||||||
Vertex_handle new_vertex = pair.first;
|
Vertex_handle new_vertex = pair.first;
|
||||||
out = pair.second;
|
out = pair.second;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue