Closed martinhansdk closed 6 years ago
Something is definitely going wrong there, because if i run the data you provided i get: POLYGON((10 -10,10 0,10 10,0 10,-10 10,-10 0,-10 -10,0 -10,10 -10))
Could you please provide info on the system, boost version, compiler version, etc. you are running?
Linux debian 9 on x64: Linux kbnux-mrhn 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u5 (2017-09-19) x86_64 GNU/Linux
Compiler:
g++ (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
I get the same result with clang:
clang version 3.8.1-24 (tags/RELEASE_381/final)
I also get the same result with Visual Studio 2017 on Windows 10, but making it compile there required a few changes that I still have to contribute back to you.
I am using boost v. 1.66.0.
I just ran examples/nfp
on this input with -DNFP_DEBUG
set on the gcc command line. Here is the output:
POLYGON((0 0,10 0,10 10,0 10,0 0))
POLYGON((0 0,10 0,10 10,0 10,0 0))
0
touchers:1
0
collected vectors:2
{{{10,0},{10,10}} -> {0,10}} = vertex3
{{{10,0},{10,10}} -> {0,10}} = vertex4
next:{{{10,0},{10,10}} -> {0,10}} = vertex3
trimmed:{{{10,0},{10,0}} -> {0,0}} = vertex3
##### outer #####
And the generated files: output.zip
I hope this helps.
There is quite a hack in place to deal with floating point... maybe it breaks with your boost version. I'll try to reproduce your environment and see for myself.
Yes, it looks like it is the boost version. Boost 1.65.0 works for me, 1.66.0 and 1.67.0 do not.
I can just use boost 1.65.0 for now. I think it makes more sense for you to focus on the new library.
Given the following polygon:
If this polygon is given to
generateNFP()
both aspA
andpB
then the result isI think this may be incorrect. I would have expected to get these four points:
Here I am assuming that the first point
(0 0)
is the reference point.