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

gEDA-cvs: pcb.git: branch: master updated (6d03d0539e0afd51383f11fd6b06ec7ced0fbf12)



The branch, master has been updated
       via  6d03d0539e0afd51383f11fd6b06ec7ced0fbf12 (commit)
      from  a096a8b84c1d0e2beb94a859bde9f2bc2799fe73 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


=========
 Summary
=========

 src/djopt.c |   30 ++++++++++++++++++++++++++++++
 1 files changed, 30 insertions(+), 0 deletions(-)


=================
 Commit Messages
=================

commit 6d03d0539e0afd51383f11fd6b06ec7ced0fbf12
Author: Stephen Ecob <silicon.on.inspiration@xxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>

    Fix Freckles
    
    The autorouter sometimes ends a trace just past a pad.  The optimizer
    cuts this trace at the pad center, leaving a tiny trace left over.
    This tiny trace is a "freckle" and it inhibits mitering.  Check
    for such freckles and remove them.

:100644 100644 68b3641... c8ae961... M	src/djopt.c

=========
 Changes
=========

commit 6d03d0539e0afd51383f11fd6b06ec7ced0fbf12
Author: Stephen Ecob <silicon.on.inspiration@xxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>

    Fix Freckles
    
    The autorouter sometimes ends a trace just past a pad.  The optimizer
    cuts this trace at the pad center, leaving a tiny trace left over.
    This tiny trace is a "freckle" and it inhibits mitering.  Check
    for such freckles and remove them.

diff --git a/src/djopt.c b/src/djopt.c
index 68b3641..c8ae961 100644
--- a/src/djopt.c
+++ b/src/djopt.c
@@ -75,6 +75,9 @@ RCSID ("$Id$");
 #define ORIENT(x) ((x) & 0xf0)
 #define DIRECT(x) ((x) & 0x0f)
 
+/* Manhattan length of the longest "freckle" */
+#define LONGEST_FRECKLE	2
+
 struct line_s;
 
 typedef struct corner_s
@@ -1230,6 +1233,33 @@ simple_optimize_corner (corner_s * c)
 	}
     }
   check (c, 0);
+  if (c->n_lines == 1 && !c->via)
+    {
+      corner_s *c0 = other_corner (c->lines[0], c);
+      if (abs(c->x - c0->x) + abs(c->y - c0->y) <= LONGEST_FRECKLE)
+	{
+          /*
+           * Remove this line, as it is a "freckle".  A freckle is an extremely
+           * short line (around 0.01 thou) that is unconnected at one end.
+           * Freckles are almost insignificantly small, but are annoying as
+           * they prevent the mitering optimiser from working.
+           * Freckles sometimes arise because of a bug in the autorouter that
+           * causes it to create small overshoots (typically 0.01 thou) at the
+           * intersections of vertical and horizontal lines. These overshoots
+           * are converted to freckles as a side effect of canonicalize_line().
+           * Note that canonicalize_line() is not at fault, the bug is in the
+           * autorouter creating overshoots.
+           * The autorouter bug arose some time between the 20080202 and 20091103
+           * releases.
+           * This code is probably worth keeping even when the autorouter bug is
+           * fixed, as "freckles" could conceivably arise in other ways.
+           */
+	  dprintf ("freckle %d,%d to %d,%d\n",
+		   c->x, c->y, c0->x, c0->y);
+	  move_corner (c, c0->x, c0->y);
+	}
+    }
+  check (c, 0);
   return rv;
 }
 




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