From 2e04d4d6217fb017bcf0037b6dcba1e42e0a15f1 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 7 Dec 2015 10:22:09 +0100 Subject: [PATCH] Fix 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 --- pcbnew/exporters/export_idf.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pcbnew/exporters/export_idf.cpp b/pcbnew/exporters/export_idf.cpp index 0d1cf309ba..106bd15271 100644 --- a/pcbnew/exporters/export_idf.cpp +++ b/pcbnew/exporters/export_idf.cpp @@ -376,7 +376,8 @@ static void idf_export_module( BOARD* aPcb, MODULE* aModule, 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 @@ static void idf_export_module( BOARD* aPcb, MODULE* aModule, if( top ) { - rotz += modfile->m_MatRotation.z; locy = -locy; RotatePoint( &locx, &locy, aModule->GetOrientation() ); locy = -locy; @@ -416,6 +416,7 @@ static void idf_export_module( BOARD* aPcb, MODULE* aModule, if( !top ) { + lrot = -lrot; RotatePoint( &locx, &locy, aModule->GetOrientation() ); locy = -locy;