|
Boost : |
Subject: Re: [boost] Formal Review: Boost.Polygon starts today August 24, 2009
From: Simonson, Lucanus J (lucanus.j.simonson_at_[hidden])
Date: 2009-08-30 18:53:49
Sebastian Redl wrote:
>> - What is your evaluation of the potential usefulness of the library?
> The limitation that polygon operations must basically be integral (I'm
> not sure what effect the snap-rounding distance of one integer unit
> has
> in concrete cases, but when that integer unit is a kilometer, it
> sounds
> like it would introduce significant inaccuracies) means that my
> particular use case is somewhat limited - I have to work with 3rd
> party geometry that uses floating point values.
> If this is a misunderstanding on my part, the library would be
> extremely useful to me. Even as it is, I can use the point and
> rectangle functions
> to replace quite a bit of my own code.
You can scale your data to minimize inaccuracy. In VSLI CAD most users like to see units in micron as a floating point value, but the integer unit we use is closer to angstroms. We frequently convert back and forth from floating point "user units" to integer "db units". Integer gives you all the precision you could need if you scale your data. I provide the scale_up() and scale_down() interfaces on all my geometry concept types to make that easy.
Hope that helps,
Luke
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk