Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Need help about control_edge error during subdivision

Subject: CGAL users discussion list

List archive

[cgal-discuss] Need help about control_edge error during subdivision


Chronological Thread 
  • From: "Kwangtaek Kim" <>
  • To: <>
  • Subject: [cgal-discuss] Need help about control_edge error during subdivision
  • Date: Wed, 30 Jun 2010 18:01:02 -0400
  • Organization: Purdue

Hi all,

 

I am implementing subdivision with iteration. For each facet, every edge is divided to the half (the middle point is added as new one each edge) and making a new facet with a newly added point index with creating Halfedge_handle for each new edge.  And then again subdivide the new facet in the same way; this makes the original triangle divided into 16 triangles (e.g. 4 subtriangles after the first iteration and those sub-triangles become 16 after the second iteration). After this done, move to next facet to do the same thing. However, an error occurs when making a new facet with the index of vertex which is previously added. The error is related to Halfedge_handle . Halfedge_handle h (see the below) returns NULL even though the indics (i0, i2, and i4) are valid. Please help me if you know this problem. Thank you.

 

*Code example

B.begin_facet();

   B.add_vertex_to_facet(i0);

   B.add_vertex_to_facet(i2);

  B.add_vertex_to_facet(i4); // i4 is the vertex index previously added

const Halfedge_handle& h = h.end_facet();

 

h->control_edge(false);   <- ERROR occurs

h->next()->control_edge(false);

h->next()->next()->control_edge(false);

 

·         My goal is to create 16 subtriangles per facet at a time.

 

 

Samuel Kim



  • [cgal-discuss] Need help about control_edge error during subdivision, Kwangtaek Kim, 07/01/2010

Archive powered by MHonArc 2.6.16.

Top of Page