Re: [Kicad-developers] [PATCH] Zoom to fit on empty canvas

2017-03-17 Thread Maciej Suminski
GAL tools do not perform any unit conversion. They work with the internal units, whatever they are, by calling Get/SetPosition() methods. I doubt there are other hardcoded conversions in the GAL code. The problem with the hardcoded scaling you see in the patch (and as a matter of fact, in the orig

Re: [Kicad-developers] [PATCH] Zoom to fit on empty canvas

2017-03-17 Thread Wayne Stambaugh
On 3/17/2017 3:06 AM, jp charras wrote: > Le 17/03/2017 à 00:32, José Ignacio a écrit : >> eeschema uses mils, which are exactly 25400 nanometers, eeschema can be >> losslessly converted to >> nanometers. Another advantage of using nm in eeschema would be that it would >> be possible to use >> ro

Re: [Kicad-developers] [PATCH] Zoom to fit on empty canvas

2017-03-17 Thread jp charras
Le 17/03/2017 à 00:32, José Ignacio a écrit : > eeschema uses mils, which are exactly 25400 nanometers, eeschema can be > losslessly converted to > nanometers. Another advantage of using nm in eeschema would be that it would > be possible to use > round metric quantities (right now it's impossibl

Re: [Kicad-developers] [PATCH] Zoom to fit on empty canvas

2017-03-16 Thread John Beard
On Fri, Mar 17, 2017 at 3:16 AM, Wayne Stambaugh wrote: > > Me neither. I've never been a big fan of compiling the same source code > file multiple times (see include/convert_to_bui.h) depending on a > definition specified at compile time. I would much rather see some type > of abstract class be

Re: [Kicad-developers] [PATCH] Zoom to fit on empty canvas

2017-03-16 Thread José Ignacio
eeschema uses mils, which are exactly 25400 nanometers, eeschema can be losslessly converted to nanometers. Another advantage of using nm in eeschema would be that it would be possible to use round metric quantities (right now it's impossible and confusing as numbers are rounded to the nearest mil)

Re: [Kicad-developers] [PATCH] Zoom to fit on empty canvas

2017-03-16 Thread Wayne Stambaugh
On 3/16/2017 3:03 PM, jp charras wrote: > Le 16/03/2017 à 11:21, John Beard a écrit : >> Hi JP, >> >> Thank for checking this. Internal units always confuse me, since >> they're always different and nothing in common can ever use anything >> to do with IUs, as they're only defined in some end exec

Re: [Kicad-developers] [PATCH] Zoom to fit on empty canvas

2017-03-16 Thread Jon Evans
Hi John, JP, I will take a look at how this would work with GerbView, hopefully later today. There is no worksheet item in GerbView, so we might want a more abstract idea of what the "default view" should be. For the units question, for sure this needs to be resolved, I don't have suggestions yet

Re: [Kicad-developers] [PATCH] Zoom to fit on empty canvas

2017-03-16 Thread jp charras
Le 16/03/2017 à 11:21, John Beard a écrit : > Hi JP, > > Thank for checking this. Internal units always confuse me, since > they're always different and nothing in common can ever use anything > to do with IUs, as they're only defined in some end executables. > > How should this be done correctly

Re: [Kicad-developers] [PATCH] Zoom to fit on empty canvas

2017-03-16 Thread John Beard
Hi JP, Thank for checking this. Internal units always confuse me, since they're always different and nothing in common can ever use anything to do with IUs, as they're only defined in some end executables. How should this be done correctly? Cheers, John On Thu, Mar 16, 2017 at 6:01 PM, jp char

Re: [Kicad-developers] [PATCH] Zoom to fit on empty canvas

2017-03-16 Thread jp charras
Le 16/03/2017 à 09:57, John Beard a écrit : > Hi, > > Here's a small patch to add a bounding box method to the worksheet > item, and use it to enable zoom to full sheet when the canvas is > empty. > > It's a rare thing to have an empty canvas, but it does annoy me when > testing things on a blank

[Kicad-developers] [PATCH] Zoom to fit on empty canvas

2017-03-16 Thread John Beard
Hi, Here's a small patch to add a bounding box method to the worksheet item, and use it to enable zoom to full sheet when the canvas is empty. It's a rare thing to have an empty canvas, but it does annoy me when testing things on a blank slate, as the current behaviour is a bit wierd (zoom to bot