Subject: CGAL users discussion list
List archive
- From: Andreas Fabri <>
- To:
- Subject: Re: [cgal-discuss] problem creating Nef_polyhedron_3 from ".off" files
- Date: Fri, 01 Dec 2006 14:01:50 +0100
Hello,
The coordinates must be integers. In your case they are
all rounded to 0 or 1.
andreas
wrote:
Hello,
I'm unsuccessfully trying to create Nef_Polyhedron_3 object from Polyhedron_3, which is in turn read form cube.off file.
It turns out that when the coordinates of the vertices (by abs value) are
smaller than one, I receive segmentation fault, or some other kind of error,
which depends on Kernel that is used.
Same problem appears when I start nef_3 demo. Using following syntax:
$./nef_3 loadoff cube01.off
I receive the following error:
Error !!!!!!!!!!!!!!!!!!!!!!!
Error !!!!!!!!!!!!!!!!!!!!!!!
Error !!!!!!!!!!!!!!!!!!!!!!!
Error !!!!!!!!!!!!!!!!!!!!!!!
Error !!!!!!!!!!!!!!!!!!!!!!!
Error !!!!!!!!!!!!!!!!!!!!!!!
wrong cycle
PointH3(0, 0, 0, 1)
PointH3(0, 0, 0, 1)
PointH3(0, 0, 0, 1)
PointH3(0, 0, 0, 1)
CGAL error: assertion violation!
Expr: !pe_prev->facet()->plane().is_degenerate()
File: /usr/local/CGAL/include/CGAL/Nef_3/polyhedron_3_to_nef_3.h
Line: 149
Aborted
The file cube01.off is same as cube.off, found in demo/Nef_3 directory,
except for the scaled coordinates of vertices:
OFF
8 6 0
# vertices
-0.1 -0.1 0.1
-0.1 0.1 0.1
0.1 0.1 0.1
0.1 -0.1 0.1
-0.1 -0.1 -0.1
-0.1 0.1 -0.1
0.1 0.1 -0.1
0.1 -0.1 -0.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
#-----------------------------
Program that triggers same behavior is modified version from users manual:
//----------------------cut-----------------
// *read Polyhedron_3 from std::cin, // *convert it into Nef_Polyhedron_3
//
#include <CGAL/Gmpz.h>
#include <CGAL/Cartesian.h>
#include <CGAL/Homogeneous.h>
#include <CGAL/Extended_homogeneous.h>
#include <CGAL/Nef_polyhedron_3.h>
#include <CGAL/Polyhedron_3.h>
#include <CGAL/IO/Polyhedron_iostream.h>
#include <CGAL/IO/Nef_polyhedron_iostream_3.h>
#include <fstream>
typedef CGAL::Gmpz NT;
//typedef CGAL::Homogeneous<NT> SK;
typedef CGAL::Cartesian<double> SK;
typedef CGAL::Extended_homogeneous<NT> EK;
typedef CGAL::Nef_polyhedron_3<SK> Nef_polyhedron_S;
//typedef CGAL::Nef_polyhedron_3<EK> Nef_polyhedron_E;
typedef CGAL::Polyhedron_3<SK> Polyhedron;
int main() {
// debugthread=29;
Polyhedron P;
std::cin >> P;
Nef_polyhedron_S S(P);
std::cout << S;
}
//----------------cut--------------
Am I missing something?
Thanks in advance,
Gordan Sikic
- problem creating Nef_polyhedron_3 from ".off" files, gordan . sikic, 12/01/2006
- Re: [cgal-discuss] problem creating Nef_polyhedron_3 from ".off" files, Andreas Fabri, 12/01/2006
- Re: [cgal-discuss] problem creating Nef_polyhedron_3 from ".off"files, Gordan Sikic, 12/01/2006
- Re: [cgal-discuss] problem creating Nef_polyhedron_3 from ".off"files, Peter Hachenberger, 12/04/2006
- Re: [cgal-discuss] problem creating Nef_polyhedron_3 from ".off"files, Gordan Sikic, 12/01/2006
- Re: [cgal-discuss] problem creating Nef_polyhedron_3 from ".off" files, Andreas Fabri, 12/01/2006
Archive powered by MHonArc 2.6.16.