2016-09-02 10:08:40 +00:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2016 Cirilo Bernardo <cirilo.bernardo@gmail.com>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, you may find one here:
|
|
|
|
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|
|
|
* or you may search the http://www.gnu.org website for the version 2 license,
|
|
|
|
* or you may write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
2019-04-15 17:09:27 +00:00
|
|
|
#include "kicadpcb.h"
|
|
|
|
|
|
|
|
#include "kicadcurve.h"
|
|
|
|
#include "kicadmodule.h"
|
|
|
|
#include "oce_utils.h"
|
|
|
|
|
|
|
|
#include <sexpr/sexpr.h>
|
|
|
|
#include <sexpr/sexpr_parser.h>
|
|
|
|
|
2016-09-02 10:08:40 +00:00
|
|
|
#include <wx/filename.h>
|
|
|
|
#include <wx/log.h>
|
|
|
|
#include <wx/stdpaths.h>
|
2018-09-20 09:05:52 +00:00
|
|
|
#include <wx/textctrl.h>
|
2019-04-15 17:09:27 +00:00
|
|
|
#include <wx/utils.h>
|
|
|
|
|
2016-09-02 10:08:40 +00:00
|
|
|
#include <iostream>
|
2019-04-15 17:09:27 +00:00
|
|
|
#include <memory>
|
2016-09-02 10:08:40 +00:00
|
|
|
#include <sstream>
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
|
2018-09-20 09:05:52 +00:00
|
|
|
#include <wx/wxcrtvararg.h>
|
|
|
|
|
2016-09-02 10:08:40 +00:00
|
|
|
/*
|
|
|
|
* GetKicadConfigPath() is taken from KiCad's common.cpp source:
|
|
|
|
* Copyright (C) 2014-2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
|
|
|
* Copyright (C) 2008-2015 Wayne Stambaugh <stambaughw@verizon.net>
|
|
|
|
* Copyright (C) 1992-2015 KiCad Developers
|
|
|
|
*/
|
|
|
|
static wxString GetKicadConfigPath()
|
|
|
|
{
|
|
|
|
wxFileName cfgpath;
|
|
|
|
|
|
|
|
// From the wxWidgets wxStandardPaths::GetUserConfigDir() help:
|
|
|
|
// Unix: ~ (the home directory)
|
|
|
|
// Windows: "C:\Documents and Settings\username\Application Data"
|
|
|
|
// Mac: ~/Library/Preferences
|
|
|
|
cfgpath.AssignDir( wxStandardPaths::Get().GetUserConfigDir() );
|
|
|
|
|
|
|
|
#if !defined( __WINDOWS__ ) && !defined( __WXMAC__ )
|
|
|
|
wxString envstr;
|
|
|
|
|
2016-09-21 23:03:00 +00:00
|
|
|
if( !wxGetEnv( "XDG_CONFIG_HOME", &envstr ) || envstr.IsEmpty() )
|
2016-09-02 10:08:40 +00:00
|
|
|
{
|
|
|
|
// XDG_CONFIG_HOME is not set, so use the fallback
|
2016-09-21 23:03:00 +00:00
|
|
|
cfgpath.AppendDir( ".config" );
|
2016-09-02 10:08:40 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// Override the assignment above with XDG_CONFIG_HOME
|
|
|
|
cfgpath.AssignDir( envstr );
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2016-09-21 23:03:00 +00:00
|
|
|
cfgpath.AppendDir( "kicad" );
|
2016-09-02 10:08:40 +00:00
|
|
|
|
|
|
|
if( !cfgpath.DirExists() )
|
|
|
|
{
|
|
|
|
cfgpath.Mkdir( wxS_DIR_DEFAULT, wxPATH_MKDIR_FULL );
|
|
|
|
}
|
|
|
|
|
|
|
|
return cfgpath.GetPath();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2018-10-02 06:34:07 +00:00
|
|
|
KICADPCB::KICADPCB()
|
2016-09-02 10:08:40 +00:00
|
|
|
{
|
|
|
|
wxFileName cfgdir( GetKicadConfigPath(), "" );
|
|
|
|
cfgdir.AppendDir( "3d" );
|
|
|
|
m_resolver.Set3DConfigDir( cfgdir.GetPath() );
|
|
|
|
m_thickness = 1.6;
|
2018-10-02 06:34:07 +00:00
|
|
|
m_pcb_model = nullptr;
|
2018-06-19 08:14:10 +00:00
|
|
|
m_minDistance = MIN_DISTANCE;
|
2016-09-04 07:08:56 +00:00
|
|
|
m_useGridOrigin = false;
|
|
|
|
m_useDrillOrigin = false;
|
|
|
|
m_hasGridOrigin = false;
|
|
|
|
m_hasDrillOrigin = false;
|
2016-09-02 10:08:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
KICADPCB::~KICADPCB()
|
|
|
|
{
|
|
|
|
for( auto i : m_modules )
|
|
|
|
delete i;
|
|
|
|
|
|
|
|
for( auto i : m_curves )
|
|
|
|
delete i;
|
|
|
|
|
2018-10-02 06:34:07 +00:00
|
|
|
delete m_pcb_model;
|
2016-09-02 10:08:40 +00:00
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool KICADPCB::ReadFile( const wxString& aFileName )
|
|
|
|
{
|
|
|
|
wxFileName fname( aFileName );
|
|
|
|
|
|
|
|
if( fname.GetExt() != "kicad_pcb" )
|
|
|
|
{
|
2018-09-20 09:05:52 +00:00
|
|
|
ReportMessage( wxString::Format( "expecting extension kicad_pcb, got %s\n", fname.GetExt() ) );
|
2016-09-02 10:08:40 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
if( !fname.FileExists() )
|
|
|
|
{
|
2018-09-20 09:05:52 +00:00
|
|
|
ReportMessage( wxString::Format( "No such file: %s\n", aFileName ) );
|
2016-09-02 10:08:40 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
fname.Normalize();
|
2018-09-20 09:05:52 +00:00
|
|
|
m_filename = fname.GetFullPath();
|
2016-09-02 10:08:40 +00:00
|
|
|
m_resolver.SetProjectDir( fname.GetPath() );
|
|
|
|
|
|
|
|
try
|
|
|
|
{
|
|
|
|
SEXPR::PARSER parser;
|
|
|
|
std::string infile( fname.GetFullPath().ToUTF8() );
|
2018-03-19 09:02:05 +00:00
|
|
|
std::unique_ptr<SEXPR::SEXPR> data( parser.ParseFromFile( infile ) );
|
2016-09-02 10:08:40 +00:00
|
|
|
|
2018-03-19 09:02:05 +00:00
|
|
|
if( !data )
|
2016-09-02 10:08:40 +00:00
|
|
|
{
|
2018-09-20 09:05:52 +00:00
|
|
|
ReportMessage( wxString::Format( "No data in file: %s\n", aFileName ) );
|
2016-09-02 10:08:40 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2018-03-19 09:02:05 +00:00
|
|
|
if( !parsePCB( data.get() ) )
|
2016-09-02 10:08:40 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
catch( std::exception& e )
|
|
|
|
{
|
2018-09-20 09:05:52 +00:00
|
|
|
ReportMessage( wxString::Format( "error reading file: %s\n%s\n", aFileName, e.what() ) );
|
2016-09-02 10:08:40 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
catch( ... )
|
|
|
|
{
|
2018-09-20 09:05:52 +00:00
|
|
|
ReportMessage( wxString::Format( "unexpected exception while reading file: %s\n", aFileName ) );
|
2016-09-02 10:08:40 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2018-09-11 07:23:11 +00:00
|
|
|
bool KICADPCB::WriteSTEP( const wxString& aFileName )
|
2016-09-02 10:08:40 +00:00
|
|
|
{
|
2018-10-02 06:34:07 +00:00
|
|
|
if( m_pcb_model )
|
2016-09-02 10:08:40 +00:00
|
|
|
{
|
2018-10-02 06:34:07 +00:00
|
|
|
return m_pcb_model->WriteSTEP( aFileName );
|
2016-09-02 10:08:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef SUPPORTS_IGES
|
2018-09-11 07:23:11 +00:00
|
|
|
bool KICADPCB::WriteIGES( const wxString& aFileName )
|
2016-09-02 10:08:40 +00:00
|
|
|
{
|
2018-10-02 06:34:07 +00:00
|
|
|
if( m_pcb_model )
|
2016-09-02 10:08:40 +00:00
|
|
|
{
|
2018-10-02 06:34:07 +00:00
|
|
|
return m_pcb_model->WriteIGES( aFileName );
|
2016-09-02 10:08:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
bool KICADPCB::parsePCB( SEXPR::SEXPR* data )
|
|
|
|
{
|
|
|
|
if( NULL == data )
|
|
|
|
return false;
|
|
|
|
|
|
|
|
if( data->IsList() )
|
|
|
|
{
|
|
|
|
size_t nc = data->GetNumberOfChildren();
|
|
|
|
SEXPR::SEXPR* child = data->GetChild( 0 );
|
|
|
|
std::string name = child->GetSymbol();
|
|
|
|
|
|
|
|
bool result = true;
|
|
|
|
|
|
|
|
for( size_t i = 1; i < nc && result; ++i )
|
|
|
|
{
|
|
|
|
child = data->GetChild( i );
|
|
|
|
|
|
|
|
if( !child->IsList() )
|
|
|
|
{
|
2018-09-20 09:05:52 +00:00
|
|
|
ReportMessage( wxString::Format( "corrupt PCB file (line %d)\n", child->GetLineNumber() ) );
|
2016-09-02 10:08:40 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
std::string symname( child->GetChild( 0 )->GetSymbol() );
|
|
|
|
|
|
|
|
if( symname == "general" )
|
|
|
|
result = result && parseGeneral( child );
|
2016-09-04 07:08:56 +00:00
|
|
|
else if( symname == "setup" )
|
|
|
|
result = result && parseSetup( child );
|
2017-06-08 06:33:14 +00:00
|
|
|
else if( symname == "layers" )
|
|
|
|
result = result && parseLayers( child );
|
2016-09-02 10:08:40 +00:00
|
|
|
else if( symname == "module" )
|
|
|
|
result = result && parseModule( child );
|
|
|
|
else if( symname == "gr_arc" )
|
|
|
|
result = result && parseCurve( child, CURVE_ARC );
|
|
|
|
else if( symname == "gr_line" )
|
|
|
|
result = result && parseCurve( child, CURVE_LINE );
|
|
|
|
else if( symname == "gr_circle" )
|
|
|
|
result = result && parseCurve( child, CURVE_CIRCLE );
|
|
|
|
}
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2018-09-20 09:05:52 +00:00
|
|
|
ReportMessage( wxString::Format( "data is not a valid PCB file: %s\n", m_filename ) );
|
2016-09-02 10:08:40 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool KICADPCB::parseGeneral( SEXPR::SEXPR* data )
|
|
|
|
{
|
|
|
|
size_t nc = data->GetNumberOfChildren();
|
|
|
|
SEXPR::SEXPR* child = NULL;
|
|
|
|
|
|
|
|
for( size_t i = 1; i < nc; ++i )
|
|
|
|
{
|
|
|
|
child = data->GetChild( i );
|
|
|
|
|
|
|
|
if( !child->IsList() )
|
|
|
|
{
|
2018-09-20 09:05:52 +00:00
|
|
|
ReportMessage( wxString::Format( "corrupt PCB file (line %d)\n", child->GetLineNumber() ) );
|
2016-09-02 10:08:40 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
// at the moment only the thickness is of interest in
|
|
|
|
// the general section
|
|
|
|
if( child->GetChild( 0 )->GetSymbol() != "thickness" )
|
|
|
|
continue;
|
|
|
|
|
|
|
|
m_thickness = child->GetChild( 1 )->GetDouble();
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2018-09-20 09:05:52 +00:00
|
|
|
ReportMessage( wxString::Format( "corrupt PCB file (line %d)\n"
|
|
|
|
"no PCB thickness specified in general section\n",
|
|
|
|
child->GetLineNumber() ) );
|
2016-09-02 10:08:40 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-06-08 06:33:14 +00:00
|
|
|
bool KICADPCB::parseLayers( SEXPR::SEXPR* data )
|
|
|
|
{
|
|
|
|
size_t nc = data->GetNumberOfChildren();
|
|
|
|
SEXPR::SEXPR* child = NULL;
|
|
|
|
|
|
|
|
// Read the layername and the correstponding layer id list:
|
|
|
|
for( size_t i = 1; i < nc; ++i )
|
|
|
|
{
|
|
|
|
child = data->GetChild( i );
|
|
|
|
|
|
|
|
if( !child->IsList() )
|
|
|
|
{
|
2018-09-20 09:05:52 +00:00
|
|
|
ReportMessage( wxString::Format( "corrupt PCB file (line %d)\n", child->GetLineNumber() ) );
|
2017-06-08 06:33:14 +00:00
|
|
|
return false;
|
|
|
|
}
|
2018-12-18 14:11:32 +00:00
|
|
|
std::string ref;
|
2017-06-08 06:33:14 +00:00
|
|
|
|
2018-12-18 14:11:32 +00:00
|
|
|
if( child->GetChild( 1 )->IsSymbol() )
|
|
|
|
ref = child->GetChild( 1 )->GetSymbol();
|
|
|
|
else
|
|
|
|
ref = child->GetChild( 1 )->GetString();
|
|
|
|
|
|
|
|
m_layersNames[ref] = child->GetChild( 0 )->GetInteger();
|
2017-06-08 06:33:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
int KICADPCB::GetLayerId( std::string& aLayerName )
|
|
|
|
{
|
|
|
|
int lid = -1;
|
|
|
|
auto item = m_layersNames.find( aLayerName );
|
|
|
|
|
|
|
|
if( item != m_layersNames.end() )
|
|
|
|
lid = item->second;
|
|
|
|
|
|
|
|
return lid;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-09-04 07:08:56 +00:00
|
|
|
bool KICADPCB::parseSetup( SEXPR::SEXPR* data )
|
|
|
|
{
|
|
|
|
size_t nc = data->GetNumberOfChildren();
|
|
|
|
SEXPR::SEXPR* child = NULL;
|
|
|
|
|
|
|
|
for( size_t i = 1; i < nc; ++i )
|
|
|
|
{
|
|
|
|
child = data->GetChild( i );
|
|
|
|
|
|
|
|
if( !child->IsList() )
|
|
|
|
{
|
2020-04-22 08:43:28 +00:00
|
|
|
ReportMessage( wxString::Format(
|
|
|
|
"corrupt PCB file (line %d)\n", child->GetLineNumber() ) );
|
2016-09-04 07:08:56 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
// at the moment only the Grid and Drill origins are of interest in
|
|
|
|
// the setup section
|
|
|
|
if( child->GetChild( 0 )->GetSymbol() == "grid_origin" )
|
|
|
|
{
|
|
|
|
if( child->GetNumberOfChildren() != 3 )
|
|
|
|
{
|
2020-04-22 08:43:28 +00:00
|
|
|
ReportMessage( wxString::Format(
|
|
|
|
"corrupt PCB file (line %d): grid_origin has %d children (expected: 3)\n",
|
|
|
|
child->GetLineNumber(), child->GetNumberOfChildren() ) );
|
2016-09-04 07:08:56 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
m_gridOrigin.x = child->GetChild( 1 )->GetDouble();
|
|
|
|
m_gridOrigin.y = child->GetChild( 2 )->GetDouble();
|
|
|
|
m_hasGridOrigin = true;
|
|
|
|
}
|
|
|
|
else if( child->GetChild( 0 )->GetSymbol() == "aux_axis_origin" )
|
|
|
|
{
|
|
|
|
if( child->GetNumberOfChildren() != 3 )
|
|
|
|
{
|
2020-04-22 08:43:28 +00:00
|
|
|
ReportMessage( wxString::Format(
|
|
|
|
"corrupt PCB file (line %d)m: aux_axis_origin has %d children (expected: 3)\n",
|
|
|
|
child->GetLineNumber(), child->GetNumberOfChildren() ) );
|
2016-09-04 07:08:56 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
m_drillOrigin.x = child->GetChild( 1 )->GetDouble();
|
|
|
|
m_drillOrigin.y = child->GetChild( 2 )->GetDouble();
|
|
|
|
m_hasDrillOrigin = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-09-02 10:08:40 +00:00
|
|
|
bool KICADPCB::parseModule( SEXPR::SEXPR* data )
|
|
|
|
{
|
2017-06-08 06:33:14 +00:00
|
|
|
KICADMODULE* mp = new KICADMODULE( this );
|
2016-09-02 10:08:40 +00:00
|
|
|
|
|
|
|
if( !mp->Read( data ) )
|
|
|
|
{
|
|
|
|
delete mp;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
m_modules.push_back( mp );
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool KICADPCB::parseCurve( SEXPR::SEXPR* data, CURVE_TYPE aCurveType )
|
|
|
|
{
|
|
|
|
KICADCURVE* mp = new KICADCURVE();
|
|
|
|
|
|
|
|
if( !mp->Read( data, aCurveType ) )
|
|
|
|
{
|
|
|
|
delete mp;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
// reject any curves not on the Edge.Cuts layer
|
|
|
|
if( mp->GetLayer() != LAYER_EDGE )
|
|
|
|
{
|
|
|
|
delete mp;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
m_curves.push_back( mp );
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-09-18 00:25:10 +00:00
|
|
|
bool KICADPCB::ComposePCB( bool aComposeVirtual )
|
2016-09-02 10:08:40 +00:00
|
|
|
{
|
2018-10-02 06:34:07 +00:00
|
|
|
if( m_pcb_model )
|
2016-09-02 10:08:40 +00:00
|
|
|
return true;
|
|
|
|
|
|
|
|
if( m_modules.empty() && m_curves.empty() )
|
|
|
|
{
|
2018-10-02 06:34:07 +00:00
|
|
|
ReportMessage( "Error: no PCB data (no footprint, no outline) to render\n" );
|
2016-09-02 10:08:40 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2016-09-04 07:08:56 +00:00
|
|
|
DOUBLET origin;
|
|
|
|
|
|
|
|
// Determine the coordinate system reference:
|
|
|
|
// Precedence of reference point is Drill Origin > Grid Origin > User Offset
|
|
|
|
if( m_useDrillOrigin && m_hasDrillOrigin )
|
|
|
|
{
|
|
|
|
origin = m_drillOrigin;
|
|
|
|
}
|
|
|
|
else if( m_useGridOrigin && m_hasDrillOrigin )
|
|
|
|
{
|
|
|
|
origin = m_gridOrigin;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
origin = m_origin;
|
|
|
|
}
|
|
|
|
|
2018-10-02 06:34:07 +00:00
|
|
|
m_pcb_model = new PCBMODEL();
|
|
|
|
m_pcb_model->SetPCBThickness( m_thickness );
|
|
|
|
m_pcb_model->SetMinDistance( m_minDistance );
|
2016-09-02 10:08:40 +00:00
|
|
|
|
|
|
|
for( auto i : m_curves )
|
|
|
|
{
|
|
|
|
if( CURVE_NONE == i->m_form || LAYER_EDGE != i->m_layer )
|
|
|
|
continue;
|
|
|
|
|
|
|
|
// adjust the coordinate system
|
|
|
|
KICADCURVE lcurve = *i;
|
2016-09-04 07:08:56 +00:00
|
|
|
lcurve.m_start.y = -( lcurve.m_start.y - origin.y );
|
|
|
|
lcurve.m_end.y = -( lcurve.m_end.y - origin.y );
|
|
|
|
lcurve.m_start.x -= origin.x;
|
|
|
|
lcurve.m_end.x -= origin.x;
|
2016-09-02 10:08:40 +00:00
|
|
|
|
|
|
|
if( CURVE_ARC == lcurve.m_form )
|
|
|
|
lcurve.m_angle = -lcurve.m_angle;
|
|
|
|
|
2018-10-02 06:34:07 +00:00
|
|
|
m_pcb_model->AddOutlineSegment( &lcurve );
|
2016-09-02 10:08:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
for( auto i : m_modules )
|
2018-10-02 06:34:07 +00:00
|
|
|
i->ComposePCB( m_pcb_model, &m_resolver, origin, aComposeVirtual );
|
|
|
|
|
|
|
|
ReportMessage( "Create PCB solid model\n" );
|
2016-09-02 10:08:40 +00:00
|
|
|
|
2018-10-02 06:34:07 +00:00
|
|
|
if( !m_pcb_model->CreatePCB() )
|
2016-09-02 10:08:40 +00:00
|
|
|
{
|
2018-09-20 09:05:52 +00:00
|
|
|
ReportMessage( "could not create PCB solid model\n" );
|
2018-10-02 06:34:07 +00:00
|
|
|
delete m_pcb_model;
|
|
|
|
m_pcb_model = NULL;
|
2016-09-02 10:08:40 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|