[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: pcb, how to remove mm garbage (very short lines)?



On Wed, 2008-11-19 at 16:35 -0500, DJ Delorie wrote:

> > We would presumably store value and units.
> 
> I won't contemplate this without some C++ class hiding the ugly
> details.  I've seen a magazine article about it, there are ways to do
> it right that are clean and easy to understand.  The below example is
> not it ;-)
> 
> > point->x.value = 1000000;
> > point->x.unit  = PCB_UNIT_NM;

Sure, it was somewhat of a quick elaboration rather than any definitive
suggestion. You could do it with operator overloading in C++, but it
wouldn't be the only way possibly.

If you could find a link to the magazine article, I'd be interested in
reading it though.

I suspect the problem is similar to that of parametric CAD systems.
(Assuming those don't all work in a common internal coordinate system).
What we're talking of is probably tangentially related to libraries
which perform arbitrary precision arithmetic.

Realistically though, PCB is precise enough for what most people need.
As you said, we might just need some heuristics to fix-up annoying track
segments so no-one notices the underlying details.

It might also be nice to maintain a quoted tolerance which is somewhat
slacker than our internal units, then we can do things like ensuring in
the GUI, we round 3.9999mm up to 4.00mm if that is the nearest
coordinate within tolerance for the current coordinate system selected.



-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)



_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user