mirror of https://github.com/CGAL/cgal
Merge pull request #3214 from sloriot/PMP-autorefine_identical_points
Make sure identical vertices have identical coordinates in autorefinement
This commit is contained in:
commit
c63a7c77e5
|
|
@ -167,7 +167,7 @@ private:
|
||||||
Exact_kernel ek;
|
Exact_kernel ek;
|
||||||
Exact_kernel::Intersect_3 exact_intersection;
|
Exact_kernel::Intersect_3 exact_intersection;
|
||||||
std::vector<vertex_descriptor> tm1_vertices, tm2_vertices;
|
std::vector<vertex_descriptor> tm1_vertices, tm2_vertices;
|
||||||
|
const bool doing_autorefinement;
|
||||||
public:
|
public:
|
||||||
const TriangleMesh &tm1, &tm2;
|
const TriangleMesh &tm1, &tm2;
|
||||||
VertexPointMap vpm1, vpm2;
|
VertexPointMap vpm1, vpm2;
|
||||||
|
|
@ -176,7 +176,8 @@ public:
|
||||||
const TriangleMesh& tm2_,
|
const TriangleMesh& tm2_,
|
||||||
const VertexPointMap& vpm1_,
|
const VertexPointMap& vpm1_,
|
||||||
const VertexPointMap& vpm2_)
|
const VertexPointMap& vpm2_)
|
||||||
: tm1(tm1_)
|
: doing_autorefinement(&tm1_ == &tm2_)
|
||||||
|
, tm1(tm1_)
|
||||||
, tm2(tm2_)
|
, tm2(tm2_)
|
||||||
, vpm1(vpm1_)
|
, vpm1(vpm1_)
|
||||||
, vpm2(vpm2_)
|
, vpm2(vpm2_)
|
||||||
|
|
@ -284,7 +285,15 @@ public:
|
||||||
{
|
{
|
||||||
put(vpm, vd, exact_to_double(enodes[i]));
|
put(vpm, vd, exact_to_double(enodes[i]));
|
||||||
if (&tm1==&tm)
|
if (&tm1==&tm)
|
||||||
|
{
|
||||||
|
if ( tm1_vertices[i] == GT::null_vertex() )
|
||||||
|
{
|
||||||
tm1_vertices[i] = vd;
|
tm1_vertices[i] = vd;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (doing_autorefinement)
|
||||||
|
tm2_vertices[i] = vd;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
tm2_vertices[i] = vd;
|
tm2_vertices[i] = vd;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue