Subject: CGAL users discussion list
List archive
- From: mastair <>
- To:
- Subject: [cgal-discuss] Re: NEF intersection (infinite loop BUG?)
- Date: Mon, 28 Jan 2013 04:22:59 -0800 (PST)
With pb you mean the polyhedron builder?
Using your code (going directly from off to NEF), it indeed works. But with
the following code, first the OFF to Polyhedron and then to NEF, it does not
work anymore. Actually the problem was not with the intersection, but with
converting the Polyhedron to NEF.
The following code throws again:
CGAL error: assertion violation!
Expression : pe_prev->is_border() ||
internal::Plane_constructor<Plane>::get_plane(pe_prev->facet(),pe_prev->facet()->plane()).
has_on(pe_prev->opposite()->vertex()->point())
File : c:\dev\cgal-4.1\include\cgal\nef_3\polyhedron_3_to_nef_3.h
Line : 296
/#include <fstream>
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
#include <CGAL/Nef_polyhedron_3.h>
#include <CGAL/IO/Nef_polyhedron_iostream_3.h>
#include <CGAL/Polyhedron_3.h>
#include <CGAL/IO/Polyhedron_iostream.h>
#include <CGAL/OFF_to_nef_3.h>
typedef CGAL::Exact_predicates_exact_constructions_kernel EPEC;
typedef CGAL::Nef_polyhedron_3<EPEC> Nef_polyhedron_3;
typedef CGAL::Polyhedron_3<EPEC> Polyhedron_3;
int main(int,char** argv)
{
Nef_polyhedron_3 nef1, nef2;
Polyhedron_3 P1, P2;
std::ifstream file1_stream(argv[1]);
std::ifstream file2_stream(argv[2]);
file1_stream >> P1;
file2_stream >> P2;
nef1 = P1;
nef2 = P2;
Nef_polyhedron_3 nef3 = nef1.intersection(nef2);
Polyhedron_3 poly;
nef3.convert_to_polyhedron(poly);
std::ofstream out;
out.open("nef3.off");
out << poly;
out.close();
return(0);
}/
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/NEF-intersection-infinite-loop-BUG-tp4656572p4656596.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] NEF intersection (infinite loop BUG?), mastair, 01/24/2013
- Re: [cgal-discuss] NEF intersection (infinite loop BUG?), Sebastien Loriot (GeometryFactory), 01/28/2013
- [cgal-discuss] Re: NEF intersection (infinite loop BUG?), mastair, 01/28/2013
- Re: [cgal-discuss] Re: NEF intersection (infinite loop BUG?), Sebastien Loriot (GeometryFactory), 01/28/2013
- [cgal-discuss] Re: NEF intersection (infinite loop BUG?), mastair, 01/28/2013
- [cgal-discuss] Re: NEF intersection (infinite loop BUG?), mastair, 01/28/2013
- Re: [cgal-discuss] Re: NEF intersection (infinite loop BUG?), Sebastien Loriot (GeometryFactory), 01/28/2013
- [cgal-discuss] Re: NEF intersection (infinite loop BUG?), mastair, 01/28/2013
- [cgal-discuss] Re: NEF intersection (infinite loop BUG?), mastair, 01/28/2013
- Re: [cgal-discuss] Re: NEF intersection (infinite loop BUG?), Sebastien Loriot (GeometryFactory), 01/28/2013
- [cgal-discuss] Re: NEF intersection (infinite loop BUG?), mastair, 01/28/2013
- Re: [cgal-discuss] NEF intersection (infinite loop BUG?), Sebastien Loriot (GeometryFactory), 01/28/2013
Archive powered by MHonArc 2.6.18.