Subject: CGAL users discussion list
List archive
Re: [cgal-discuss] 2D Minkowski Sum - A bug in the convolution method of the 4.0 library
Chronological Thread
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] 2D Minkowski Sum - A bug in the convolution method of the 4.0 library
- Date: Tue, 24 Apr 2012 14:06:28 +0200
Hello,
thanks for the report.
I checked and the problem appeared first in the release 3.8 of CGAL.
We'll have a closer look to it and post on the mailing list when
we know what happened.
Sebastien.
On 04/24/2012 01:14 PM, Tiago Silveira wrote:
Hi,
the Minkowski Sum method (convolution), presents a segmentation
fault for the following instance (provided by the following code). There
are other instances that also generate this error. I'm using
version 4.0 of the library. I ran the example using the library 3.5.1
and this problem did not occur. How could I solve this problem?
Tiago.
#include <CGAL/Gmpq.h>
#include <CGAL/Cartesian.h>
#include <CGAL/Polygon_2.h>
#include <CGAL/Polygon_with_holes_2.h>
#include <CGAL/minkowski_sum_2.h>
typedef CGAL::Gmpq Number_type;
typedef CGAL::Cartesian<Number_type> k;
typedef k::Point_2 Point_2;
typedef CGAL::Polygon_2<k> Polygon_2;
typedef CGAL::Polygon_with_holes_2<k> Polygon_with_holes_2;
int main() {
Polygon_2 polA, polB;
polA.push_back(Point_2(0, 0));
polA.push_back(Point_2(5, 0));
polA.push_back(Point_2(6, 2));
polA.push_back(Point_2(6, 3));
polA.push_back(Point_2(3, 3));
polA.push_back(Point_2(3, 6));
polA.push_back(Point_2(8, 6));
polA.push_back(Point_2(8, 11));
polA.push_back(Point_2(0, 11));
polB.push_back(Point_2(0, 0));
polB.push_back(Point_2(0, -5));
polB.push_back(Point_2(2, -6));
polB.push_back(Point_2(3, -6));
polB.push_back(Point_2(3, -3));
polB.push_back(Point_2(6, -3));
polB.push_back(Point_2(6, -8));
polB.push_back(Point_2(11, -8));
polB.push_back(Point_2(11, 0));
std::cout << "A is ";
polA.is_counterclockwise_oriented() ? "" : "NOT ";
std::cout << "counterclockwise oriented and ";
polA.is_simple()? "" : "NOT ";
std::cout << "simple!" << std::endl;
std::cout << "B is ";
polB.is_counterclockwise_oriented() ? "" : "NOT ";
std::cout << "counterclockwise oriented and ";
polB.is_simple()? "" : "NOT ";
std::cout << "simple!" << std::endl;
std::cout << "\nMinkowski Sum of two polygons:" << std::endl;
Polygon_with_holes_2 NFP = CGAL::minkowski_sum_2(polA,polB);
std::cout << NFP << std::endl;
return 1;
}
- [cgal-discuss] 2D Minkowski Sum - A bug in the convolution method of the 4.0 library, Tiago Silveira, 04/24/2012
- Re: [cgal-discuss] 2D Minkowski Sum - A bug in the convolution method of the 4.0 library, Sebastien Loriot (GeometryFactory), 04/24/2012
Archive powered by MHonArc 2.6.16.