Step exporter: avoid crash when the board to export has not closed outlines.
This commit is contained in:
parent
30c2ca67d9
commit
63471d861d
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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() )
|
||||
|
|
Loading…
Reference in New Issue