PCB20100929 corrupts element
Bug #699333 reported by
eschabor
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pcb |
Fix Released
|
Medium
|
Unassigned |
Bug Description
The attached element (250mOhm 4 terminal resistor) became corrupted following autorouting and trace optimisation with PCB20100929.
Loading the .pcb file in a text editor shows that the element ResCu250mOhm is present and has the correct number of pads, but some of the pads have had their
coordinates randomised.
Changed in pcb: | |
milestone: | future-bug-release → next-bug-release |
Changed in pcb: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
The bug is in djopt.c in function padcleaner() type[l- >layer] != layerflag)
continue;
padcleaner() is intended to remove unnecessary traces that are fully enclosed inside element pads.
Unfortunately the problem element confuses padcleaner() with the result that padcleaner() considers a pad itself to be an unnecessary trace and nukes it.
The following patch solves the problem:
diff --git a/src/djopt.c b/src/djopt.c
index 240b86b..7a1a315 100644
--- a/src/djopt.c
+++ b/src/djopt.c
@@ -2851,6 +2851,9 @@ padcleaner ()
if (layer_
+ if (p == l->line)
empty_rect (&r);
add_point_ to_rect (&r, p->Point1.X, p->Point1.Y,
+ continue;
+
close = p->Thickness / 2 + 1;