STEP exporter: check board outline continuity

This commit is contained in:
Maciej Suminski 2018-03-19 17:34:11 +01:00
parent a42aed3305
commit 33dcc080ea
1 changed files with 11 additions and 1 deletions

View File

@ -220,11 +220,21 @@ void DIALOG_EXPORT_STEP::onUpdateYPos( wxUpdateUIEvent& aEvent )
void DIALOG_EXPORT_STEP::onExportButton( wxCommandEvent& aEvent )
{
SHAPE_POLY_SET outline;
wxString msg;
// Check if the board outline is continuous
// TODO the check below is more forgiving than kicad2step, needs to be more strict
if( !m_parent->GetBoard()->GetBoardPolygonOutlines( outline, &msg ) )
{
DisplayErrorMessage( this, _( "Cannot determine the board outline." ), msg );
return;
}
wxFileName fn = m_filePickerSTEP->GetFileName();
if( fn.FileExists() )
{
wxString msg;
msg.Printf( _( "File '%s' already exists. Do you want overwrite this file?" ),
fn.GetFullPath().GetData() );