← Back to team overview

kicad-developers team mailing list archive

Re: patch for IDFv3 component library support

 

----- Original Message -----

> From: jp charras <jp.charras@xxxxxxxxxx>
> To: kicad-developers@xxxxxxxxxxxxxxxxxxx; "cirilo_bernardo@xxxxxxxxx >> Cirilo Bernardo" <cirilo_bernardo@xxxxxxxxx>
> Cc: 
> Sent: Sunday, January 26, 2014 2:49 AM
> Subject: Re: [Kicad-developers] patch for IDFv3 component library support
> 
> Le 25/01/2014 04:01, Cirilo Bernardo a écrit :
> 
>>  Hi folks,
>> 
>>   I have pushed a patch to my github patches project
>>   (git clone https://github.com/cbernardo/kicad-patches.git)
>> 
>>   The patch name is export_idf3_libs.patch and was created against Rev 4632.
>>   The patch adds IDFv3 component library support; the addition of this 
> feature
>>   provides users with the IDF support required for interaction with 
> mechanical
>>   designers.
> 
> <Skipped ...>
> 
> I committed you patch.
> Thanks.
> 
> I am able to import IDF files with Top Solid.
> 
> FreeCAD reads these files, but does not show anything.
> 
> This is certainly a FreeCAD bug.
> However, could you have a look about this.
> Perhaps there is just a missing info in IDF files.
> FreeCAD seems to be the only one FOSS MCAD tool which is able to read
> IDF (*.emn) files.
> (If you know an other FOSS MCAD tool which reads IDF files, let me know)
> 
> Thanks.
> 
> -- 
> Jean-Pierre CHARRAS
> 

I have confirmed that it is a bug in FreeCAD:

File "/home/cirilo/usr/local/Mod/Idf/Idf.py", line 245, in process_emp
if emprecords[0][0:4]==".END":

File "/home/cirilo/usr/local/Mod/Idf/Idf.py", line 92, in process_emn
if emnrecords[0][0:4]==".END":

An exception is thrown because each line in the *.emn and *.emp file is
assumed to be at least 4 characters long. The blank lines in the IDF files
generated cause the Python script to throw an exception. The IDFv3
specification is silent on the topic of blank lines and the examples
have no blank lines; I included the blanks to enhance human readability
but I can remove them if that is preferred.

The FreeCAD script has many other bugs though, for example assuming that
'END' is capitals when the specification explicitly states it is not
case sensitive.

- Cirilo



Follow ups

References