Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Nef_3 and Polyedrhon

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Nef_3 and Polyedrhon


Chronological Thread 
  • From: Peter Hachenberger <>
  • To:
  • Subject: Re: [cgal-discuss] Nef_3 and Polyedrhon
  • Date: Fri, 03 Aug 2007 13:04:46 +0200

Hi Ruben,

I've never seen that happen before. CAn you please send me the whole
code, i.e., with type definitions. As far as I can see, this part of the
code is fine.

Peter

On Fri, 2007-08-03 at 12:49 +0200, Rubén Martínez wrote:
> My problem reside in de transformation from Nef 3 to Polyedron, this code:
>
> N1.convert_to_Polyhedron(P);
>
>
> My complete code is this:
>
> main(){
>
> Polyhedron P;
> char *path;
> path = "polyhedron.off";
>
> P = readOFF (path);
>
> if(P.is_closed()) {
> Nef_polyhedron N1(P);
>
> if(N1.is_simple()) {
> N1.convert_to_Polyhedron(P);
> std::cout << P;
> std::cout << "Número de Vértices: ";
> std::cout << P.size_of_vertices ();
> }
> else
> std::cerr << "N1 is not a 2-manifold." << std::endl;
> }
> }
>
> And when I convert N1 (Nef 3) to P (Polyedron) i observe that the
> vertex are duplicated, for example:
>
> In this tetrahedron, i f I load this in the Nef 3, i have this:
>
> OFF
> 8 6 0
> # vertices
> -1 -1 1
> -1 1 1
> 1 1 1
> 1 -1 1
> -1 -1 -1
> -1 1 -1
> 1 1 -1
> 1 -1 -1
> # facets
> 4 3 2 1 0
> 4 0 1 5 4
> 4 6 5 1 2
> 4 3 7 6 2
> 4 4 7 3 0
> 4 4 5 6 7
>
>
> but if I execute the code N1.convert_to_Polyhedron(P); i obtain this result
> OFF
> 16 12 0
>
> -1 -1 1
> -1 1 1
> 1 1 1
> 1 -1 1
> -1 -1 -1
> -1 1 -1
> 1 1 -1
> 1 -1 -1
> -1 -1 1
> -1 1 1
> 1 1 1
> 1 -1 1
> -1 -1 -1
> -1 1 -1
> 1 1 -1
> 1 -1 -1
>
> 4 3 2 1 0
> 4 0 1 5 4
> 4 6 5 1 2
> 4 3 7 6 2
> 4 4 7 3 0
> 4 4 5 6 7
> 4 12 15 11 8
> 4 12 8 9 13
> 4 8 11 10 9
> 4 12 13 14 15
> 4 15 14 10 11
> 4 13 9 10 14
>
> Anyone know any solution for this problem?????
>
> Thanks
>
> RMG
>




Archive powered by MHonArc 2.6.16.

Top of Page