← Back to team overview

kicad-developers team mailing list archive

Re: specctra roundtripper

 

On 4/13/2012 5:12 PM, Dick Hollenbeck wrote:
> 
>> wxRound may be overkill but it does one important thing that will become
>> apparent when I commit the code that scales the PCB_SCREEN zoom factors
>> to work properly with nanometer internal units.  In debug builds,
>> wxRound tests if the floating point result is within INT_MIN and INT_MAX
>> and raises an assertion if it is not.  I found out that this assertion
>> occurs in the wxDC::LogicalToDevice() functions when zooming way out
>> when Pcbnew is compiled for nanometers.  This may not bode well for
>> nanometers until we change to a new device context such as OpenGL.  In
>> the interim, I will make the new file loader support both nanometer and
>> deci-mil internal units just in case.
>>
>> Wayne
> 
> You are going above and beyond the call of duty here.  Thank you for your efforts.
> 
> There is no expectation that you have to make PCBNEW work at nanometer resolution.  That
> is not in the current work package.
> 
> The UI stuff is clearly not in that work scope.

Actually this work kind of goes hand in hand with the refactoring of the
unit conversion functions.  I need to verify that the new file format
code can import to nanometer properly so it's helpful to see if things
are scaled correctly and user units are converted to and from
nanometers.  I don't plan on getting nanometer internal units working
but the clean up of the conversion functions is part of the work
package.  I still have to clean up the conversion from user to internal
unit functions and then I will finish up moving the Format() functions
into PCB_IO.  Once that is done and I make some of the suggest file
format improvements, I will turn my attention to loading the new file
format.

Wayne

> 
> The attached patch gets around the assert that you found.  But we need an assert in
> SetZoom() which traps bad values.  (Thank goodness for accessor use.  Here we see why they
> are useful.)
> 
> But there is more work here, and that is to be expected.  No need to panic, nor to do more
> than what would turn you into a pumpkin.  But we definitely want you looking like a squash.
> 
> Thanks tons for all your work,
> 
> Dick
> 
> 
> 
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp


References