kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #14285
PATCH: fix 'invalid placement' warnings in IDF export
The attached patch fixes a warning in the IDF export
and makes a warning message more useful.
In the case of through-hole components I was not setting
the 'placement' attribute; this resulted in numerous
warnings when the IDF file was written. The IDF exporter
no longer spams the console.
- Cirilo
=== modified file 'pcbnew/exporters/export_idf.cpp'
--- pcbnew/exporters/export_idf.cpp 2014-06-24 16:17:18 +0000
+++ pcbnew/exporters/export_idf.cpp 2014-08-14 04:38:04 +0000
@@ -443,6 +443,9 @@
comp->SetPosition( aModule->GetPosition().x * scale + dx,
-aModule->GetPosition().y * scale + dy,
rotz, IDF3::LYR_BOTTOM );
+
+ comp->SetPlacement( IDF3::PS_ECAD );
+
}
else
{
=== modified file 'utils/idftools/idf_parser.cpp'
--- utils/idftools/idf_parser.cpp 2014-08-03 07:48:41 +0000
+++ utils/idftools/idf_parser.cpp 2014-08-14 04:29:44 +0000
@@ -728,7 +728,8 @@
if( aPlacement == PS_INVALID )
{
- ERROR_IDF << "placement invalid; defaulting to PLACED\n";
+ ERROR_IDF << "placement invalid (" << aRefDes << ":";
+ std::cerr << aPlacement << "); defaulting to PLACED\n";
aPlacement = PS_PLACED;
}