29#include <wx/cmdline.h> 
   65    wxFileName pro( filename );
 
   66    wxFileName brdName ( filename );
 
   67    wxFileName schName ( filename );
 
   68    wxFileName ruleFileName ( filename );
 
   75    brdName.MakeAbsolute();
 
   76    schName.MakeAbsolute();
 
   77    ruleFileName.MakeAbsolute();
 
   80    manager.LoadProject( pro.GetFullPath() );
 
   84                            std::string( brdName.GetFullPath().ToUTF8() ) ).release() );
 
   92    if( wxFileExists( schName.GetFullPath() ) )
 
 
  105    std::shared_ptr<DRC_ENGINE> drcEngine( 
new DRC_ENGINE );
 
  109    project.board->GetDesignSettings().m_DRCEngine = drcEngine;
 
  111    drcEngine->SetBoard( 
project.board.get() );
 
  112    drcEngine->SetDesignSettings( &
project.board->GetDesignSettings() );
 
  116    drcEngine->SetViolationHandler(
 
  117            [&]( 
const std::shared_ptr<DRC_ITEM>& aItem, 
const VECTOR2I& aPos, 
int aLayer,
 
  118                 const std::function<
void( 
PCB_MARKER* )>& aPathGenerator )
 
  124    drcEngine->InitEngine( 
project.rulesFilePath );
 
  125    drcEngine->SetDebugOverlay( aDebugOverlay );
 
  127    for( 
auto provider : drcEngine->GetTestProviders() )
 
  139    catch( 
const Clipper2Lib::Clipper2Exception& e )
 
  141        consoleLog.
Print( wxString::Format( 
"Clipper exception %s occurred.", e.what() ) );
 
 
General utilities for PCB file IO for QA programs.
 
void SetProject(PROJECT *aProject, bool aReferenceOnly=false)
Link a board to a given project.
 
void Print(const wxString &aMessage)
 
Design Rule Checker object that performs all the DRC tests.
 
virtual SETTINGS_MANAGER & GetSettingsManager() const
 
PROJECT_CONTEXT loadKicadProject(const wxString &filename, std::optional< wxString > rulesFilePath)
 
int runDRCProto(PROJECT_CONTEXT project, std::shared_ptr< KIGFX::VIEW_OVERLAY > aDebugOverlay)
 
static const std::string ProjectFileExtension
 
static const std::string KiCadSchematicFileExtension
 
static const std::string DesignRulesFileExtension
 
static const std::string KiCadPcbFileExtension
 
std::unique_ptr< BOARD > ReadBoardFromFileOrStream(const std::string &aFilename, std::istream &aFallback)
Read a board from a file, or another stream, as appropriate.
 
PGM_BASE & Pgm()
The global program "get" accessor.
 
std::shared_ptr< BOARD > board
 
VECTOR2< int32_t > VECTOR2I
 
Definition of file extensions used in Kicad.