Dick H. a écrit :
Jean-Pierre,
1) Can you see where point_at_infinity4 is deleted?
No. deleteting point_at_infinity3 and point_at_infinity4 seems missing
2) Why create these infinity points on the heap rather than on the stack?
I don't know.
3) Have you done a quality check on this code?
4) Are you confident that this is code you want to use in Kicad?
The quality of it does not overly impress me.
All the code in kicad/polygon must be refined, tested and cleaned.
It must be seen as very unstable.
I am not sure to use it.
Only some pieces of this soft are usefull.
This is the reason of this separate directory.
Currently, I am working on the G.U.I to handle zones outlines.
So, to do it, I used existing libraries I found in freePCB, and some
pieces of freePCB code, relative to polygon and outline calculation and
handling.
The 2 libraries php_polygon and GenericPolygonClipperLibrary are used
"as this".
The other files come from freePCB code and I changed the original code
to compile with kicad, but this code is not yet cleaned.
php_polygon and GenericPolygonClipperLibrary (and polygon1 used in gpcb)
come from internet (see links.txt).
I found some other polygon libraries, but usually with no comments in
sources... (hard to use without comments)
The reasons for the choice of using freePCB code are:
- The code has many comments (the are only few comments in gpcb code)
- The code is written in C++ and it is more easy to use with kicad.
- The zone handling in freePCB is very intuitive.
But gpcb seems have more powerfull algorithms for zone handling (gerber
output, detection of non connected pads in zones...)
Therefore the gpcb code must also considered.
So the work is starting, but not finished....
Currently, this is mainly the G.U.I. relative to the zone outlines
creation and edition which must be evaluated.
Jean-Pierre CHARRAS