diff --git a/applications/utilities/mesh/generation/CV2DMesher/CV2D.C b/applications/utilities/mesh/generation/CV2DMesher/CV2D.C index 079414d5c4..8ad3eae3f1 100644 --- a/applications/utilities/mesh/generation/CV2DMesher/CV2D.C +++ b/applications/utilities/mesh/generation/CV2DMesher/CV2D.C @@ -429,7 +429,7 @@ void Foam::CV2D::newPoints(const scalar relaxation) if (surfDist < 0.2) { - sizes[vit->index()] *= (1 - 0.3)*surfDist/0.2 + 0.3; + sizes[vit->index()] *= (1 - 0.1)*surfDist/0.2 + 0.1; } } diff --git a/applications/utilities/mesh/generation/CV2DMesher/CV2DI.H b/applications/utilities/mesh/generation/CV2DMesher/CV2DI.H index eaa01fc26f..f69ff119c1 100644 --- a/applications/utilities/mesh/generation/CV2DMesher/CV2DI.H +++ b/applications/utilities/mesh/generation/CV2DMesher/CV2DI.H @@ -138,11 +138,19 @@ inline Foam::point Foam::CV2D::toPoint3D(const Point& P) const inline void Foam::CV2D::movePoint(const Vertex_handle& vh, const Point& P) { - label i = vh->index(); + int i = vh->index(); + int t = vh->type(); - move(vh, P); + remove(vh); - vh->index() = i; + Vertex_handle newVh = insert(P); + + newVh->index() = i; + newVh->type() = t; + + // label i = vh->index(); + // move(vh, P); + // vh->index() = i; // vh->set_point(toPoint(p)); // fast_restore_Delaunay(vh); diff --git a/applications/utilities/mesh/generation/CV2DMesher/indexedVertex.H b/applications/utilities/mesh/generation/CV2DMesher/indexedVertex.H index 4081145d69..68280dd46f 100644 --- a/applications/utilities/mesh/generation/CV2DMesher/indexedVertex.H +++ b/applications/utilities/mesh/generation/CV2DMesher/indexedVertex.H @@ -46,7 +46,7 @@ namespace CGAL \*---------------------------------------------------------------------------*/ template > -class indexedVertex +class indexedVertex : public Vb {