Skip to Content.
Sympa Menu

cgal-discuss - Re:Re: [cgal-discuss] A problem about writing the implicit surface

Subject: CGAL users discussion list

List archive

Re:Re: [cgal-discuss] A problem about writing the implicit surface


Chronological Thread 
  • From: weihy1984 <>
  • To: cgal-discuss <>
  • Subject: Re:Re: [cgal-discuss] A problem about writing the implicit surface
  • Date: Mon, 18 May 2009 22:06:58 +0800 (CST)

Hi, Laurent, your suggestion is very helpful. After checking my code, I found I made a mastake when I read the mesh file to show it. Now, the problem has been solved, and thank you very much. By the way, there are two  errors in the code you gave me:
 
 V[it] = i; should be V[it]=i++;
 os << V[it->vertex(j)]; should be os<<V[(*it).first->vertex(j)]<<" ";




 

在2009-05-18,"Laurent Rineau (GeometryFactory)" The code you gave does not correspond to the file you gave.
>
>Here is a correct code:
>
>os << "OFF"<<std::endl<<n <<" "<< m<<" "<<0<<std::endl;
> 
>std::map<Vertex_handle, int > V;
>int i = 0;
>// write the vertices
>for (Vi it=tr.finite_vertices_begin(); it!=tr.finite_vertices_end(); ++it)
>{
>  os << it->point() << std::endl;
>  V[it] = i;
>}
>
>// write the facets
>for(Fi it =tr.finite_facets_begin(); it !=tr.finite_facets_end(); ++it) {
>  if(c2t3.is_in_complex(*it)){
>    os << "3 ";
>    for(int j = 0; j < 4; j++){
>     if ((*it).second!=j){
>        os << V[it->vertex(j)];
>     }
>    }
>    os << std::endl;
>  }
>}
>
>You second code about duals is non-sense. The surface is coded in the c2t3 
>object, and you must use the function c2t3.is_in_complex.
>
>-- 
>Laurent Rineau, PhD
>Engineer at GeometryFactory
>http://www.geometryfactory.com/
>
>-- 
>You are currently subscribed to cgal-discuss.
>To unsubscribe or access the archives, go to
>https://lists-sop.inria.fr/wws/info/cgal-discuss



穿越地震带 纪念汶川地震一周年

Attachment: out_mesh.jpg
Description: image/pjpeg




Archive powered by MHonArc 2.6.16.

Top of Page