This patch fixes a bug in the 'idfcyl' tool for generating IDF component
outlines.
Vertical cylindrical components with radial leads were rendered with twice
the requested diameter.

- Cirilo
=== modified file 'utils/idftools/idf_cylinder.cpp'
--- utils/idftools/idf_cylinder.cpp	2015-02-17 16:32:47 +0000
+++ utils/idftools/idf_cylinder.cpp	2015-04-09 00:13:14 +0000
@@ -350,9 +350,9 @@
         fprintf( fp, "0 0 0 0\n" );
 
         if( inch )
-            fprintf( fp, "0 %d 0 360\n", (int) (dia * 1000) );
+            fprintf( fp, "0 %d 0 360\n", (int) (dia * 500) );
         else
-            fprintf( fp, "0 %.3f 0 360\n", dia );
+            fprintf( fp, "0 %.3f 0 360\n", dia / 2.0 );
 
         fprintf( fp, ".END_ELECTRICAL\n" );
         fclose( fp );

_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp

Reply via email to