[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-user: DRC check workaround for outline layer
This is probably not something we'd commit as is to PCB, as for some
cases, DRC warnings on the outline layer could be useful, but Bdale was
looking for something along these lines on IRC yesterday.
I'm not sure if I've caught all cases, but a simple test suggested it
might have the desired effect.
NB: You WONT get warnings if your outline touches / cuts off any parts!
Best regards,
--
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!)
Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me)
From 4c8090947c43d3fa0a04cc47d4115cc20b534586 Mon Sep 17 00:00:00 2001
From: Peter Clifton <pcjc2@xxxxxxxxx>
Date: Tue, 23 Nov 2010 15:32:47 +0000
Subject: [PATCH] Disable DRC checks on "outline" and "route" layers
---
src/find.c | 8 ++++++++
src/misc.c | 8 ++++++++
src/misc.h | 2 ++
3 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/src/find.c b/src/find.c
index c478f7f..efd3ebf 100644
--- a/src/find.c
+++ b/src/find.c
@@ -826,6 +826,9 @@ LookupLOConnectionsToPVList (bool AndRats)
/* now all lines, arcs and polygons of the several layers */
for (layer = 0; layer < max_copper_layer; layer++)
{
+ if (is_layer_mechanical (LAYER_PTR (layer)))
+ continue;
+
info.layer = layer;
/* add touching lines */
if (setjmp (info.env) == 0)
@@ -3994,6 +3997,9 @@ DRCAll (void)
{
COPPERLINE_LOOP (PCB->Data);
{
+ if (is_layer_mechanical (layer))
+ continue;
+
/* check line clearances in polygons */
PlowsPolygon (PCB->Data, LINE_TYPE, layer, line, drc_callback);
if (IsBad)
@@ -4039,6 +4045,8 @@ DRCAll (void)
{
COPPERARC_LOOP (PCB->Data);
{
+ if (is_layer_mechanical (layer))
+ continue;
PlowsPolygon (PCB->Data, ARC_TYPE, layer, arc, drc_callback);
if (IsBad)
break;
diff --git a/src/misc.c b/src/misc.c
index faeefa8..86866b2 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -2214,6 +2214,14 @@ ElementOrientation (ElementType *e)
return dy > 0 ? 3 : 1;
}
+bool is_layer_mechanical (LayerType *layer)
+{
+ if (strcmp (layer->Name, "outline") == 0 ||
+ strcmp (layer->Name, "route") == 0)
+ return true;
+ return false;
+}
+
int
ActionListRotations(int argc, char **argv, int x, int y)
{
diff --git a/src/misc.h b/src/misc.h
index bb88a21..b11db0b 100644
--- a/src/misc.h
+++ b/src/misc.h
@@ -123,6 +123,8 @@ char * GetInfoString (void);
comparing two similar footprints. */
int ElementOrientation (ElementType *e);
+bool is_layer_mechanical (LayerType *layer);
+
/* These are in netlist.c */
void NetlistChanged (int force_unfreeze);
--
1.7.1
_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user