← Back to team overview

kicad-developers team mailing list archive

Re: "Close in" work in pcbnew

 

Dick Hollenbeck wrote:
> Jean-Pierre,
> 
> Today I had some "close in" work to do in PCBNEW, while aligning some 
> zone boundaries which were not on grid. I could not get the job done 
> effectively without the following change to the zoom factors and zoom 
> travel.
> 
> Please advise again the problem with the 5 entry. Maybe that can be 
> fixed, I'm game to help with it.

I'll take a shot at this one because I think it will be a bit easier for
me to explain without having to translate to English. I believe it has
to do with this bug <http://trac.wxwidgets.org/ticket/10446#comment:1>.
Because the PCBNEW uses 10000 pixels to represent one inch, it doesn't
take a very large board to get into the coordinate range to cause this
problem. When the zoom setting is 0.5, the coordinates are scaled by a
factor of 2 making the problem more likely to occur. I know what you
are thinking, I don't have any devices capable of displaying 0x90000
pixels of resolution. However, any bugs in the clipping rectangle
calculations could allow for coordinates in this range to be passed to
wxDC even though they would be drawn off the client rectangle. In
wxGTK, this is not a problem except for drawing speed. In wxMSW, your
reaching for the hardware reset button. This is what JP was trying to
warn me about when I mentioned using wxDC to do the drawing instead of
the code in gr_basic.cpp. I am reasonably sure that if the clipping and
coordinate translation is handled correctly, coordinate values that
cause this bug would never get passed to wxDC. You should only ever
have drawing coordinates within the client rectangle. I still need to
verify that wxDC is the way to go. However, the wxMSW bug really needs
to be addressed. That being said, I originally had 0.5 as a zoom level
and didn't see any problems on wxMSW. I used the video demo to validate
the zoom code and I didn't see any issues when zoomed in to 0.5. I hope
this helps.

Wayne

> 
> Dick
> 
> 
> This works for me:
> 
> 
> static const int PcbZoomList[] = { 5, 10, 15, 22, 30, 45, 70, 100, 150, 
> 220, 350, 500, 800, 1200,
> 2000, 3500, 5000, 20000 };
> 
> 
> in classpcb.cpp
> 
> 
> 
> 
> 
> ------------------------------------
> 
> Yahoo! Groups Links
> 
> 
> 
>

 




Follow ups

References