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

Re: gEDA-user: arcs in pcb



On Fri, 2010-01-29 at 09:00 -0600, Mark Rages wrote:

> Assuming: largest arc is 24 inches, and the desired precision 1e-5 inches.

A gentle very gentle curve would require more, but certainly the above
would be large enough for most of the applications I've seen for PCBs
which have rotational symmetry.

Arguably we can get away with quite a bit less precision for large
geometry parts. 1e-4" would probably be fine, if not 1e-3".

> Then the precision of the smallest angle is (1e-5)/24 radians or
> 2.38*10-5 degrees.  To be safe, the new units should be millionths of
> a degree, so one revolution is 360000000.  Sounds good?  Or a

The maximum of a 32bit (signed) integer is:

2147483647
 360000000

So that wouldn't have an issue representing the number.

> double-precision floating-point would maintain more than sufficient
> accuracy over the (0,360] range.

Try to avoid floating point for storage.

> > Other alternatives included adding an additional arc representation,
> > defined by end-points in the usual PCB coordinates, and a third
> > parameter, either a radius, curvature or a third point on the arc. (for
> > example).
> 
> These are all equivalent within their precisions, right?  I think I'll
> stick with what we use now because dxflib seems to work this way
> (except using the normal X-Y directions) and we've pretty much got the
> geometry worked out for this.  No need to open a new can of worms.

Well - it makes a more natural definition of the arc in some cases.
End-points + curvature / radius is directly intelligible when reading
the PCB file in terms of the end-points. The precision ought to be
similar.

The extra coordinate method would be 2x integers, so has extra precision
- although is probably not as nice a representation for other reasons.





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