|
Geometry : |
Subject: Re: [geometry] Reproducible bug ?
From: Romain Texier (romain.texier_at_[hidden])
Date: 2013-01-05 03:50:02
Hi,
I try with double and ttmath_big, it works fine. Thanks !
I will try to solve the other problem with double.
Regards,
Romain
2012/12/29 Barend Gehrels <barend_at_[hidden]>
> Hi,
>
>
> On 28-12-2012 11:07, Romain Texier wrote:
>
>> Hi,
>>
>> I make the union of some triangles and an exception is thrown. The
>> exception is overlay_invalid_input_**exception.
>> The triangles are provided by a mesh for a rendering tool. A mesh must
>> share some points.
>>
>>
>>
> Using float, the triangles are close to the resolution of the floating
> point grid. Therefore the exception occurs. If you use double, the
> exception disappears (in my case). If that is not enough, you should use
> the ttmath, which is accurate. Boost.Geometry supports ttmath for these
> purposes. Be sure to use "ttmath_big", which is a derived type having a
> default constructor.
>
> So like this:
>
> #include <boost/geometry/extensions/**contrib/ttmath_stub.hpp>
> ...
> typedef boost::geometry::model::d2::**point_xy<ttmath_big>
> BoostPoint; // 2D float point
>
>
> But for this specific example, double was OK for me.
>
> Can you verify if that solves your other problem ("Re: [geometry] union
> gives an empty multi-polygon") too? It seems related to me.
>
> Regards, Barend
>
>
> ______________________________**_________________
> Geometry mailing list
> Geometry_at_[hidden]
> http://lists.boost.org/**mailman/listinfo.cgi/geometry
>
Geometry list run by mateusz at loskot.net