diff --git a/utils/kicad2step/kicad2step.cpp b/utils/kicad2step/kicad2step.cpp index ffc66a33e0..cca0f8cfa1 100644 --- a/utils/kicad2step/kicad2step.cpp +++ b/utils/kicad2step/kicad2step.cpp @@ -387,7 +387,14 @@ int PANEL_KICAD2STEP::RunConverter() { ReportMessage( "Build STEP data\n" ); - pcb.ComposePCB( m_params.m_includeVirtual ); + res = pcb.ComposePCB( m_params.m_includeVirtual ); + + if( !res ) + { + ReportMessage( "\n**Error building STEP board model. Abort export **\n" ); + return -1; + } + ReportMessage( "Write STEP file\n" ); #ifdef SUPPORTS_IGES @@ -399,7 +406,7 @@ int PANEL_KICAD2STEP::RunConverter() if( !res ) { - wxMessageBox( "Error Write STEP file" ); + ReportMessage( "\nError Write STEP file\n" ); return -1; } } @@ -437,7 +444,7 @@ int PANEL_KICAD2STEP::RunConverter() { if( !success ) msg = "Unable to create STEP file.\n" - "Check that the board has a valid outline and models."; + "Check that the board has a valid outline and models."; else { msg = "STEP file has been created, but there are warnings."; diff --git a/utils/kicad2step/pcb/oce_utils.cpp b/utils/kicad2step/pcb/oce_utils.cpp index 3537a61b30..581dbd3d0b 100644 --- a/utils/kicad2step/pcb/oce_utils.cpp +++ b/utils/kicad2step/pcb/oce_utils.cpp @@ -762,6 +762,11 @@ bool PCBMODEL::CreatePCB() } } } + else + { + ReportMessage( "* could not create closed board outlines *\n" ); + return false; + } // subtract cutouts (if any) if( m_cutouts.size() )