103 [aKiway](
JOB* job, wxWindow* aParent ) ->
bool
109 wxCHECK( bomJob && editFrame,
false );
119 [](
JOB* job, wxWindow* aParent ) ->
bool
124 [aKiway](
JOB* job, wxWindow* aParent ) ->
bool
130 wxCHECK( netJob && editFrame,
false );
136 [aKiway](
JOB* job, wxWindow* aParent ) ->
bool
142 wxCHECK( plotJob && editFrame,
false );
147 _(
"Plotting to HPGL is no longer supported as of KiCad 10.0." ) );
155 [](
JOB* job, wxWindow* aParent ) ->
bool
160 [](
JOB* job, wxWindow* aParent ) ->
bool
165 [](
JOB* job, wxWindow* aParent ) ->
bool
170 [](
JOB* job, wxWindow* aParent ) ->
bool
175 [](
JOB* job, wxWindow* aParent ) ->
bool
179 wxCHECK( ercJob,
false );
185 [](
JOB* job, wxWindow* aParent ) ->
bool
190 [](
JOB* job, wxWindow* aParent ) ->
bool
208 if( !
Pgm().IsGUI() &&
Pgm().GetSettingsManager().IsProjectOpenNotDummy() )
211 wxString schPath = aPath;
213 if( schPath.IsEmpty() )
218 schPath =
path.GetFullPath();
226 else if(
Pgm().IsGUI() &&
Pgm().GetSettingsManager().IsProjectOpen() )
233 else if( !aPath.IsEmpty() )
245 SCHEMATIC* aSch,
const wxString& aDrawingSheetOverride )
264 auto loadSheet = [&](
const wxString&
path ) ->
bool
275 m_reporter->Report( wxString::Format(
_(
"Error loading drawing sheet '%s'." ),
path ) + wxS(
"\n" ) + msg
285 if( !aDrawingSheetOverride.IsEmpty() && loadSheet( aDrawingSheetOverride ) )
316 wxString variantName;
323 if( !variantName.IsEmpty() && variantName != wxS(
"all" ) )
326 std::unique_ptr<SCH_RENDER_SETTINGS> renderSettings = std::make_unique<SCH_RENDER_SETTINGS>();
337 renderSettings->SetDefaultFont( font );
347 for(
SCH_ITEM* item : screen->Items() )
350 for(
const auto& [libItemName, libSymbol] : screen->GetLibSymbols() )
351 libSymbol->ClearCaches();
354 std::unique_ptr<SCH_PLOTTER> schPlotter = std::make_unique<SCH_PLOTTER>( sch );
380 fn.SetName( fn.GetName() );
419 if( !variantName.IsEmpty() )
432 schPlotter->Plot( format, plotOpts, renderSettings.get(),
m_reporter );
437 for(
const wxString& outputPath : schPlotter->GetOutputFilePaths() )
464 if( variantName != wxS(
"all" ) )
481 m_reporter->Report(
_(
"Warning: schematic has annotation errors, please use the "
482 "schematic editor to fix them\n" ),
490 if(
erc.TestDuplicateSheetNames(
false ) > 0 )
493 std::unique_ptr<NETLIST_EXPORTER_BASE> helper;
494 unsigned netlistOption = 0;
502 helper = std::make_unique<NETLIST_EXPORTER_KICAD>( sch );
507 helper = std::make_unique<NETLIST_EXPORTER_ORCADPCB2>( sch );
512 helper = std::make_unique<NETLIST_EXPORTER_CADSTAR>( sch );
518 helper = std::make_unique<NETLIST_EXPORTER_SPICE>( sch );
523 helper = std::make_unique<NETLIST_EXPORTER_SPICE_MODEL>( sch );
527 fileExt = wxS(
"xml" );
528 helper = std::make_unique<NETLIST_EXPORTER_XML>( sch );
532 fileExt = wxS(
"asc" );
533 helper = std::make_unique<NETLIST_EXPORTER_PADS>( sch );
537 fileExt = wxS(
"txt" );
538 helper = std::make_unique<NETLIST_EXPORTER_ALLEGRO>( sch );
549 fn.SetName( fn.GetName() );
550 fn.SetExt( fileExt );
563 bool res = helper->WriteNetlist( outPath, netlistOption, *
m_reporter );
588 wxString currentVariant;
594 if( currentVariant != wxS(
"all" ) )
607 if(
copy.CheckAnnotation(
614 m_reporter->Report(
_(
"Warning: schematic has annotation errors, please use the schematic "
615 "editor to fix them\n" ),
623 if(
erc.TestDuplicateSheetNames(
false ) > 0 )
647 false, currentVariant );
649 false, currentVariant );
651 false, currentVariant );
654 std::set<wxString> userFieldNames;
656 for(
size_t i = 0; i < referenceList.
GetCount(); ++i )
658 SCH_SYMBOL* symbol = referenceList[i].GetSymbol();
662 if( !field.IsMandatory() && !field.IsPrivate() )
663 userFieldNames.insert( field.GetName() );
667 for(
const wxString& fieldName : userFieldNames )
673 if( userFieldNames.count( templateFieldname.m_Name ) == 0 )
676 false, currentVariant );
709 wxString::Format(
_(
"BOM preset '%s' not found" ) + wxS(
"\n" ), aBomJob->
m_bomPresetName ),
723 auto normalizeFieldName = [&dataModel](
const wxString& aName ) -> wxString
725 if( aName.IsEmpty() )
726 return wxEmptyString;
731 wxString wrapped = wxS(
"${" ) + aName + wxS(
"}" );
743 wxString fieldName = normalizeFieldName( rawFieldName );
745 if( fieldName.IsEmpty() )
753 if( fieldName == wxS(
"*" ) )
759 field.
name = modelField.name;
764 bool fieldAlreadyPresent =
false;
768 if( presetField.
name == field.
name )
770 fieldAlreadyPresent =
true;
775 bool fieldLaterInList =
false;
779 if( normalizeFieldName( fieldInList ) == field.
name )
781 fieldLaterInList =
true;
786 if( !fieldAlreadyPresent && !fieldLaterInList )
795 field.
name = fieldName;
796 field.
show = !fieldName.StartsWith( wxT(
"__" ), &field.
name );
824 std::optional<BOM_FMT_PRESET> schFmtPreset;
846 m_reporter->Report( wxString::Format(
_(
"BOM format preset '%s' not found" ) + wxS(
"\n" ),
868 fn.SetName( fn.GetName() );
875 bool hasVariantPlaceholder = configuredPath.Contains( wxS(
"${VARIANT}" ) );
878 std::vector<wxString> variantsToProcess;
886 variantsToProcess.push_back( currentVariant );
889 for(
const wxString& variantName : variantsToProcess )
891 std::vector<wxString> singleVariant = { variantName };
898 if( hasVariantPlaceholder )
900 wxString variantPath = configuredPath;
901 variantPath.Replace( wxS(
"${VARIANT}" ), variantName );
919 if( !f.Open( outPath, wxFile::write ) )
921 m_reporter->Report( wxString::Format(
_(
"Unable to open destination '%s'" ), outPath ),
927 bool res = f.Write( dataModel.
Export( fmt ) );
968 m_reporter->Report(
_(
"Warning: schematic has annotation errors, please use the "
969 "schematic editor to fix them\n" ),
977 if(
erc.TestDuplicateSheetNames(
false ) > 0 )
980 std::unique_ptr<NETLIST_EXPORTER_XML> xmlNetlist = std::make_unique<NETLIST_EXPORTER_XML>( sch );
985 fn.SetName( fn.GetName() +
"-bom" );
1017 std::shared_ptr<LIB_SYMBOL> parent;
1027 symbolToPlot = parent.get();
1031 for(
int unit = 1; unit < symbol->
GetUnitCount() + 1; unit++ )
1043 for( wxChar c : wxFileName::GetForbiddenChars( wxPATH_DOS ) )
1044 filename.Replace( c,
' ' );
1049 filename += wxString::Format(
"_unit%d", unit );
1053 if( bodyStyle == 2 )
1054 filename += wxS(
"_demorgan" );
1061 fn.SetName( filename );
1062 m_reporter->Report( wxString::Format(
_(
"Plotting symbol '%s' unit %d to '%s'\n" ), symbol->
GetName(),
1063 unit, fn.GetFullPath() ),
1078 const double scale = 1.0;
1083 plotter->
SetCreator( wxT(
"Eeschema-SVG" ) );
1085 if( !plotter->
OpenFile( fn.GetFullPath() ) )
1088 wxString::Format(
_(
"Unable to open destination '%s'" ) + wxS(
"\n" ), fn.GetFullPath() ),
1100 bool background =
true;
1105 symbolToPlot->
Plot( plotter, background, plotOpts, unit, bodyStyle, offset,
false );
1106 symbol->
PlotFields( plotter, background, plotOpts, unit, bodyStyle, offset,
false );
1108 symbolToPlot->
Plot( plotter, !background, plotOpts, unit, bodyStyle, offset,
false );
1109 symbol->
PlotFields( plotter, !background, plotOpts, unit, bodyStyle, offset,
false );
1134 wxString singleFileFilter;
1136 auto schLibrary = std::make_unique<SCH_IO_KICAD_SEXPR_LIB_CACHE>( fn.GetFullPath() );
1146 bool recovered =
false;
1148 if( !fn.IsDir() && wxDir::Exists( fn.GetPath() ) )
1152 schLibrary = std::make_unique<SCH_IO_KICAD_SEXPR_LIB_CACHE>( fn.GetPath() );
1154 singleFileFilter = fn.GetFullPath();
1178 symbol = schLibrary->GetSymbol( svgJob->
m_symbol );
1191 m_reporter->Report( wxString::Format(
_(
"Unable to create output directory '%s'." ) + wxS(
"\n" ),
1215 const std::map<wxString, wxString>& sourceFiles = schLibrary->GetSymbolSourceFiles();
1216 const wxFileName filterFile( singleFileFilter );
1218 for(
const auto& [
name, libSymbol] : libSymMap )
1221 if( !singleFileFilter.IsEmpty() )
1223 auto srcIt = sourceFiles.find(
name );
1225 if( srcIt == sourceFiles.end() || !wxFileName( srcIt->second ).SameAs( filterFile ) )
1266 else if(
fileType != SCH_IO_MGR::SCH_KICAD )
1268 m_reporter->Report(
_(
"Output path must be specified to convert legacy and non-KiCad libraries\n" ),
1274 if(
fileType == SCH_IO_MGR::SCH_KICAD )
1347 fn.SetName( fn.GetName() + wxS(
"-erc" ) );
1377 std::shared_ptr<SHEETLIST_ERC_ITEMS_PROVIDER> markersProvider =
1378 std::make_shared<SHEETLIST_ERC_ITEMS_PROVIDER>( sch );
1391 markersProvider->SetSeverities( ercJob->
m_severity );
1393 m_reporter->Report( wxString::Format(
_(
"Found %d violations\n" ), markersProvider->GetCount() ),
1396 ERC_REPORT reportWriter( sch, units, markersProvider );
1398 bool wroteReport =
false;
1415 if( markersProvider->GetCount() > 0 )
1427 if( aUpgradeJob ==
nullptr )
1435 bool shouldSave = aUpgradeJob->
m_force;
1447 wxFileName schPath( aUpgradeJob->
m_filename );
1448 schPath.MakeAbsolute();
1449 const wxString schFullPath = schPath.GetFullPath();
1454 SCH_SHEET* loadedSheet = pi->LoadSchematicFile( schFullPath, sch );
1455 pi->SaveSchematicFile( schFullPath, loadedSheet, sch );
1460 wxString::Format(
_(
"Error saving schematic file '%s'.\n%s" ), schFullPath, ioe.
What().GetData() );
1486 SCH_IO_MGR::SCH_FILE_T
fileType = SCH_IO_MGR::SCH_FILE_UNKNOWN;
1503 if(
fileType == SCH_IO_MGR::SCH_FILE_UNKNOWN )
1506 m_reporter->Report( wxString::Format(
_(
"No schematic importer recognizes the file format "
1515 if( outputPath.IsEmpty() )
1519 inputFn.MakeAbsolute();
1521 wxFileName outputFn( outputPath );
1522 outputFn.MakeAbsolute();
1528 PROJECT* projectPtr =
nullptr;
1529 bool createdTransientProject =
false;
1533 projectPtr = &mgr.
Prj();
1537 wxFileName projectFn( outputFn );
1541 projectPtr = mgr.
GetProject( projectFn.GetFullPath() );
1542 createdTransientProject = ( projectPtr != nullptr );
1547 m_reporter->Report(
_(
"Could not establish a project for the import\n" ),
1556 struct TRANSIENT_PROJECT_GUARD
1562 ~TRANSIENT_PROJECT_GUARD()
1567 } transientProjectGuard{ mgr, projectPtr, createdTransientProject };
1571 std::unique_ptr<SCHEMATIC> schematic = std::make_unique<SCHEMATIC>( &
project );
1582 m_reporter->Report( wxString::Format(
_(
"No plugin found for file type '%s'\n" ),
1588 m_reporter->Report( wxString::Format(
_(
"Importing '%s' using %s format...\n" ),
1589 inputFn.GetFullPath(), formatName ),
1592 loadedSheet = pi->LoadSchematicFile( inputFn.GetFullPath(), schematic.get() );
1602 m_reporter->Report( wxString::Format(
_(
"Error during import: %s\n" ), ioe.
What() ),
1607 size_t symbolCount = 0;
1608 size_t sheetCount = 0;
1614 std::vector<SCH_SHEET*> topLevelSheets = schematic->GetTopLevelSheets();
1615 bool loadedIsTopLevel = std::find( topLevelSheets.begin(), topLevelSheets.end(),
1616 loadedSheet ) != topLevelSheets.end();
1617 bool loadedIsVirtualRoot = loadedSheet == &schematic->Root()
1620 if( !loadedIsTopLevel && !loadedIsVirtualRoot )
1621 schematic->SetTopLevelSheets( { loadedSheet } );
1624 std::unique_ptr<TOOL_MANAGER> toolManager = std::make_unique<TOOL_MANAGER>();
1625 toolManager->SetEnvironment( schematic.get(),
nullptr,
nullptr,
Kiface().KifaceSettings(),
1630 schematic->RecalculateConnections( &dummyCommit,
GLOBAL_CLEANUP, toolManager.get() );
1633 schematic->SetSheetNumberAndCount();
1635 if(
SCH_SHEET* topSheet = schematic->GetTopLevelSheet() )
1636 topSheet->SetFileName( outputFn.GetFullName() );
1638 schematic->RootScreen()->SetFileName( outputFn.GetFullPath() );
1642 std::unordered_map<SCH_SCREEN*, wxString> filenameMap;
1643 filenameMap[schematic->RootScreen()] = outputFn.GetFullPath();
1649 filenameMap, errorMsg ) )
1659 for(
size_t i = 0; i < screens.
GetCount(); i++ )
1662 wxString
path = filenameMap[screen];
1664 if(
path.IsEmpty() )
1667 wxFileName fn(
path );
1670 pi->SaveSchematicFile( fn.GetFullPath(), screens.
GetSheet( i ), schematic.get() );
1674 symbolCount += std::distance( symbols.begin(), symbols.end() );
1679 m_reporter->Report( wxString::Format(
_(
"Error saving imported schematic: %s\n" ),
1684 catch(
const std::exception& exc )
1686 m_reporter->Report( wxString::Format(
_(
"Error saving imported schematic: %s\n" ),
1692 m_reporter->Report( wxString::Format(
_(
"Successfully saved imported schematic to '%s'\n" ),
1693 outputFn.GetFullPath() ),
1697 if(
Pgm().GetSettingsManager().IsProjectOpenNotDummy() )
1699 std::vector<FILE_INFO_PAIR>& projectSheets =
project.GetProjectFile().GetSheets();
1700 projectSheets.clear();
1707 projectSheets.emplace_back( std::make_pair( sheet->
m_Uuid, sheet->
GetName() ) );
1713 IMPORT_REPORT_DATA reportData;
1715 reportData.m_sourceFile = inputFn.GetFullName();
1716 reportData.m_sourceFormat = formatName;
1717 reportData.m_outputFile = outputFn.GetFullName();
1718 reportData.m_statistics = {
1719 { wxS(
"symbols" ), symbolCount },
1720 { wxS(
"sheets" ), sheetCount }
1751 return drawingSheet;
1783 return std::unique_ptr<SCHEMATIC>(
1791 aSch->SetProject(
nullptr );
1834 return diffExitCode;
1862 std::vector<std::unique_ptr<LIB_SYMBOL>>& aOwners,
1866 if( aAllowEmpty && aPath.IsEmpty() )
1872 aOwners = std::move( loaded.first );
1873 aMap = std::move( loaded.second );
1878 aReporter.
Report( wxString::Format(
_(
"Failed to load %s: %s\n" ), aPath, ioe.
What() ),
1881 catch(
const std::exception& e )
1884 wxString::Format(
_(
"Failed to load %s: %s\n" ), aPath, wxString::FromUTF8( e.what() ) ),
1899 for(
const auto& [
name, symbol] : aMap )
1916 std::vector<std::unique_ptr<LIB_SYMBOL>> ownersA;
1917 std::vector<std::unique_ptr<LIB_SYMBOL>> ownersB;
1939 return diffExitCode;
1964 const wxString& aFileB,
const wxString& aLabelA,
1965 const wxString& aLabelB, wxWindow* aParent,
1973 wxWindow* parent = aParent ? aParent : ( wxTheApp ? wxTheApp->GetTopWindow() :
nullptr );
1988 if( !a.
doc && !aFileA.IsEmpty() )
1994 if( !b.
doc && !aFileB.IsEmpty() )
2004 std::unique_ptr<SCHEMATIC> emptyA;
2005 std::unique_ptr<SCHEMATIC> emptyB;
2009 emptyA = std::make_unique<SCHEMATIC>( &scratchPrjA );
2010 emptyA->CreateDefaultScreens();
2015 emptyB = std::make_unique<SCHEMATIC>( &scratchPrjB );
2016 emptyB->CreateDefaultScreens();
2029 const wxString labelA = aLabelA.IsEmpty() ? aFileA : aLabelA;
2030 const wxString labelB = aLabelB.IsEmpty() ? aFileB : aLabelB;
2033 parent, labelA, labelB,
result, std::move( refGeometry ), std::move( compGeometry ),
2036 SCH_SCREEN* refScreen = schA ? schA->RootScreen() : nullptr;
2037 SCH_SCREEN* compScreen = schB ? schB->RootScreen() : nullptr;
2039 if( !aSheetPath.empty() )
2043 if( auto sp = schA->Hierarchy().GetSheetPathByKIIDPath( aSheetPath, true ) )
2044 refScreen = sp->LastScreen();
2049 if( auto sp = schB->Hierarchy().GetSheetPathByKIIDPath( aSheetPath, true ) )
2050 compScreen = sp->LastScreen();
2060 emptyA->SetProject(
nullptr );
2063 emptyB->SetProject(
nullptr );
2069 std::vector<std::unique_ptr<LIB_SYMBOL>> ownersA;
2070 std::vector<std::unique_ptr<LIB_SYMBOL>> ownersB;
2099 const wxString labelA = aLabelA.IsEmpty() ? aFileA : aLabelA;
2100 const wxString labelB = aLabelB.IsEmpty() ? aFileB : aLabelB;
2118 const wxString& aOurs,
const wxString& aTheirs,
2119 const wxString& aOutput,
bool aInteractive,
bool aSingleFile,
2130 return runSchMerge( aAncestor, aOurs, aTheirs, aOutput, aInteractive );
2135 const wxString& aTheirs,
const wxString& aOutput,
2144 if( !ancestor.
doc || !ours.
doc || !theirs.
doc )
2154 auto hasSingleRoot = [](
const SCHEMATIC* aSch )
2156 return aSch->GetTopLevelSheets().size() == 1;
2159 if( !hasSingleRoot( ancestor.
doc.get() ) || !hasSingleRoot( ours.
doc.get() ) || !hasSingleRoot( theirs.
doc.get() ) )
2161 m_reporter->Report(
_(
"sch merge requires each input to have a single top-level sheet\n" ),
2177 if( aInteractive && !plan.
Resolved() )
2179 if( !
Pgm().IsGUI() )
2181 m_reporter->Report(
_(
"--interactive requires a GUI KiCad process; the console "
2182 "kicad-cli cannot open dialogs.\n" ),
2214 if( !applier.
Apply() )
2225 m_reporter->Report(
_(
"Merge contains hierarchical sheet structure changes that sch merge "
2232 SCH_SHEET* rootSheet = ancestor.
doc->GetTopLevelSheet( 0 );
2234 wxFileName outFn( aOutput );
2235 outFn.MakeAbsolute();
2241 const wxString outDir = outFn.GetPath();
2249 std::map<wxString, SCH_SCREEN*> basenameOwner;
2251 for(
size_t i = 0; i < screens.
GetCount(); ++i )
2255 if( !screen || screen == rootScreen )
2258 const wxString basename = wxFileName( screen->
GetFileName() ).GetFullName();
2260 if( basename.IsEmpty() )
2263 auto [it, inserted] = basenameOwner.emplace( basename, screen );
2265 if( !inserted && it->second != screen )
2267 m_reporter->Report( wxString::Format(
_(
"Cannot flatten sub-sheets with duplicate "
2268 "basename '%s'\n" ),
2278 for(
size_t i = 0; i < screens.
GetCount(); ++i )
2290 if( !childScreen || childScreen == rootScreen )
2293 const wxString basename = wxFileName( childScreen->
GetFileName() ).GetFullName();
2295 if( !basename.IsEmpty() )
2303 pi->SaveSchematicFile( outFn.GetFullPath(), rootSheet, ancestor.
doc.get() );
2305 for(
size_t i = 0; i < screens.
GetCount(); ++i )
2310 if( !screen || !sheet || screen == rootScreen )
2313 const wxString basename = wxFileName( screen->
GetFileName() ).GetFullName();
2315 if( basename.IsEmpty() )
2318 wxFileName outSubFn( outDir, basename );
2319 pi->SaveSchematicFile( outSubFn.GetFullPath(), sheet, ancestor.
doc.get() );
2324 m_reporter->Report( wxString::Format(
_(
"Failed to save merged schematic: %s\n" ), ioe.
What() ),
2336 wxFileName proFn = outFn;
2353 ancestor.
doc->ErcSettings().SaveToFile( wxEmptyString,
true );
2356 ancestor.
doc->Settings().SaveToFile( wxEmptyString,
true );
2358 std::set<wxString> touched;
2368 if( !
Pgm().GetSettingsManager().SaveProjectCopy( proFn.GetFullPath(), ancestor.
project ) )
2371 wxString::Format(
_(
"Failed to save merged project file: %s\n" ), proFn.GetFullPath() ),
2382 m_reporter->Report( wxString::Format( wxS(
"%s: %s\n" ), f.validator, f.message ), f.severity );
2389 m_reporter->Report( wxString::Format(
_(
"Merge completed with %zu unresolved conflict(s) in %s\n" ),
2404#include <wx/ffile.h>
2408 const wxString& aTheirs,
const wxString& aOutput )
2410 if( aOutput.IsEmpty() )
2419 std::vector<std::unique_ptr<LIB_SYMBOL>> owners;
2423 LIB_SIDE ancestor, ours, theirs;
2425 auto loadSide = [&](
const wxString& aPath, LIB_SIDE& aSide ) ->
int
2430 aSide.owners = std::move( loaded.first );
2431 aSide.map = std::move( loaded.second );
2436 m_reporter->Report( wxString::Format(
_(
"Failed to load %s: %s\n" ), aPath, ioe.
What() ),
2439 catch(
const std::exception& e )
2442 wxString::Format(
_(
"Failed to load %s: %s\n" ), aPath, wxString::FromUTF8( e.what() ) ),
2470 std::vector<std::unique_ptr<LIB_SYMBOL>> merged = applier.
Apply();
2475 const bool hadSilentFallback = applier.
GetReport().mergePropsFallback > 0;
2481 wxFileName outFn( aOutput );
2482 outFn.MakeAbsolute();
2491 for(
auto& sym : merged )
2502 m_reporter->Report( wxString::Format(
_(
"Failed to save merged symbol library: %s\n" ), ioe.
What() ),
2508 if( !planSnapshot.
Resolved() || hadSilentFallback )
2512 std::set<KIID_PATH> conflicts( planSnapshot.
unresolved.begin(), planSnapshot.
unresolved.end() );
2515 conflicts.insert(
id );
2517 m_reporter->Report( wxString::Format(
_(
"Symbol library merge completed with %zu unresolved "
2518 "conflict(s) in %s\n" ),
2519 conflicts.size(), aOutput ),
constexpr EDA_IU_SCALE schIUScale
KIFACE_BASE & Kiface()
Global KIFACE_BASE "get" accessor.
int GetVirtualPageNumber() const
const wxString & GetPageNumber() const
constexpr size_type GetWidth() const
constexpr const Vec GetCenter() const
constexpr size_type GetHeight() const
Color settings are a bit different than most of the settings objects in that there can be more than o...
File-compare dialog (Phase 7).
3-way merge resolution dialog (Phase 8).
const KICAD_DIFF::MERGE_PLAN & GetResolvedPlan() const
Returns the plan with the user's resolutions applied.
static DS_DATA_MODEL & GetTheInstance()
Return the instance of DS_DATA_MODEL used in the application.
void SetSheetPath(const std::string &aSheetPath)
Set the sheet path displayed in the title block.
void SetSheetCount(int aSheetCount)
Change the sheet-count number displayed in the title block.
void SetVariantName(const std::string &aVariant)
Set the current variant name and description to be shown on the drawing sheet.
void SetVariantDesc(const std::string &aVariantDesc)
void SetPageNumber(const std::string &aPageNumber)
Change the page number displayed in the title block.
void SetSheetName(const std::string &aSheetName)
Set the sheet name displayed in the title block.
void SetPageBorderColorLayer(int aLayerId)
Override the layer used to pick the color of the page border (normally LAYER_GRID)
void SetIsFirstPage(bool aIsFirstPage)
Change if this is first page.
void SetFileName(const std::string &aFileName)
Set the file name displayed in the title block.
void SetColorLayer(int aLayerId)
Can be used to override which layer ID is used for drawing sheet item colors.
static SCHEMATIC * LoadSchematic(const wxString &aFileName, bool aSetActive, bool aForceDefaultProject, PROJECT *aProject=nullptr, bool aCalculateConnectivity=true)
int JobExportNetlist(JOB *aJob)
int runSchMerge(const wxString &aAncestor, const wxString &aOurs, const wxString &aTheirs, const wxString &aOutput, bool aInteractive)
void InitRenderSettings(SCH_RENDER_SETTINGS *aRenderSettings, const wxString &aTheme, SCHEMATIC *aSch, const wxString &aDrawingSheetOverride=wxEmptyString)
Configure the SCH_RENDER_SETTINGS object with the correct data to be used with plotting.
int JobSymUpgrade(JOB *aJob)
int JobExportBom(JOB *aJob)
int JobUpgrade(JOB *aJob)
int RunMerge(KICAD_DIFF::DOC_KIND aKind, const wxString &aAncestor, const wxString &aOurs, const wxString &aTheirs, const wxString &aOutput, bool aInteractive, bool aSingleFile, REPORTER *aReporter)
Non-job entry points (reached via the kiface KIFACE_MERGE_DOCUMENT / KIFACE_OPEN_DIFF_DIALOG function...
int JobSymExportSvg(JOB *aJob)
SCHEMATIC * getSchematic(const wxString &aPath)
DS_PROXY_VIEW_ITEM * getDrawingSheetProxyView(SCHEMATIC *aSch)
int JobSymDiff(JOB *aJob)
int JobExportPythonBom(JOB *aJob)
int runSymLibMerge(const wxString &aAncestor, const wxString &aOurs, const wxString &aTheirs, const wxString &aOutput)
int OpenDiffDialog(KICAD_DIFF::DOC_KIND aKind, const wxString &aFileA, const wxString &aFileB, const wxString &aLabelA, const wxString &aLabelB, wxWindow *aParent, REPORTER *aReporter)
void ClearCachedSchematic()
Clear the cached CLI schematic so the next job reloads from the current project.
EESCHEMA_JOBS_HANDLER(KIWAY *aKiway)
int JobExportPlot(JOB *aJob)
SCHEMATIC * m_cliSchematic
int doSymExportSvg(JOB_SYM_EXPORT_SVG *aSvgJob, SCH_RENDER_SETTINGS *aRenderSettings, LIB_SYMBOL *symbol)
int JobSchDiff(JOB *aJob)
EE_TYPE OfType(KICAD_T aType) const
bool WriteJsonReport(const wxString &aFullFileName)
Writes a JSON formatted ERC Report to the given file path in the c-locale.
bool WriteTextReport(const wxString &aFullFileName)
Writes the text report also available via GetTextReport directly to a given file path.
void RunTests(DS_PROXY_VIEW_ITEM *aDrawingSheet, SCH_EDIT_FRAME *aEditFrame, KIFACE *aCvPcb, PROJECT *aProject, PROGRESS_REPORTER *aProgressReporter)
int GetFieldNameCol(const wxString &aFieldName) const
void AddColumn(const wxString &aFieldName, const wxString &aLabel, bool aAddedByUser, const wxString &aVariantName)
wxString Export(const BOM_FMT_PRESET &settings)
void ApplyBomPreset(const BOM_PRESET &preset, const wxString &aVariantName)
static const wxString ITEM_NUMBER_VARIABLE
void SetVariantNames(const std::vector< wxString > &aVariantNames)
static const wxString QUANTITY_VARIABLE
std::vector< BOM_FIELD > GetFieldsOrdered()
void SetCurrentVariant(const wxString &aVariantName)
Set the current variant name for highlighting purposes.
Provide an extensible class to resolve 3D model paths.
wxString ResolvePath(const wxString &aFileName, const wxString &aWorkingPath, std::vector< const EMBEDDED_FILES * > aEmbeddedFilesStack)
Determine the full path of the given file name.
void SetProgramBase(PGM_BASE *aBase)
Set a pointer to the application's PGM_BASE instance used to extract the local env vars.
bool SetProject(const PROJECT *aProject, bool *flgChanged=nullptr)
Set the current KiCad project directory as the first entry in the model path list.
Hold an error message and may be used when throwing exceptions containing meaningful error messages.
virtual const wxString What() const
A composite of Problem() and Where()
wxString m_inputB
Comparison document (file or directory)
wxString m_inputA
Reference document (file or directory)
void Register(const std::string &aJobTypeName, std::function< int(JOB *job)> aHandler, std::function< bool(JOB *job, wxWindow *aParent)> aConfigHandler)
JOB_DISPATCHER(KIWAY *aKiway)
PROGRESS_REPORTER * m_progressReporter
std::vector< wxString > m_fieldsLabels
std::vector< wxString > m_fieldsOrdered
wxString m_refRangeDelimiter
std::vector< wxString > m_fieldsGroupBy
std::vector< wxString > m_variantNames
wxString m_stringDelimiter
wxString m_fieldDelimiter
wxString m_bomFmtPresetName
std::vector< wxString > m_variantNames
JOB_PAGE_SIZE m_pageSizeSelect
SCH_PLOT_FORMAT m_plotFormat
bool m_useBackgroundColor
std::vector< wxString > m_variantNames
bool m_PDFHierarchicalLinks
std::vector< wxString > m_plotPages
bool m_exitCodeViolations
Job to import a non-KiCad schematic file to KiCad format.
IMPORT_REPORT_FORMAT m_reportFormat
wxString m_outputDirectory
bool m_includeHiddenFields
wxString m_outputLibraryPath
An simple container class that lets us dispatch output jobs to kifaces.
void SetConfiguredOutputPath(const wxString &aPath)
Sets the configured output path for the job, this path is always saved to file.
void AddOutput(wxString aOutputPath)
wxString GetFullOutputPath(PROJECT *aProject) const
Returns the full output path for the job, taking into account the configured output path,...
bool GetOutputPathIsDirectory() const
wxString GetConfiguredOutputPath() const
Returns the configured output path for the job.
void SetTitleBlock(const TITLE_BLOCK &aTitleBlock)
void SetWorkingOutputPath(const wxString &aPath)
Sets a transient output path for the job, it takes priority over the configured output path when GetF...
const std::map< wxString, wxString > & GetVarOverrides() const
JSON_SETTINGS_INTERNALS * Internals()
virtual bool Store()
Stores the current parameters into the JSON document represented by this object Note: this doesn't do...
Three-way merge plan generator.
MERGE_PLAN Plan(const DOCUMENT_DIFF &aAncestorOurs, const DOCUMENT_DIFF &aAncestorTheirs) const
Plan the merge given the canonical pair of diffs.
const REPORT & GetReport() const
std::vector< std::unique_ptr< ITEM > > Apply()
Diff two already-parsed SCHEMATICs and produce a DOCUMENT_DIFF.
DOCUMENT_DIFF Diff() override
Produce a DOCUMENT_DIFF of the inputs the concrete differ was constructed with.
Materialize a MERGE_PLAN into a merged SCHEMATIC by mutating the ancestor in place.
bool Apply()
Apply the plan to the ancestor.
const REPORT & GetReport() const
Diff two .kicad_sym symbol libraries.
DOCUMENT_DIFF Diff() override
Produce a DOCUMENT_DIFF of the inputs the concrete differ was constructed with.
static std::pair< std::vector< std::unique_ptr< LIB_SYMBOL > >, SYMBOL_MAP > LoadLibrary(const wxString &aPath)
Convenience: load a .kicad_sym path into a SYMBOL_MAP using SCH_IO_KICAD_SEXPR::EnumerateSymbolLib.
std::map< wxString, const LIB_SYMBOL * > SYMBOL_MAP
Library content is a map of (canonical_name -> LIB_SYMBOL*).
A color representation with 4 components: red, green, blue, alpha.
void SetDefaultPenWidth(int aWidth)
void SetGapLengthRatio(double aRatio)
void SetDashLengthRatio(double aRatio)
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
virtual KIWAY_PLAYER * Player(FRAME_T aFrameType, bool doCreate=true, wxTopLevelWindow *aParent=nullptr)
Return the KIWAY_PLAYER* given a FRAME_T.
void AsyncLoad()
Loads all available libraries for this adapter type in the background.
Define a library symbol object.
const BOX2I GetUnitBoundingBox(int aUnit, int aBodyStyle, bool aIgnoreHiddenFields=true, bool aIgnoreLabelsOnInvisiblePins=true) const
Get the bounding box for the symbol.
void Plot(PLOTTER *aPlotter, bool aBackground, const SCH_PLOT_OPTS &aPlotOpts, int aUnit, int aBodyStyle, const VECTOR2I &aOffset, bool aDimmed) override
Plot the item to aPlotter.
void PlotFields(PLOTTER *aPlotter, bool aBackground, const SCH_PLOT_OPTS &aPlotOpts, int aUnit, int aBodyStyle, const VECTOR2I &aOffset, bool aDimmed)
Plot symbol fields.
std::shared_ptr< LIB_SYMBOL > GetRootSymbol() const
Get the parent symbol that does not have another parent.
wxString GetName() const override
const std::vector< wxString > & GetBodyStyleNames() const
bool HasDeMorganBodyStyles() const override
int GetBodyStyleCount() const override
int GetUnitCount() const override
std::unique_ptr< LIB_SYMBOL > Flatten() const
Return a flattened symbol inheritance to the caller.
Instantiate the current locale within a scope in which you are expecting exceptions to be thrown.
Describe the page size and margins of a paper page on which to eventually print or plot.
int GetHeightIU(double aIUScale) const
Gets the page height in IU.
void SetHeightMils(double aHeightInMils)
int GetWidthIU(double aIUScale) const
Gets the page width in IU.
void SetWidthMils(double aWidthInMils)
static bool EnsurePathExists(const wxString &aPath, bool aPathToFile=false)
Attempts to create a given path if it does not exist.
virtual SETTINGS_MANAGER & GetSettingsManager() const
virtual bool OpenFile(const wxString &aFullFilename)
Open or create the plot file aFullFilename.
virtual void SetPageSettings(const PAGE_INFO &aPageSettings)
void SetRenderSettings(RENDER_SETTINGS *aSettings)
virtual void SetCreator(const wxString &aCreator)
virtual void SetColorMode(bool aColorMode)
Plot in B/W or color.
The backing store for a PROJECT, in JSON format.
static SYMBOL_LIBRARY_ADAPTER * SymbolLibAdapter(PROJECT *aProject)
Accessor for project symbol library manager adapter.
Container for project specific data.
virtual void ApplyTextVars(const std::map< wxString, wxString > &aVarsMap)
Applies the given var map, it will create or update existing vars.
virtual PROJECT_FILE & GetProjectFile() const
A pure virtual class used to derive REPORTER objects from.
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)
Report a string with a given severity.
wxString m_SchDrawingSheetFileName
TEMPLATES m_TemplateFieldNames
std::vector< BOM_PRESET > m_BomPresets
double m_DashedLineGapRatio
std::vector< BOM_FMT_PRESET > m_BomFmtPresets
double m_DashedLineDashRatio
Holds all the data relating to one schematic.
void SetCurrentVariant(const wxString &aVariantName)
wxString GetVariantDescription(const wxString &aVariantName) const
Return the description for a variant.
wxString GetFileName() const
Helper to retrieve the filename from the root sheet screen.
SCHEMATIC_SETTINGS & Settings() const
SCH_SHEET_LIST Hierarchy() const
Return the full schematic flattened hierarchical sheet list.
PROJECT & Project() const
Return a reference to the project this schematic is part of.
wxString GetCurrentVariant() const
Return the current variant being edited.
EMBEDDED_FILES * GetEmbeddedFiles() override
SCH_SCREEN * RootScreen() const
Helper to retrieve the screen of the root sheet.
const std::map< wxString, wxString > * GetProperties()
Schematic editor (Eeschema) main window.
SCHEMATIC & Schematic() const
A cache assistant for the KiCad s-expression symbol libraries.
int GetFileFormatVersionAtLoad() const
void Save(const std::optional< bool > &aOpt=std::nullopt) override
Save the entire library to file m_libFileName;.
void SetFileName(const wxString &aFileName)
virtual void AddSymbol(const LIB_SYMBOL *aSymbol)
void SetModified(bool aModified=true)
static bool ConvertLibrary(std::map< std::string, UTF8 > *aOldFileProps, const wxString &aOldFilePath, const wxString &aNewFilepath)
Convert a schematic symbol library to the latest KiCad format.
static const wxString ShowType(SCH_FILE_T aFileType)
Return a brief name for a plugin, given aFileType enum.
static SCH_FILE_T GuessPluginTypeFromSchPath(const wxString &aSchematicPath, int aCtl=0)
Return a plugin type given a schematic using the file extension of aSchematicPath.
static SCH_FILE_T GuessPluginTypeFromLibPath(const wxString &aLibPath, int aCtl=0)
Return a plugin type given a symbol library using the file extension of aLibPath.
Base class for any item which can be embedded within the SCHEMATIC container class,...
Container to create a flattened list of symbols because in a complex hierarchy, a symbol can be used ...
int CheckAnnotation(ANNOTATION_ERROR_HANDLER aErrorHandler)
Check for annotations errors.
A helper to define a symbol's reference designator in a schematic.
void LoadColors(const COLOR_SETTINGS *aSettings) override
Container class that holds multiple SCH_SCREEN objects in a hierarchy.
SCH_SCREEN * GetScreen(unsigned int aIndex) const
SCH_SHEET * GetSheet(unsigned int aIndex) const
const PAGE_INFO & GetPageSettings() const
EE_RTREE & Items()
Get the full RTree, usually for iterating.
const wxString & GetFileName() const
int GetFileFormatVersionAtLoad() const
TITLE_BLOCK & GetTitleBlock()
void GetSymbols(SCH_REFERENCE_LIST &aReferences, SYMBOL_FILTER aSymbolFilter, bool aForceIncludeOrphanSymbols=false) const
Add a SCH_REFERENCE object to aReferences for each symbol in the list of sheets.
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
void SetFileName(const wxString &aFilename)
SCH_SCREEN * GetScreen() const
bool IsVirtualRootSheet() const
void GetFields(std::vector< SCH_FIELD * > &aVector, bool aVisibleOnly) const override
Populate a std::vector with SCH_FIELDs, sorted in ordinal order.
RAII class that sets an value at construction and resets it to the original value at destruction.
bool LoadProject(const wxString &aFullPath, bool aSetActive=true)
Load a project or sets up a new project with a specified path.
PROJECT * GetProject(const wxString &aFullPath) const
Retrieve a loaded project by name.
bool UnloadProject(PROJECT *aProject, bool aSave=true)
Save, unload and unregister the given PROJECT.
PROJECT & Prj() const
A helper while we are not MDI-capable – return the one and only project.
bool IsProjectOpenNotDummy() const
Helper for checking if we have a project open that is not a dummy project.
virtual bool StartPlot(const wxString &aPageNumber) override
Create SVG file header.
virtual void SetViewport(const VECTOR2I &aOffset, double aIusPerDecimil, double aScale, bool aMirror) override
Set the plot offset and scaling for the current plot.
virtual bool EndPlot() override
An interface to the global shared library manager that is schematic-specific and linked to one projec...
const std::vector< TEMPLATE_FIELDNAME > & GetTemplateFieldNames()
Return a template field name list for read only access.
wxString GetGeneratedFieldDisplayName(const wxString &aSource)
Returns any variables unexpanded, e.g.
bool IsGeneratedField(const wxString &aSource)
Returns true if the string is generated, e.g contains a single text var reference.
wxString GetDefaultPlotExtension(PLOT_FORMAT aFormat)
Return the default plot extension for a format.
void DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Display an error message with aMessage.
This file is part of the common library.
#define DEFAULT_LINE_WIDTH_MILS
The default wire width in mils. (can be changed in preference menu)
bool PrepareSaveAsFiles(SCHEMATIC &aSchematic, SCH_SCREENS &aScreens, const wxFileName &aOldRoot, const wxFileName &aNewRoot, bool aSaveCopy, bool aCopySubsheets, bool aIncludeExternSheets, std::unordered_map< SCH_SCREEN *, wxString > &aFilenameMap, wxString &aErrorMsg)
static int loadSymbolLibrarySide(const wxString &aPath, std::vector< std::unique_ptr< LIB_SYMBOL > > &aOwners, KICAD_DIFF::SYM_LIB_DIFFER::SYMBOL_MAP &aMap, bool aAllowEmpty, REPORTER &aReporter)
static SCRATCH_DOC< SCHEMATIC > loadScratchSchematic(SETTINGS_MANAGER &aMgr, const wxString &aPath)
static KICAD_DIFF::DOCUMENT_GEOMETRY symbolLibraryGeometry(const KICAD_DIFF::SYM_LIB_DIFFER::SYMBOL_MAP &aMap, const KIGFX::COLOR4D &aColor)
static const std::string CadstarNetlistFileExtension
static const std::string NetlistFileExtension
static const std::string ReportFileExtension
static const std::string ProjectFileExtension
static const std::string JsonFileExtension
static const std::string XmlFileExtension
static const std::string KiCadSchematicFileExtension
static const std::string OrCadPcb2NetlistFileExtension
static const std::string CsvFileExtension
static const std::string SpiceFileExtension
static const std::string SVGFileExtension
std::unique_ptr< T > IO_RELEASER
Helper to hold and release an IO_BASE object when exceptions are thrown.
void WriteImportReport(REPORTER *aReporter, IMPORT_REPORT_FORMAT aFormat, const wxString &aReportFile, const IMPORT_REPORT_DATA &aData)
Emit an import report in the requested format to aReportFile, or to aReporter (at INFO severity) when...
wxString DefaultImportOutputPath(const wxString &aInputFile, const wxString &aKiCadExt)
Build the default output path for an import by swapping the input file's extension for the given KiCa...
#define KICTL_NONKICAD_ONLY
chosen file is non-KiCad according to user
@ LAYER_SCHEMATIC_DRAWINGSHEET
@ LAYER_SCHEMATIC_PAGE_LIMITS
static const int ERR_ARGS
static const int ERR_RC_VIOLATIONS
Rules check violation count was greater than 0.
static const int ERR_INVALID_INPUT_FILE
static const int ERR_INVALID_OUTPUT_CONFLICT
static const int ERR_UNKNOWN_FILE_FORMAT
No plugin for the requested face recognized the input file format.
static const int ERR_UNKNOWN
const wxString DOC_PROP_ERC_SEVERITIES
void ConfigureSchDiffCanvasContext(WIDGET_DIFF_CANVAS &aCanvas, SCHEMATIC *aReference, SCHEMATIC *aComparison, const KIGFX::COLOR4D &aColor, const std::map< KIID, KIGFX::COLOR4D > &aOverrides, const std::vector< KIGFX::VIEW_ITEM * > &aExtraItems, const std::map< KIID, KICAD_DIFF::CATEGORY > &aCategories, SCH_SCREEN *aReferenceScreen, SCH_SCREEN *aComparisonScreen)
void CollectChangeBBoxes(const DOCUMENT_DIFF &aDiff, std::map< KIID_PATH, BOX2I > &aOut)
Walk a DOCUMENT_DIFF and populate a (KIID_PATH → BOX2I) map with each changed item's bbox,...
DOCUMENT_GEOMETRY ExtractSymbolGeometry(const LIB_SYMBOL &aSymbol, const KIGFX::COLOR4D &aColor, int aUnit, int aBodyStyle)
Extract coarse drawable context from a library symbol for visual symbol diffs.
DOCUMENT_GEOMETRY ExtractSchematicGeometry(const SCHEMATIC &aSchematic, const KIGFX::COLOR4D &aColor, const std::map< KIID, KIGFX::COLOR4D > &aOverrides, bool aOnlyOverrides)
Extract a coarse outline of a SCHEMATIC into a DOCUMENT_GEOMETRY for use as background context in DIF...
void AppendGeometry(DOCUMENT_GEOMETRY &aDst, DOCUMENT_GEOMETRY &&aSrc)
Move all primitives from aSrc into aDst.
DIFF_EMIT_OPTIONS MakeEmitOptions(const JOB_DIFF_BASE &aJob, const wxString &aLabelA, const wxString &aLabelB)
Build a DIFF_EMIT_OPTIONS pre-filled from the job's format, resolved output path and the supplied per...
const wxString DOC_PROP_DRAWING_SHEET
DOC_KIND
Document type a diff/merge entry point should route to, derived from a file path's extension.
int EmitDiffResult(const DOCUMENT_DIFF &aResult, const DIFF_EMIT_OPTIONS &aOptions, int aDiffExitCode, REPORTER &aReporter)
Emit a computed DOCUMENT_DIFF in the requested format.
LIB_MERGE_APPLIER< LIB_SYMBOL > SYM_LIB_MERGE_APPLIER
Symbol-library 3-way merge applier. See LIB_MERGE_APPLIER for behavior.
bool ApplyProjectFilePatches(const wxString &aOutputProPath, const nlohmann::json &aSource, const std::set< wxString > &aDocProps, DOC_KIND aKind)
Higher-level orchestrator: load the existing aOutputProPath as JSON (or start from aSource if the fil...
int DiffExitCode(const DOCUMENT_DIFF &aResult)
Map a computed diff onto its CLI exit code – SUCCESS when empty, otherwise ERR_RC_VIOLATIONS.
bool contains(const _Container &__container, _Value __value)
Returns true if the container contains the given value.
PGM_BASE & Pgm()
The global program "get" accessor.
PLOT_FORMAT
The set of supported output plot formats.
Plotting engines similar to ps (PostScript, Gerber, svg)
#define SEXPR_SYMBOL_LIB_FILE_VERSION
This file contains the file format version information for the s-expression schematic and symbol libr...
#define SEXPR_SCHEMATIC_FILE_VERSION
Schematic file version.
Definition of the SCH_SHEET_PATH and SCH_SHEET_LIST classes for Eeschema.
@ SYMBOL_FILTER_NON_POWER
SCRATCH_DOC< DOC > LoadScratchDoc(SETTINGS_MANAGER &aMgr, const wxString &aDocPath, Loader aLoader, ClearFn aClearFn)
Construct a SCRATCH_DOC by loading a project non-active and then handing it to the caller's document ...
COLOR_SETTINGS * GetColorSettings(const wxString &aName)
T * GetAppSettings(const char *aFilename)
std::vector< FAB_LAYER_COLOR > dummy
MODEL3D_FORMAT_TYPE fileType(const char *aFileName)
#define TO_UTF8(wxstring)
Convert a wxString to a UTF8 encoded C string for all wxWidgets build modes.
static std::vector< BOM_FMT_PRESET > BuiltInPresets()
wxString refRangeDelimiter
std::vector< BOM_FIELD > fieldsOrdered
static std::vector< BOM_PRESET > BuiltInPresets()
Phase 8 context for the conflict canvas.
KICAD_DIFF::DOCUMENT_GEOMETRY ancestorGeometry
std::map< KIID_PATH, BOX2I > theirsBBoxes
KICAD_DIFF::DOCUMENT_GEOMETRY oursGeometry
std::map< KIID_PATH, BOX2I > oursBBoxes
KICAD_DIFF::DOCUMENT_GEOMETRY theirsGeometry
KIGFX::COLOR4D reference
Default color for source-document context geometry.
KIGFX::COLOR4D comparison
Describes how a computed DOCUMENT_DIFF should be emitted by a diff job.
std::function< DOCUMENT_GEOMETRY(const KIGFX::COLOR4D &)> comparisonGeometry
DOC_KIND docKind
Source document type, propagated onto the scene so the PNG/SVG renderer sizes its viewport with the m...
std::function< DOCUMENT_GEOMETRY(const KIGFX::COLOR4D &)> referenceGeometry
The full set of changes between two parsed documents of one type.
Aggregate of background geometry extracted from one source document.
Result of planning a 3-way merge.
std::size_t ConflictCount() const
std::vector< KIID_PATH > unresolved
bool drawingSheetFileTouched
bool projectFileTouched
True iff the applier resolved state that lives in the .kicad_pro.
bool ercSeveritiesTouched
std::size_t sheetActionsSkipped
Number of actions skipped because they targeted a SCH_SHEET.
VALIDATION_REPORT validation
Post-apply validator pipeline result.
Outcome of a single validator run.
std::vector< VALIDATION_FAILURE > failures
std::vector< wxString > m_plotPages
DXF_UNITS m_DXF_File_Unit
wxString m_outputDirectory
bool m_PDFHierarchicalLinks
bool m_useBackgroundColor
Move-only RAII wrapper for "load a KiCad document into a non-active scratch PROJECT and clean up afte...
std::unique_ptr< DOC > doc
Hold a name of a symbol's field, field value, and default visibility.
std::map< wxString, LIB_SYMBOL *, LibSymbolMapSort > LIB_SYMBOL_MAP
wxString GetDefaultFieldName(FIELD_T aFieldId, bool aTranslateForHI)
Return a default symbol field name for a mandatory field type.
FIELD_T
The set of all field indices assuming an array like sequence that a SCH_COMPONENT or LIB_PART can hol...
wxString GetCanonicalFieldName(FIELD_T aFieldType)
wxString result
Test unit parsing edge cases and error handling.
VECTOR2< int32_t > VECTOR2I
Definition of file extensions used in Kicad.