[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: pcb.git: branch: master updated (b3a6c586ba01ac53b706717b0e024633831638ce)
The branch, master has been updated
via b3a6c586ba01ac53b706717b0e024633831638ce (commit)
from f691333a25c36913415006a4f668cc2af05b0090 (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/change.c | 42 ++++++++++++++++++++++++++----------------
src/find.c | 4 ++--
2 files changed, 28 insertions(+), 18 deletions(-)
=================
Commit Messages
=================
commit b3a6c586ba01ac53b706717b0e024633831638ce
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>
Allow zero clearance pads and pins to touch polygons
This was already supported for vias, lets be consistent.
:100644 100644 95128d0... 21e2bd9... M src/change.c
:100644 100644 615659d... 5d2e92c... M src/find.c
=========
Changes
=========
commit b3a6c586ba01ac53b706717b0e024633831638ce
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>
Allow zero clearance pads and pins to touch polygons
This was already supported for vias, lets be consistent.
diff --git a/src/change.c b/src/change.c
index 95128d0..21e2bd9 100644
--- a/src/change.c
+++ b/src/change.c
@@ -531,7 +531,13 @@ ChangePinClearSize (ElementTypePtr Element, PinTypePtr Pin)
if (TEST_FLAG (LOCKFLAG, Pin))
return (NULL);
- value = MIN (MAX_LINESIZE, MAX (value, PCB->Bloat * 2 + 2));
+ value = MIN (MAX_LINESIZE, value);
+ if (value < 0)
+ value = 0;
+ if (Delta < 0 && value < PCB->Bloat * 2)
+ value = 0;
+ if ((Delta > 0 || Absolute) && value < PCB->Bloat * 2)
+ value = PCB->Bloat * 2 + 2;
if (Pin->Clearance == value)
return NULL;
RestoreToPolygon (PCB->Data, PIN_TYPE, Element, Pin);
@@ -586,21 +592,25 @@ ChangePadClearSize (ElementTypePtr Element, PadTypePtr Pad)
if (TEST_FLAG (LOCKFLAG, Pad))
return (NULL);
- value = MIN (MAX_LINESIZE, MAX (value, PCB->Bloat * 2 + 2));
- if (value <= MAX_PADSIZE && value >= MIN_PADSIZE && value != Pad->Clearance)
- {
- AddObjectToClearSizeUndoList (PAD_TYPE, Element, Pad, Pad);
- RestoreToPolygon (PCB->Data, PAD_TYPE, Element, Pad);
- ErasePad (Pad);
- r_delete_entry (PCB->Data->pad_tree, &Pad->BoundingBox);
- Pad->Clearance = value;
- /* SetElementBB updates all associated rtrees */
- SetElementBoundingBox (PCB->Data, Element, &PCB->Font);
- ClearFromPolygon (PCB->Data, PAD_TYPE, Element, Pad);
- DrawPad (Pad, 0);
- return (Pad);
- }
- return (NULL);
+ value = MIN (MAX_LINESIZE, value);
+ if (value < 0)
+ value = 0;
+ if (Delta < 0 && value < PCB->Bloat * 2)
+ value = 0;
+ if ((Delta > 0 || Absolute) && value < PCB->Bloat * 2)
+ value = PCB->Bloat * 2 + 2;
+ if (value == Pad->Clearance)
+ return NULL;
+ AddObjectToClearSizeUndoList (PAD_TYPE, Element, Pad, Pad);
+ RestoreToPolygon (PCB->Data, PAD_TYPE, Element, Pad);
+ ErasePad (Pad);
+ r_delete_entry (PCB->Data->pad_tree, &Pad->BoundingBox);
+ Pad->Clearance = value;
+ /* SetElementBB updates all associated rtrees */
+ SetElementBoundingBox (PCB->Data, Element, &PCB->Font);
+ ClearFromPolygon (PCB->Data, PAD_TYPE, Element, Pad);
+ DrawPad (Pad, 0);
+ return Pad;
}
/* ---------------------------------------------------------------------------
diff --git a/src/find.c b/src/find.c
index 615659d..5d2e92c 100644
--- a/src/find.c
+++ b/src/find.c
@@ -3823,7 +3823,7 @@ drc_callback (DataTypePtr data, LayerTypePtr layer, PolygonTypePtr polygon,
}
break;
case PAD_TYPE:
- if (pad->Clearance < 2 * PCB->Bloat)
+ if (pad->Clearance && pad->Clearance < 2 * PCB->Bloat)
if (IsPadInPolygon(pad,polygon))
{
AddObjectToFlagUndoList (type, ptr1, ptr2, ptr2);
@@ -3833,7 +3833,7 @@ drc_callback (DataTypePtr data, LayerTypePtr layer, PolygonTypePtr polygon,
}
break;
case PIN_TYPE:
- if (pin->Clearance < 2 * PCB->Bloat)
+ if (pin->Clearance && pin->Clearance < 2 * PCB->Bloat)
{
AddObjectToFlagUndoList (type, ptr1, ptr2, ptr2);
SET_FLAG (TheFlag, pin);
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs