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

Re: gEDA-user: pcb, howto get plain rats lines instead of circles



On Tue, 2008-10-07 at 23:46 -0700, Ben Jackson wrote:
> On Wed, Oct 08, 2008 at 07:56:27AM +0200, Bert Timmerman wrote:
> > 
> > I notice that both rat lines on the pads with circles (in C600 and C601)
> > have the "via" flag set.
> > 
> > I wonder, what could have triggered this ?
> 
> It's supposed to happen when you're over a rectangle in the target net.
> I added the feature a year ago.  I was planning to look into this bug
> tonight, but I didn't get a chance.  I'll see what I can do tomorrow.
> 
> From my quick test it seems to be due to 'IsPointInBox' having wholly
> unexpected behavior due to a rather bizzare implementation.  It turns
> the 'box' it gets as input into a pad and then calls the pad intersection.
> It looks like the code is broken if the box is wider than tall.  If you
> replace the rectangle in that b2.pcb someone sent out with a new one
> that's taller than wide, it works fine.

It also, rather horridly, doesn't appear to initialise the new pad
structure it makes. I've encountered platform differences before now as
to whether such memory ends up as 0, or random data:

  PadType pad;

  pad.Thickness = (box->X1 - box->X2); ASSIGN_FLAG (SQUAREFLAG, True,
&pad);
  if (pad.Thickness < 0)
    pad.Thickness = - pad.Thickness;
  pad.Point1.X = pad.Point2.X = (box->X1 + box->X2) / 2; 
  pad.Point1.Y = MIN (box->Y1, box->Y2) + pad.Thickness / 2; 
  pad.Point2.Y = MAX (box->Y1, box->Y2) - pad.Thickness / 2;

That leaves flags unknown (could start at any value),
ID, Bounding box, net, and Clearance all undefined.

-- 
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