Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Dual od Delaunay Edge 3D

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Dual od Delaunay Edge 3D


Chronological Thread 
  • From: "Angelo Tardugno" <>
  • To:
  • Subject: Re: [cgal-discuss] Dual od Delaunay Edge 3D
  • Date: Tue, 11 Mar 2008 17:32:50 +0000
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=RYilJJrwm/GwEs2zlpO9k5r5WWnY6KkW0Q3zOl+rueyeg9QtE4g4nM0YcOeteK9B5/yhBtkct4wom/Q0HCgvxRdE8ufN21DpuDlE1IfQ1FZXSPI2pMmAUgJjv62rJ+yqavSHih+t8RCxryhrNLU+jPxFGBfH0sGEEffWG0v4tkA=

You're absolutely right.... I just assumed that was right since I've copied from a post on the mailing list.

You saved my day....Thank you so much

Angelo

On Tue, Mar 11, 2008 at 5:17 PM, Manuel Caroli <> wrote:
Dear Angelo,

your for loop should not start at 0 because then ((v_ind1+i)%4)==v_ind1
and you try to circulate around an edge that has twice the same endpoint.

Best

Manuel


Angelo Tardugno wrote:
> Yes you're right....ci is an iterator of a list containing Cell handles.
> The rest of the code is here.
>
> Thanks
>
> Angelo
>
> for (std::list<Cell_handle>::iterator ci = i_cells.begin();
> ci!=i_cells.end();ci++)
>         {
>             v_ind1=(*ci)->index(vi);
>
>
>             for (int i=0; i<4;i++)
>             {
>                 //cout << *((*ci)->vertex((v_ind1+i)%4));
>                 if (!(vert_set.count((*ci)->vertex((v_ind1+i)%4))))
>                 {
>                     vert_set.insert((*ci)->vertex((v_ind1+i)%4));
>                     Edge e(*ci, v_ind1, ((v_ind1+i)%4) );
>                     cc=T.incident_cells(e);
>
> cc_end=T.incident_cells(Edge(*ci,v_ind1,((v_ind1+i)%4)));
>
>                     cout << "------------------" << endl;
>                     cout << (cc==cc_end) << endl;
>                     cc++;
>                     cout << (cc==cc_end) << endl;
>                     cc++;
>                     cout << (cc==cc_end) << endl;
>                     cc++;
>                     cout << (cc==cc_end) << endl;
>                     cc++;
>                     cout << (cc==cc_end) << endl;
>                     cc++;
>                     cout << (cc==cc_end) << endl;
>                     cc++;
>                     cout << (cc==cc_end) << endl;
>                     cc++;
>                     cout << (cc==cc_end) << endl;
>                     cc++;
>                     cout << (cc==cc_end) << endl;
>                     cc++;
>                     cout << (cc==cc_end) << endl;
>                     cc++;
>                     cout << (cc==cc_end) << endl;
>                     cc++;
>                     cout << " ------------------------" << endl;
>
>
>                     int n_cp=0;
>
>                         //do
>                         while ((++cc)!=(cc_end));
>                         {
>                             if (!(T.is_infinite(cc)))
>                             {
>                             ++n_cp;
>
>                             }
>                         } //while (&(++cc)!=&(cc_end));
>
>                     cout << "Ciao" << endl;
>                     medial << n_cp << endl;
>                     cout << n_cp << endl;
>
>                     cc=T.incident_cells(e);
>                     cc_end=cc;
>
>
>
>
>                     do
>                     {
>                         if (!(T.is_infinite(cc)))
>                         {
>
>                         pt=T.dual(cc);
>                         //cout << pt << endl;
>
>                         xx = pt.x();
>                         yy = pt.y();
>                         zz = pt.z();
>
>                        medial << xx << " " << yy << " " << zz << endl;
>                         }
>                     else {cout << "Infinite Cell " << endl;}
>
>                     } while (cc++!=cc_end);
>                 }
>             }
>
>         }
>
>
>
>         //cout << i_cells.size() << endl;
>     }
>
> On Tue, Mar 11, 2008 at 4:25 PM, <
> <mailto:>> wrote:
>
>     Hi,
>     It's difficult to say anything without knowing more about your code.
>     For instance, what is ci?
>
>     Angelo Tardugno wrote:
>      > Hi all,
>      >
>      > it seems like the circulator is not actually circulating, I've done a
>      > simple test:
>      >
>      > Edge e(*ci, v_ind1, ((v_ind1+i)%4) );
>      >                     cc=T.incident_cells(e);
>      >
>      > cc_end=T.incident_cells(Edge(*ci,v_ind1,((v_ind1+i)%4)));
>      >
>      >                     cout << "------------------" << endl;
>      >                     cout << (cc==cc_end) << endl;
>      >                     cc++;
>      >                     cout << (cc==cc_end) << endl;
>      >                     cc++;
>      >                     cout << (cc==cc_end) << endl;
>      >                     cc++;
>      >                     cout << (cc==cc_end) << endl;
>      >                     cc++;
>      >                     cout << (cc==cc_end) << endl;
>      >                     cc++;
>      >                     cout << (cc==cc_end) << endl;
>      >                     cc++;
>      >                     cout << (cc==cc_end) << endl;
>      >                     cc++;
>      >                     cout << (cc==cc_end) << endl;
>      >                     cc++;
>      >                     cout << (cc==cc_end) << endl;
>      >                     cc++;
>      >                     cout << (cc==cc_end) << endl;
>      >                     cc++;
>      >                     cout << (cc==cc_end) << endl;
>      >                     cc++;
>      >                     cout << " ------------------------" << endl;
>      >
>      > and the output gives me something like this....
>      >
>      > -------------------------------
>      > 1
>      > 0
>      > 0
>      >
>      > and then the program crashes. It seems like the circulator is not
>     doing
>      > its job properly....
>      >
>      > Any idea?
>      >
>      > Thanks
>      >
>      > Angelo
>      >
>      >
>     --
>     You are currently subscribed to cgal-discuss.
>     To unsubscribe or access the archives, go to
>     https://lists-sop.inria.fr/wws/info/cgal-discuss
>
>

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss




Archive powered by MHonArc 2.6.16.

Top of Page