Skip to Content.
Sympa Menu

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

Subject: CGAL users discussion list

List archive

[cgal-discuss] Nef_3 and Polyedrhon


Chronological Thread 
  • From: "Rubén Martínez" <>
  • To:
  • Subject: [cgal-discuss] Nef_3 and Polyedrhon
  • Date: Fri, 3 Aug 2007 12:49:48 +0200
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=CHcre2dwxeC0hR9BoDvJFjcrfQsNVF8fYtpA7N7XLUAOlBJ/YZtM/5RYmt3e9CWwhZVEy2r/Dxv+CuVU28YxoTkJHe7GZJHA8cLxqKSXlHXBJD4DNKXfLJlcblFAQuPIF62ky+wfKHTX72eTV9FXy/YWfmg6U0c3Kr5NrdF3PNA=

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