Andrew Poelstra wrote:
1m to the edge of the board, 1m from the center of the footprint (positioned at the edge of the board) outwards. If you don't adhere to that, the outer pins of the footprintWhen 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 maximumBut 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.
will turn up at the opposite side of the board (because of overflow).
It's still possible to design a 2x2m board when the coordinate center is in the middle of the board. It is also possible, to do some offset on IO and show only positive numbers to the user. And one can limit footprint sizes more and add that to board dimesions. If you use unsigned ints for coordinates and signed for offsets, you have to make sure, no negative number results from subtracting, meaning you might shift the valid range of center-coordinate for footprints to 1/4*UINT_MAX to 3/4*UINT_MAX internally. Then again, this is clumsy, so stick to signed int and [1/2*INT_MIN .. 1/2*INT_MAX].Having said that, I still want negative coordinates. So do we need to limit things to 1m? Yuck.
_______________________________________________ geda-user mailing list geda-user@xxxxxxxxxxxxxx http://www.seul.org/cgi-bin/mailman/listinfo/geda-user