On Tue, Oct 12, 2010 at 12:10:36PM +0200, Armin Faltl wrote: > DJ Delorie wrote: > >On Mon, 2010-10-11 at 15:25 -0700, Andrew Poelstra wrote: > >>I think we want to allow negative locations. It would be nice to set parts > >>outside of the pcb boundary, for example when initially placing everything. > > > >We limit ourselves to half so that *distances* can fit in a signed > >same-size value. The range of computable distances on a board will > >always be twice the range of coordinates. More if you do 2-D distance, > >but we can use floating point there (we'd be doing a sqrt() anyway) > When using signed integers for coordinates and offsets (vectors), by > restricting to the > positive quadrant, allowing a 2x2m board will still yield a 32-bit > overflow, if you try > to place a large footprint at the right edge of the board. So I > think forbidding negative > board coordinates doesn't guard against anything. If one wants to > enforce range-savety, > the boards and footprints better be +-1m maximum. >
But if we limited everything to 2m, using unsigned integers, we'd be okay with 32 bits. I'm not sure what you're saying here. Having said that, I still want negative coordinates. So do we need to limit things to 1m? Yuck. > Personally I favour 32-bit integers on 32-bit machines, because I > think that 64-bit > emulation must be at least 3x slower than native ops. Enable 64-bit > coords on 32-bit machines > with a configure flag. On 64-bit machines of course 64-bit, since 32 > is probably slower. > s > Well, ``probably slower'' isn't a good reason for anything. I doubt your speculation on both 32- and 64-bit machines, so testing will need to be done. Andrew _______________________________________________ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user