-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Description
Issue Details
do_intersect(Triangle_3,Bbox_3) is incorrect
Source Code
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
#include <iostream>
typedef CGAL::Exact_predicates_exact_constructions_kernel K;
typedef K::Point_3 Point_3;
typedef K::Triangle_3 Triangle_3;
typedef CGAL::Bbox_3 Bbox_3;
int main()
{
Point_3 p0(-34.1128,-4.00842,39.5061);
Point_3 p1(-36.0938,-3.6615,36.87);
Point_3 p2(-34.5781,-3.61804,39.9716);
Triangle_3 cgt(p0,p1,p2);
Bbox_3 triBox(cgt.bbox());
Bbox_3 otherBox(-52.3586,-14.3376,25.3037,-38.021,0,39.6414);
if(do_intersect(cgt,otherBox)) std::cout<<"cgt and otherBox intersect"<< std::endl;
else std::cout<<"cgt and otherBox do not intersect" << std::endl;
if(do_intersect(triBox,otherBox)) std::cout<<"triBox and otherBox intersect"<<std::endl;
else std::cout<<"triBox and otherBox do not intersect"<<std::endl;
return 0;
}
The above code outputs:
cgt and otherBox intersect
triBox and otherBox do not intersect
In the below image otherBox is green, triBox is gray and cgt is red:
Environment
OS: Ubuntu 22.04
g++ (Ubuntu 11.2.0-19ubuntu1) 11.2.0
Release
CGAL 5.5
Boost 1.66
Reactions are currently unavailable
