Mail Archives: geda-user/2017/12/26/16:54:01
Igor2:
> On Tue, 26 Dec 2017, karl AT aspodata DOT se wrote:
>
> > Eg.
> > http://www.gedasymbols.org/user/erich_heinzle/kicad/footprints/Transistor_TO-220_RevB_03Sep2012.mod/TO-220_Bipolar-BCE_Vertical_LargePads.fp
> >
> > gives me:
> >
> > ERROR parsing file 'TO-220_Bipolar-BCE_Vertical_LargePads.fp'
> > line: 41
> > description: 'Unknown flag: "" ignored'
> > ERROR parsing file 'TO-220_Bipolar-BCE_Vertical_LargePads.fp'
> > line: 44
> > description: 'Unknown flag: "" ignored'
> > ERROR parsing file 'TO-220_Bipolar-BCE_Vertical_LargePads.fp'
> > line: 47
> > description: 'Unknown flag: "" ignored'
> >
> > It is probably due to the empty flag before onsolder:
> >
> > $ grep -n ,ons TO-220_Bipolar-BCE_Vertical_LargePads.fp
> > 41:Pad[0 -3545 0 3545 6690 2000 7490 "" "C" ",onsolder"]
> > 44:Pad[-10000 -3545 -10000 3545 6690 2000 7490 "" "B" ",onsolder"]
> > 47:Pad[10000 -3545 10000 3545 6690 2000 7490 "" "E" ",onsolder"]
> > $
>
> Thank you, fixed in r13662.
It seems that that file wasn't the only one:
$ find /Net/cvs/cvs.gedasymbols.org/www/user/erich_heinzle/kicad/footprints/ -type f -print0 | xargs -0 fgrep '",onsolder' | wc -l
3609
$
so the problem is probably in the converter code, something in
https://github.com/erichVK5/KicadModuleToGEDA/blob/master/Pad.java
or more precisely here:
$ fgrep -B3 -n ,onsolder Pad.java
681- '"' +
682- oblongSlotFlag;
683-
684: bottomLayerPad = topLayerPad + ",onsolder";
--
722- '"' +
723- oblongSlotFlag;
724-
725: bottomLayerPad = topLayerPad + ",onsolder";
--
855- '"' +
856- oblongSlotFlag;
857-
858: bottomLayerPad = topLayerPad + ",onsolder";
--
885- '"' +
886- oblongSlotFlag;
887-
888: bottomLayerPad = topLayerPad + ",onsolder";
If the oblongSlotFlag is empty, it will output ",onsolder" which neither
pcb nor pcb-rnd like.
It defaults to: String oblongSlotFlag = ""; in line 401
and is set (line 459..470):
case 'R': if (kicadPadAttributeType.startsWith("STD")) // = plate through
{
if (equilateralPad) // it is square, let it be square
{
gEDAflag = "square"; // "0x0100" now deprecated
}
else
{
gEDAflag = ""; // make obroid pad pins rounded
}
// i.e. we don't want "square" set for square ended obroid pads
oblongSlotFlag = "square";
thought in line 750 it is reset to the default value under specific
conditions:
if (((kicadDrillSlotWidthNm - kicadDrillOneXoffsetNm) != 0) && ((kicadDrillSlotHeightNm - kicadDrillOneYoffsetNm) != 0)) // we capture (hmm, not diagonal, if slot not rotated) slots here
{
oblongSlotFlag = ""; // and make the slot ends rounded != "square"
// i'm starting to think this only rounds off the ends for all slots
}
The obvious thing to do is to change theese:
bottomLayerPad = topLayerPad + ",onsolder";
to:
if (oblongSlotFlag == "") {
bottomLayerPad = topLayerPad + "onsolder";
} else {
bottomLayerPad = topLayerPad + ",onsolder";
}
or something like that that actually works (I don't know to
compare strings in java).
Regards,
/Karl Hammar
-----------------------------------------------------------------------
Aspö Data
Lilla Aspö 148
S-742 94 Östhammar
Sweden
+46 173 140 57
- Raw text -