Using a remove and insert method to move points to avoid problems with the CGAL

move function.  If move can't be fixed by the CGAL guys then go to a complete
removal and reinsertion at each step.
This commit is contained in:
graham
2009-08-05 13:25:00 +01:00
parent e82106c619
commit 97900b0ba4
3 changed files with 13 additions and 5 deletions

View File

@ -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;
}
}

View File

@ -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);

View File

@ -46,7 +46,7 @@ namespace CGAL
\*---------------------------------------------------------------------------*/
template<class Gt, class Vb=CGAL::Triangulation_vertex_base_2<Gt> >
class indexedVertex
class indexedVertex
:
public Vb
{