Subject: CGAL users discussion list
List archive
- From: "liuning" <>
- To: "cgal-discuss" <>, "" <>
- Subject: Re: [cgal-discuss] A question about 2D mesh generation
- Date: Mon, 21 Sep 2009 23:57:22 +0800
thanks for the reply. consecutive calls to
refine_Delaunay_mesh_2 does not change the mesh unless I make some change myself
(like vertex position...).
I'm trying to change the 2D mesh vertex positions using mouse
dragging, so I initialize the mesh using constrained delaunay triangulation,
then refine it using refine_Delaunay_mesh_2 , and never call
"refine_Delaunay_mesh_2 " again , nor add/delete vertex/constrain either, the
only thing I do is to change the positions of the vertices near the
point where mouse drags , as code below
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
//typedef CGAL::Triangulation_vertex_base_2<K> Vb;
typedef Triangulation_vertex_base_2_LN<K> Vb;
//typedef CGAL::Delaunay_mesh_face_base_2<K> Fb;
typedef Delaunay_mesh_face_base_2_LN<K> Fb;
typedef CGAL::Triangulation_data_structure_2<Vb, Fb> Tds;
typedef CGAL::Constrained_Delaunay_triangulation_2<K, Tds> CDT;
CDT cdt;
In the mousemove callback function:
std::list<vertex_handle> LV;
LV.clear();
Circle circle( Point(mouse_x , mouse_y) , range_square
);
range_search( cdt, circle, std::back_inserter(LV) );
for ( it=LV.begin(); it != LV.end(); it++
)
{
// calculate the movement for each vertex...
(*it)->set_point(
Point((*it)->point().x()+movement_x, (*it)->point().y()+movement_y) );
}
LV.clear();
Redisplay(); I'm still confused that range_search( Dt& delau, Circle C,
OutputIterator res) change delau ...
or I misunderstand something?
2009-09-21
liuning
发件人: Amir Vaxman
发送时间: 2009-09-21 23:08:54
收件人:
抄送:
主题: [cgal-discuss] A question about 2D mesh
generation
Do consecutive calls to mesher.refine_mesh() change the mesh,
if it is already refined and no criteria is added? Suppose that I remove a seed,
and do refine_mesh() again. Do the triangles of the previsouly-refined domains
stay the same? Amir. |
- [cgal-discuss] A question about 2D mesh generation, Amir Vaxman, 09/21/2009
- Re: [cgal-discuss] A question about 2D mesh generation, Laurent Rineau (GeometryFactory), 09/21/2009
- RE: [cgal-discuss] A question about 2D mesh generation, Amir Vaxman, 09/22/2009
- RE: [cgal-discuss] A question about 2D mesh generation, Amir Vaxman, 09/22/2009
- RE: [cgal-discuss] A question about 2D mesh generation, Amir Vaxman, 09/22/2009
- <Possible follow-up(s)>
- Re: [cgal-discuss] A question about 2D mesh generation, liuning, 09/21/2009
- Re: [cgal-discuss] A question about 2D mesh generation, Laurent Rineau (GeometryFactory), 09/21/2009
Archive powered by MHonArc 2.6.16.