Subject: CGAL users discussion list
List archive
- From: "Isabel" <>
- To: <>
- Subject: bug in boolean operations
- Date: Fri, 20 Jul 2007 11:20:22 +0200
typedef CGAL::Homogeneous<CGAL::Gmpz> Kernel;
typedef CGAL::Nef_polyhedron_3<Kernel> Nef_3;
typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
typedef Kernel::Point_3 Point;
typedef Kernel::Vector_3 Vector;
typedef Polyhedron::Vertex_iterator Vertex_iterator;
typedef Polyhedron::Facet_iterator Facet_iterator;
typedef CGAL::Nef_polyhedron_3<Kernel> Nef_polyhedron;
int main( int argc, char **argv) {
Polyhedron P1, P2, P;
const char* name = "cin";
istream* p_in1 = &cin;
istream* p_in2 = &cin;
ifstream in1, in2;
in1.open( ".\\cube.off");
p_in1 = &in1;
Nef_3 N1;
std::size_t discarded = CGAL::OFF_to_nef_3 ( *p_in1, N1, true);
in2.open( ".\\cylinder.off");
p_in2 = &in2;
Nef_3 N2;
discarded = CGAL::OFF_to_nef_3 ( *p_in2, N2, true);
Nef_3 N3;
std::cout << "boolean operation in NEF3..." << std::endl;
N3 = N1 - N2;
std::cout << "Convert to polyhedron..." << std::endl;
if(N3.is_simple()) {
N3.convert_to_Polyhedron(P);
std::cout << N3;
const char* ;
ostream* p_out = &cout;
ofstream out;
out.open( "cubemincylinder.off");
p_out = &out;
CGAL::set_ascii_mode( *p_out);
(*p_out) << P;
}
else {
std::cout << N3;
}
return 0;
}
Thanks Isabel
Attachment:
cubemincylinder.off
Description: Binary data
- bug in boolean operations, Isabel, 07/20/2007
- Re: [cgal-discuss] bug in boolean operations, Peter Hachenberger, 07/20/2007
- RE: [cgal-discuss] bug in boolean operations, Isabel, 07/23/2007
- RE: [cgal-discuss] bug in boolean operations, Peter Hachenberger, 07/30/2007
- RE: [cgal-discuss] bug in boolean operations, Isabel, 07/30/2007
- RE: [cgal-discuss] bug in boolean operations, Peter Hachenberger, 07/30/2007
- RE: [cgal-discuss] bug in boolean operations, Isabel, 07/30/2007
- RE: [cgal-discuss] bug in boolean operations, Peter Hachenberger, 07/30/2007
- RE: [cgal-discuss] bug in boolean operations, Isabel, 07/23/2007
- Re: [cgal-discuss] bug in boolean operations, Peter Hachenberger, 07/20/2007
Archive powered by MHonArc 2.6.16.