← Back to team overview

kicad-developers team mailing list archive

Re: Grid origin proof of concept

 

Lorenzo wrote:
> I uploaded the file gridorigin-r2010.diff.gz 
> 
> Only slightly tested (but is a really simple patch anyway).
> 
> Notes:
> - I added the tool under the aux axis tool, with the same icon. It could be put under the show grid button maybe. With a new icon :P
> - There may be some fuzz in the patch because I also have other in house modifications. Please note in pcbnew/tool_pcb there are some AddSeparator tagged to removal; I kept it to avoid invalidating the patch (I removed separators to be able the use the 800x480 screen on the EEE);

Removing these separators will make the toolbars on Windows look
terrible. I just add separators to the auxiliary horizontal toobar in
PCBNew because the comboboxes are too crowded. They look fine on Linux
with out the separators. These may need to be added depending on the
system and/or display size. Yuck!

> - I flagged the m_UserGridIsON. It seems to be unused;
> - The juice of the computation is in common/zoom.cpp. That seems to be the only place involved with grid computations;

This where the grid setting takes place when you select the grid size
from the popup menu and and snapping the cursor to the grid code
resides. In PCBNew, there is also the event handlers that select the
grid from the tool bar combobox that call down to
WinEDA_DrawFrame::OnSelectGrid(). The actual grid drawing code is in
performed in WinEDA_DrawPanel::DrawBackGround() in common/drawpanel.cpp.
I am in the process of cleaning this up so that there is only one event
handler to update the grid size no matter what action was used to select
the grid size.

Wayne

> - The origin is not saved in the .brd file. I'm not sure if it could be useful... anyway I thing pcbnew/ioascii.cpp is the place to look into for it.
> 
> Hope to make Dick and other people happy :P (I'm already using this :D)
> 
> 
> 
> 
> ------------------------------------
> 
> Yahoo! Groups Links
> 
> 
> 
> 

 




References