Thanks for your answer Klaas.

I am using kbool (not wxArt2D) in python scripts:
http://code.google.com/p/pykbool
So that I indeed will disable the creation of those key files.

About your questions: I have a script that uses kbool to transform a big
multi-polygon into a single polygonal chain and displays the result using
tk.
The big multipolygon is made of one contour, 37 holes, all closed &
counter-clockwise, > 5000 points. Bounding box: (0, 0), (800, 502)
The coordinates are here (11KB):
http://pykbool.googlecode.com/svn/trunk/poly.json.gz
The contour and holes look like:
http://pykbool.googlecode.com/svn/wiki/keyhole3.png

My goal is to connect those37  holes to the contour using as few engines and
operations as possible:
I first tried to only use one single A_SUB_B operation. GROUP_A containing
the contour points, and GROUP_B containing all the holes points in a row.
The result was indeed a single polygonal chain, but I missed a lot of
vertices: http://pykbool.googlecode.com/svn/wiki/keyhole2_pb1.png
I then tried to substract each hole one after the other:
C1=engine.A_SUB_B(contour, hole1), C2=engine.A_SUB_B(C1, hole2), ...
But while calculating C13=engine.A_SUB_B(C12, hole13), I always get a "no
next (endpoint != beginpoint)" exception (graph.cpp, line 421).
So that I catch that exception and continue the substractions using a new
engine: C13=new_engine.A_SUB_B(C12, hole13), ... , C=new_engine.A_SUB_B(C36,
hole37)
The result: http://pykbool.googlecode.com/svn/wiki/keyhole2.png

Now, I am still under the impression that my usage of kbool is sub-optimal.
Could'nt I better configure it to do the whole substration using only one
operation and/or one engine ?

The engines I use have the default parameters (me lazy):
marge=0.001, dgrid=1000, correction_factor=500.0, correction_aber=1.0,
round_factor=1.5, smooth_aber=10.0, maxline_merge=1000.0, grid = 10000

Cheers,
Emmanuel

From: klaas.holwerda <ngi@kl...> - 2011-02-22 00:31
>On 02/20/2011 04:37 PM, Emmanuel Decitre wrote:
>> Hi there,
>>
>> What is the usage of the files graphkeyfile.key and keyfile.key ?
>> I could only find snippets writing them, but none reading them.
>>
>> Are WriteKEY and WriteGraphKEY only for debug purposes ?
>Right, only for that you should disbale it normally.
>KEY files can be red in by several wxArt2D tools, and makes it easier to
debug.
>
>Your problems with kbool can be many. What coordinates and what scaling?
>I mean the range of the numbers.
>
>kbool delivers all holes at once (when set right), so it is not clear what
you are doing??
>
>Regards,
>
>klaas
------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Wxart2d-users_dev mailing list
Wxart2d-users_dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxart2d-users_dev

Reply via email to