X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com X-Mailer: exmh version 2.8.0 04/21/2012 (debian 1:2.8.0~rc1-2) with nmh-1.5 X-Exmh-Isig-CompType: repl X-Exmh-Isig-Folder: inbox From: karl AT aspodata DOT se To: geda-user AT delorie DOT com Subject: Re: [geda-user] Kicad converted fp with errors In-reply-to: References: <20171226160025 DOT 55A07804CEDF AT turkos DOT aspodata DOT se> Comments: In-reply-to gedau AT igor2 DOT repo DOT hu message dated "Tue, 26 Dec 2017 20:34:46 +0100." Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Message-Id: <20171226215129.7868C804CEE0@turkos.aspodata.se> Date: Tue, 26 Dec 2017 22:51:29 +0100 (CET) X-Virus-Scanned: ClamAV using ClamSMTP Reply-To: geda-user AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: geda-user AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk 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