Boost logo

Boost :

Subject: Re: [boost] Simple boost polygon boolean OR doesn't work: help needed
From: Simonson, Lucanus J (lucanus.j.simonson_at_[hidden])
Date: 2012-02-08 11:54:23

Praveen Vs wrote:

> typedef gtl::polygon_set_data<double> CPolygonSet; typedef gtl::polygon_data<double> CPolygon;

While the coordinate data type is templates, floating point coordinate types are not supported for polygon clipping operations because of the difficulty making the calculations numerically robust. Of the open source polygon clipping libraries I know of only CGAL is numerically robust with floating point coordinates, and it uses multi-precision arithmetic extensively. You need to use integer coordinates. If you don't like the rounding error scale the data to make the rounding error smaller.

Your compiler error should hopefully go away with integer coordinate types. I believe my tests are passing on MSVC2010.


Boost list run by bdawes at, gregod at, cpdaniel at, john at