GerbView export_to_pcbnew cleanups needed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
KiCad |
Expired
|
Wishlist
|
Bug Description
GerbView export_to_pcbnew works quite well, but makes some poor decisions and actually drops information.
Bugs / bad decisions :
In export_
int width = (aGbrItem->m_Size.x + aGbrItem->m_Size.y) / 2;
a) That average is guaranteed to be wrong on an oval pad.
Smarter is to use the _smaller_ (min) of Size.x and Size.y of the flashed pad.
The smaller size then allows b) to give a correct PADS shape, with hole co-ordinate, and has the same outcome on a round pad.
b) By doing the simple swap of Flash -> Via, that guarantees to _drop_ information on oval pads.
Smarter is to export the PAD as a Draw item and ALSO export the via, if decided.
c) Always doing Flash -> Via, results in Vias on SMD pads which is incorrect
Which leads to ...
Enhancements:
Problems: Present export_
Suggest instead :
1) When a Flash is found, export that as a Draw, to get correct outline, and _also_ check if to add a Via.
ie principle is all Gerber vectors should appear in PcbNew.
Right now, angled PADS _do_ export ok, as they do not flash, but 0/90' ones fail to import due to the flash-skip code.
2) Add a menu option, to extract VIA(hole) info _either_ from Flash(as now), or Drill File(new)
ie
[] extract Dia(via) from Flash(min) and hole(default)
[] extract Dia(via) from Flash(min) and hole(via) from Drill File
Using the Drill file, for Via decisions, has 2 benefits
i) You now easily _avoid_ the incorrect Via-on-SMD bug No drill -> no via, simple.
ii) You can tag the _correct_ hole size to the Via Drill
Some designs may not have drill info (rare), so keeping the old pathway covers that.
Untested/longer term ideas :
a) Missing, for now, from this is any Slot-support, because currently PCB New coughs on a via line with
(drill oval 1.05 0.65)
- since that probably can be fixed, export_
If PcbNew can also support Rect/Oval vias, that could further help such imports, but that may be more work than allowing slots-in-vias, which sounds easier to do.
b) Gerber files seem to be adding support for NET names.
If those NET names are present, export_
That should be a simple menu option adder ?
[] Export with NET names if present
For a test example that is not kiCad generated, see http://
tags: | added: gerbview |
Changed in kicad: | |
importance: | Undecided → Wishlist |
Changed in kicad: | |
assignee: | nobody → Jon Evans (craftyjon) |
milestone: | none → 6.0.0-rc1 |
Changed in kicad: | |
assignee: | Jon Evans (craftyjon) → nobody |
Didn't notice this was already in the tracker. I have a few parts of this that are in progress and this is is generally a good baseline.