Boost logo

Boost Users :

Subject: [Boost-users] [boost][polygon]Errors with minkowski sum
From: renaud lepere (renaud.lepere_at_[hidden])
Date: 2012-12-04 05:53:04


 I need to implement robust minkowski sum operations on polygons. I have seen
that this could be implemented easily using boost::polygon, the tutorial is here

http://www.boost.org/doc/libs/1_52_0/libs/polygon/doc/gtl_minkowski_tutorial.htm

The example works fine, however i need more precision than "int" (32 bits on my
plateform win32-msvc10-32bits). I tried to replace to replace int -> double

typedef boost::polygon::point_data< int > point;
with
typedef boost::polygon::point_data< double > point;

But this leads to strange errors deep into the code (operator< is "bad")
        if (!_Pred(_Left, _Right))
                return (false);
        else if (_Pred(_Right, _Left))
                _DEBUG_ERROR2("invalid operator<", _File, _Line);
called after
        scan_data_.insert(*insert_itr); // line 1197 in scan_arbitrary.hpp

 What can i do to avoid it, if i use "long long" type it works but it sends a
lot of warning at compile time. Any idea of what i should do ? Is "double" type
supported ?


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net