← Back to team overview

kicad-developers team mailing list archive

Re: Testing boost::polygon in pcbnew.

 

On 07/31/2010 10:41 AM, Dick Hollenbeck wrote:
> On 07/31/2010 08:20 AM, jean-pierre charras wrote:
>   
>> Dick Hollenbeck a écrit :
>>   
>>     
>>> On 07/28/2010 07:04 AM, Dick Hollenbeck wrote:
>>>     
>>>       
>>>> On 07/27/2010 02:31 PM, jean-pierre charras wrote:
>>>>       
>>>>         
>>>>> To compile with boost::polygon, run cmake with option -DUSE_BOOST_POLYGON_LIBRARY=ON
>>>>> (see changelog).
>>>>>   
>>>>>     
>>>>>         
>>>>>           
>>>> Jean-Pierre:
>>>>
>>>>
>>>> I found the boost library to require only 40% of the time of kbool to
>>>> refill several zones on a fairly complicated board.  Even on a *very*
>>>> fast computer this board takes 11 seconds to refill all zones using
>>>> kbool.  Using boost::polygon it takes only 4 seconds.
>>>>   
>>>>       
>>>>         
>>> However, it looks like screen drawing of a zone, by using the middle
>>> mouse button to zoom in and out is faster when using kbool, indeed
>>> considerably faster.
>>>
>>> Dick
>>>
>>>     
>>>       
>> Dick,
>> I committed the last boost::polygon version, from:
>> http://svn.boost.org/svn/boost/trunk/boost/polygon
>> boost::polygon might be in the 1.44 boost version (coming soon, I believe)
>>
>> This version seems fix some issues (at least one, critical for me)
>> Could you test it and see if artifacts are gone (I did not see such issues with my boards).
>>   
>>     
> NO change.  The artifacts are still there on the 1st complicated board
> (call it board1).
>
> I did try a less complicated board (call it board2).  However on board2,
> the Kbool library seems to no longer to work.  It is not filling a zone
> even after going away trying for 3 minutes.  The zone comes back empty,
> i.e. not filled.  Some kind of regression in my opinion even using the
> Kbool library.
>
> This board2 I made/built many months ago OK, and now I cannot get PCBNEW
> to even fill one of the zones, using Kbool build.  Are you sure the
> loading of the "zone parameters" from disk code is not broken or
> changed?  Or can there be a seriously gross memory leak?  There is no
> way on my super fast computer this little 4 layer board should take 3
> minutes to fill just *one* zone (empty!).  The board2 has about 4 zones
> in total.  Just before filling that one zone, I said "clear zone fill".
>
> The error is so gross it seems it should be easy to figure out what this
> regression is.
>
> I may have not started PCBNEW fresh to load board2, may have been
> bouncing back and forth between the boards from within the same session
> of PCBNEW.
>
>   
>> About screen drawing, I do not see why it is slow with boost.
>>   
>>     
> Still slow with the first (complicated board), even when showing only a
> single layer.
>
>   
>> Just i noticed boost creates slightly more corners than kbool.
>> (Perhaps links from the external polygon outline and its holes are slightly different)
>> The difference is very small (1 to 2 per cent) and cannot explain this issue.
>> But this difference could be sufficient to make you graphic card run out of its memory cache.
>> When happens (on my previous computer, it happened with the video board demo) the screen drawing
>> (for the given polygon that have too much corners) is considerably slower.
>>
>> Can you test it on an other board.
>>   
>>     
> On board2 the drawing speed is OK using boost, but I cannot say that the
> zone is filled correctly, because when I went to compare it to Kbool I
> discovered that Kbool build cannot even fill the zone after trying for 3
> minutes.
>
>
> Don't release anything yet.  :)
>
>
> If you cannot duplicate any of these kbool problems, I will have to go
> into a careful test mode and document my keystrokes, compare zones to
> old gerbers, try PCBNEW after a fresh load from disk, etc.  But this is
> a serious time commitment that I don't want to make if I don't have to. 
> You should start by looking at the basic Kbool functionality again on
> some of your old boards and see if you can induce strange fill behavior
> by doing reloads without exiting PCBNEW.
>
> Let me know if you cannot find any problems with the kbool build.  That
> is where I think we should focus at first, find this regression if it is
> one, or an old bug that was never discovered.  I am running a 64 bit
> build on stock Ubuntu Lucid using all standard package based libraries.
>   

I think I fixed the kbool zone fill problem in rev 2440.  Only the first
zone fill was working OK.

Dick





References