kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #21667
PATCH: bugfix for IDF export
The attached patch fixes the following bugs in the IDF export:
1. incorrect orientation of components on the bottom side of the board
when the #D model rotation is non-zero
2. failure to export when some components have no model set
- Cirilo
=== modified file 'pcbnew/exporters/export_idf.cpp'
--- pcbnew/exporters/export_idf.cpp 2015-08-23 21:37:01 +0000
+++ pcbnew/exporters/export_idf.cpp 2015-12-07 07:14:38 +0000
@@ -376,7 +376,8 @@
for( S3D_MASTER* modfile = aModule->Models(); modfile != 0; modfile = modfile->Next() )
{
- if( !modfile->Is3DType( S3D_MASTER::FILE3D_IDF ) )
+ if( !modfile->Is3DType( S3D_MASTER::FILE3D_IDF )
+ || modfile->GetShape3DFullFilename().empty() )
continue;
if( refdes.empty() )
@@ -408,7 +409,6 @@
if( top )
{
- rotz += modfile->m_MatRotation.z;
locy = -locy;
RotatePoint( &locx, &locy, aModule->GetOrientation() );
locy = -locy;
@@ -416,6 +416,7 @@
if( !top )
{
+ lrot = -lrot;
RotatePoint( &locx, &locy, aModule->GetOrientation() );
locy = -locy;
Follow ups