Subject: CGAL users discussion list
List archive
- From:
- To:
- Subject: Re: [cgal-discuss] Expr: v == V[3] error of triangulation in 3D
- Date: Sat, 20 Jan 2007 19:28:40 +0100 (CET)
- Importance: Normal
Le Ven 19 janvier 2007 2:06,
a écrit :
> I use Delaunay triangulation in 3D.
> The manipulations I want to do is,
> first calculating new positions of vertices in Delaunay triangulation,
> then move them to the new positions.
> When I do it with
> delaunay_triangulation.move_points( vertex handle of vertex, new position
> );
In the current implementation, the move_point method consists in removing
the vertex handle given as a parameter, and inserting a point at the new
position. The point is "moved" in the sense that the localisation of the
new position in the triangulation is done starting from a neighbor of the
deleted vertex.
However, the vertex is deleted and recreated, and the vertex handle passed
as parameter is not valid anymore after the move (more precisely, it may
be valid, but you have no clue about how it is being used later).
> and I received an message:
>
> Expr: v == V[3]
> File: C:/NAGAI/CGAL/CGAL-3.2.1/include/CGAL/Triangulation_ds_cell_base_3.h
> Line: 98
Most probably, you try to move the same vertex handle twice. The second
time you move it, it is not a valid handle anymore, and the error you
receive means that vertex v does not belong to the cell whose method
index(v) is called.
You can check that by switching on the compile time switch
CGAL_TRIANGULATION_CHECK_EXPENSIVE, so that index method explicitely check
whether v belongs to the tds or not.
You should instead update your vertex handle vh with the one returned by
move_point, so that it keeps pointing on the vertex that you have moved:
vh = delaunay_triangulation.move_points(vh, new_position);
--
Camille
- Expr: v == V[3] error of triangulation in 3D, ueberweise, 01/19/2007
- Re: [cgal-discuss] Expr: v == V[3] error of triangulation in 3D, Camille . Wormser, 01/20/2007
- Re: [cgal-discuss] Expr: v == V[3] error of triangulation in 3D, NAGAI, Yukie, 01/21/2007
- Re: [cgal-discuss] Expr: v == V[3] error of triangulation in 3D, Camille . Wormser, 01/20/2007
Archive powered by MHonArc 2.6.16.