Comment 14 for bug 1661705

Revision history for this message
Wayne Stambaugh (stambaughw) wrote : Re: [Bug 1661705] Re: Integer overflow in gerber export and 3d viewer

On 3/8/2018 11:56 AM, jean-pierre charras wrote:
> 1 - The coordinates are from -2147.483648mm to 2147.483648mm.
> But I talked about a board, not coordinates.
> This is a bit different.
> For instance in some calculations, we calculate absolute values, therefore 0 to 2147.483648
> and a diagonal distance limits coordinates to 0 to 2147.483648/1.414 = 1.6m

The question is, should we be doing this or should we be working in 64
bits and then checking for overflows to 32 bits? Either that or we
clamp the drawing area to (2^32)/4 to leave enough room for 32-bit
calculations. We should take a look at this in v6 since technically
this is a bug.

>
> This is the reason I am thinking a board is (roughly) limited to 1m x 1m
>
> 2 - In this case, a text located at -2147.483648 mm cannot be correctly draw because segments drawn to create the text shape can have smaller y coordinates.
> We need a margin around the x and y text coordinates
>
> I also am thinking this is a board file modified by hand.
>