104 [aKiway](
JOB* job, wxWindow* aParent ) ->
bool
110 wxCHECK( bomJob && editFrame,
false );
120 [](
JOB* job, wxWindow* aParent ) ->
bool
125 [aKiway](
JOB* job, wxWindow* aParent ) ->
bool
131 wxCHECK( netJob && editFrame,
false );
137 [aKiway](
JOB* job, wxWindow* aParent ) ->
bool
143 wxCHECK( plotJob && editFrame,
false );
148 _(
"Plotting to HPGL is no longer supported as of KiCad 10.0." ) );
156 [](
JOB* job, wxWindow* aParent ) ->
bool
161 [](
JOB* job, wxWindow* aParent ) ->
bool
166 [](
JOB* job, wxWindow* aParent ) ->
bool
171 [](
JOB* job, wxWindow* aParent ) ->
bool
176 [](
JOB* job, wxWindow* aParent ) ->
bool
180 wxCHECK( ercJob,
false );
186 [](
JOB* job, wxWindow* aParent ) ->
bool
191 [](
JOB* job, wxWindow* aParent ) ->
bool
209 if( !
Pgm().IsGUI() &&
Pgm().GetSettingsManager().IsProjectOpenNotDummy() )
212 wxString schPath = aPath;
214 if( schPath.IsEmpty() )
219 schPath =
path.GetFullPath();
227 else if(
Pgm().IsGUI() &&
Pgm().GetSettingsManager().IsProjectOpen() )
234 else if( !aPath.IsEmpty() )
246 SCHEMATIC* aSch,
const wxString& aDrawingSheetOverride )
265 auto loadSheet = [&](
const wxString&
path ) ->
bool
276 m_reporter->Report( wxString::Format(
_(
"Error loading drawing sheet '%s'." ),
path ) + wxS(
"\n" ) + msg
286 if( !aDrawingSheetOverride.IsEmpty() && loadSheet( aDrawingSheetOverride ) )
317 wxString variantName;
324 if( !variantName.IsEmpty() && variantName != wxS(
"all" ) )
327 std::unique_ptr<SCH_RENDER_SETTINGS> renderSettings = std::make_unique<SCH_RENDER_SETTINGS>();
338 renderSettings->SetDefaultFont( font );
348 for(
SCH_ITEM* item : screen->Items() )
351 for(
const auto& [libItemName, libSymbol] : screen->GetLibSymbols() )
352 libSymbol->ClearCaches();
355 std::unique_ptr<SCH_PLOTTER> schPlotter = std::make_unique<SCH_PLOTTER>( sch );
381 fn.SetName( fn.GetName() );
420 if( !variantName.IsEmpty() )
433 schPlotter->Plot( format, plotOpts, renderSettings.get(),
m_reporter );
438 for(
const wxString& outputPath : schPlotter->GetOutputFilePaths() )
465 if( variantName != wxS(
"all" ) )
482 m_reporter->Report(
_(
"Warning: schematic has annotation errors, please use the "
483 "schematic editor to fix them\n" ),
491 if(
erc.TestDuplicateSheetNames(
false ) > 0 )
494 std::unique_ptr<NETLIST_EXPORTER_BASE> helper;
495 unsigned netlistOption = 0;
503 helper = std::make_unique<NETLIST_EXPORTER_KICAD>( sch );
508 helper = std::make_unique<NETLIST_EXPORTER_ORCADPCB2>( sch );
513 helper = std::make_unique<NETLIST_EXPORTER_CADSTAR>( sch );
519 helper = std::make_unique<NETLIST_EXPORTER_SPICE>( sch );
524 helper = std::make_unique<NETLIST_EXPORTER_SPICE_MODEL>( sch );
528 fileExt = wxS(
"xml" );
529 helper = std::make_unique<NETLIST_EXPORTER_XML>( sch );
533 fileExt = wxS(
"asc" );
534 helper = std::make_unique<NETLIST_EXPORTER_PADS>( sch );
538 fileExt = wxS(
"txt" );
539 helper = std::make_unique<NETLIST_EXPORTER_ALLEGRO>( sch );
550 fn.SetName( fn.GetName() );
551 fn.SetExt( fileExt );
566 bool res = helper->WriteNetlist( outPath, netlistOption, *
m_reporter );
593 if( !currentVariant.IsEmpty() && currentVariant != wxS(
"all" ) )
605 if(
copy.CheckAnnotation(
612 m_reporter->Report(
_(
"Warning: schematic has annotation errors, please use the schematic "
613 "editor to fix them\n" ),
621 if(
erc.TestDuplicateSheetNames(
false ) > 0 )
648 std::set<wxString> userFieldNames;
650 for(
size_t i = 0; i < referenceList.
GetCount(); ++i )
652 SCH_SYMBOL* symbol = referenceList[i].GetSymbol();
656 if( !field.IsMandatory() && !field.IsPrivate() )
657 userFieldNames.insert( field.GetName() );
661 for(
const wxString& fieldName : userFieldNames )
667 if( userFieldNames.count( templateFieldname.m_Name ) == 0 )
703 wxString::Format(
_(
"BOM preset '%s' not found" ) + wxS(
"\n" ), aBomJob->
m_bomPresetName ),
717 auto normalizeFieldName = [&dataModel](
const wxString& aName ) -> wxString
719 if( aName.IsEmpty() )
720 return wxEmptyString;
725 wxString wrapped = wxS(
"${" ) + aName + wxS(
"}" );
737 wxString fieldName = normalizeFieldName( rawFieldName );
739 if( fieldName.IsEmpty() )
747 if( fieldName == wxS(
"*" ) )
753 field.
name = modelField.name;
758 bool fieldAlreadyPresent =
false;
762 if( presetField.
name == field.
name )
764 fieldAlreadyPresent =
true;
769 bool fieldLaterInList =
false;
773 if( normalizeFieldName( fieldInList ) == field.
name )
775 fieldLaterInList =
true;
780 if( !fieldAlreadyPresent && !fieldLaterInList )
789 field.
name = fieldName;
790 field.
show = !fieldName.StartsWith( wxT(
"__" ), &field.
name );
818 std::optional<BOM_FMT_PRESET> schFmtPreset;
840 m_reporter->Report( wxString::Format(
_(
"BOM format preset '%s' not found" ) + wxS(
"\n" ),
863 fn.SetName( fn.GetName() );
870 bool hasVariantPlaceholder = configuredPath.Contains( wxS(
"${VARIANT}" ) );
873 std::vector<wxString> variantsToProcess;
881 variantsToProcess.push_back( currentVariant );
884 for(
const wxString& variantName : variantsToProcess )
886 std::vector<wxString> singleVariant = { variantName };
894 if( hasVariantPlaceholder )
896 wxString variantPath = configuredPath;
897 variantPath.Replace( wxS(
"${VARIANT}" ), variantName );
915 if( !f.Open( outPath, wxFile::write ) )
917 m_reporter->Report( wxString::Format(
_(
"Unable to open destination '%s'" ), outPath ),
923 bool res = f.Write( dataModel.
Export( fmt ) );
964 m_reporter->Report(
_(
"Warning: schematic has annotation errors, please use the "
965 "schematic editor to fix them\n" ),
973 if(
erc.TestDuplicateSheetNames(
false ) > 0 )
976 std::unique_ptr<NETLIST_EXPORTER_XML> xmlNetlist = std::make_unique<NETLIST_EXPORTER_XML>( sch );
981 fn.SetName( fn.GetName() +
"-bom" );
1013 std::shared_ptr<LIB_SYMBOL> parent;
1023 symbolToPlot = parent.get();
1027 for(
int unit = 1; unit < symbol->
GetUnitCount() + 1; unit++ )
1039 for( wxChar c : wxFileName::GetForbiddenChars( wxPATH_DOS ) )
1040 filename.Replace( c,
' ' );
1045 filename += wxString::Format(
"_unit%d", unit );
1049 if( bodyStyle == 2 )
1050 filename += wxS(
"_demorgan" );
1057 fn.SetName( filename );
1058 m_reporter->Report( wxString::Format(
_(
"Plotting symbol '%s' unit %d to '%s'\n" ), symbol->
GetName(),
1059 unit, fn.GetFullPath() ),
1074 const double scale = 1.0;
1079 plotter->
SetCreator( wxT(
"Eeschema-SVG" ) );
1081 if( !plotter->
OpenFile( fn.GetFullPath() ) )
1084 wxString::Format(
_(
"Unable to open destination '%s'" ) + wxS(
"\n" ), fn.GetFullPath() ),
1096 bool background =
true;
1101 symbolToPlot->
Plot( plotter, background, plotOpts, unit, bodyStyle, offset,
false );
1102 symbol->
PlotFields( plotter, background, plotOpts, unit, bodyStyle, offset,
false );
1104 symbolToPlot->
Plot( plotter, !background, plotOpts, unit, bodyStyle, offset,
false );
1105 symbol->
PlotFields( plotter, !background, plotOpts, unit, bodyStyle, offset,
false );
1130 wxString singleFileFilter;
1132 auto schLibrary = std::make_unique<SCH_IO_KICAD_SEXPR_LIB_CACHE>( fn.GetFullPath() );
1142 bool recovered =
false;
1144 if( !fn.IsDir() && wxDir::Exists( fn.GetPath() ) )
1148 schLibrary = std::make_unique<SCH_IO_KICAD_SEXPR_LIB_CACHE>( fn.GetPath() );
1150 singleFileFilter = fn.GetFullPath();
1174 symbol = schLibrary->GetSymbol( svgJob->
m_symbol );
1187 m_reporter->Report( wxString::Format(
_(
"Unable to create output directory '%s'." ) + wxS(
"\n" ),
1211 const std::map<wxString, wxString>& sourceFiles = schLibrary->GetSymbolSourceFiles();
1212 const wxFileName filterFile( singleFileFilter );
1214 for(
const auto& [
name, libSymbol] : libSymMap )
1217 if( !singleFileFilter.IsEmpty() )
1219 auto srcIt = sourceFiles.find(
name );
1221 if( srcIt == sourceFiles.end() || !wxFileName( srcIt->second ).SameAs( filterFile ) )
1262 else if(
fileType != SCH_IO_MGR::SCH_KICAD )
1264 m_reporter->Report(
_(
"Output path must be specified to convert legacy and non-KiCad libraries\n" ),
1270 if(
fileType == SCH_IO_MGR::SCH_KICAD )
1343 fn.SetName( fn.GetName() + wxS(
"-erc" ) );
1373 std::shared_ptr<SHEETLIST_ERC_ITEMS_PROVIDER> markersProvider =
1374 std::make_shared<SHEETLIST_ERC_ITEMS_PROVIDER>( sch );
1387 markersProvider->SetSeverities( ercJob->
m_severity );
1389 m_reporter->Report( wxString::Format(
_(
"Found %d violations\n" ), markersProvider->GetCount() ),
1392 ERC_REPORT reportWriter( sch, units, markersProvider );
1394 bool wroteReport =
false;
1411 if( markersProvider->GetCount() > 0 )
1423 if( aUpgradeJob ==
nullptr )
1431 bool shouldSave = aUpgradeJob->
m_force;
1443 wxFileName schPath( aUpgradeJob->
m_filename );
1444 schPath.MakeAbsolute();
1445 const wxString schFullPath = schPath.GetFullPath();
1450 SCH_SHEET* loadedSheet = pi->LoadSchematicFile( schFullPath, sch );
1451 pi->SaveSchematicFile( schFullPath, loadedSheet, sch );
1456 wxString::Format(
_(
"Error saving schematic file '%s'.\n%s" ), schFullPath, ioe.
What().GetData() );
1482 SCH_IO_MGR::SCH_FILE_T
fileType = SCH_IO_MGR::SCH_FILE_UNKNOWN;
1501 if(
fileType == SCH_IO_MGR::SCH_FILE_UNKNOWN )
1504 m_reporter->Report( wxString::Format(
_(
"No schematic importer recognizes the file format "
1513 if( outputPath.IsEmpty() )
1517 inputFn.MakeAbsolute();
1519 wxFileName outputFn( outputPath );
1520 outputFn.MakeAbsolute();
1526 PROJECT* projectPtr =
nullptr;
1527 bool createdTransientProject =
false;
1531 projectPtr = &mgr.
Prj();
1535 wxFileName projectFn( outputFn );
1539 projectPtr = mgr.
GetProject( projectFn.GetFullPath() );
1540 createdTransientProject = ( projectPtr != nullptr );
1545 m_reporter->Report(
_(
"Could not establish a project for the import\n" ),
1554 struct TRANSIENT_PROJECT_GUARD
1560 ~TRANSIENT_PROJECT_GUARD()
1565 } transientProjectGuard{ mgr, projectPtr, createdTransientProject };
1569 std::unique_ptr<SCHEMATIC> schematic = std::make_unique<SCHEMATIC>( &
project );
1579 m_reporter->Report( wxString::Format(
_(
"No plugin found for file type '%s'\n" ),
1587 m_reporter->Report( wxString::Format(
_(
"Importing '%s' using %s format...\n" ),
1588 inputFn.GetFullPath(), formatName ),
1591 loadedSheet = pi->LoadSchematicFile( inputFn.GetFullPath(), schematic.get() );
1601 m_reporter->Report( wxString::Format(
_(
"Error during import: %s\n" ), ioe.
What() ),
1606 size_t symbolCount = 0;
1607 size_t sheetCount = 0;
1613 std::vector<SCH_SHEET*> topLevelSheets = schematic->GetTopLevelSheets();
1614 bool loadedIsTopLevel = std::find( topLevelSheets.begin(), topLevelSheets.end(),
1615 loadedSheet ) != topLevelSheets.end();
1616 bool loadedIsVirtualRoot = loadedSheet == &schematic->Root()
1619 if( !loadedIsTopLevel && !loadedIsVirtualRoot )
1620 schematic->SetTopLevelSheets( { loadedSheet } );
1628 std::unique_ptr<TOOL_MANAGER> toolManager = std::make_unique<TOOL_MANAGER>();
1629 toolManager->SetEnvironment( schematic.get(),
nullptr,
nullptr,
Kiface().KifaceSettings(),
1634 schematic->RecalculateConnections( &dummyCommit,
GLOBAL_CLEANUP, toolManager.get() );
1637 schematic->SetSheetNumberAndCount();
1639 if(
SCH_SHEET* topSheet = schematic->GetTopLevelSheet() )
1640 topSheet->SetFileName( outputFn.GetFullName() );
1642 schematic->RootScreen()->SetFileName( outputFn.GetFullPath() );
1646 std::unordered_map<SCH_SCREEN*, wxString> filenameMap;
1647 filenameMap[schematic->RootScreen()] = outputFn.GetFullPath();
1653 filenameMap, errorMsg ) )
1663 for(
size_t i = 0; i < screens.
GetCount(); i++ )
1666 wxString
path = filenameMap[screen];
1668 if(
path.IsEmpty() )
1671 wxFileName fn(
path );
1674 kicadPi->SaveSchematicFile( fn.GetFullPath(), screens.
GetSheet( i ), schematic.get() );
1678 symbolCount += std::distance( symbols.begin(), symbols.end() );
1683 m_reporter->Report( wxString::Format(
_(
"Error saving imported schematic: %s\n" ),
1688 catch(
const std::exception& exc )
1690 m_reporter->Report( wxString::Format(
_(
"Error saving imported schematic: %s\n" ),
1696 m_reporter->Report( wxString::Format(
_(
"Successfully saved imported schematic to '%s'\n" ),
1697 outputFn.GetFullPath() ),
1701 if(
Pgm().GetSettingsManager().IsProjectOpenNotDummy() )
1703 std::vector<FILE_INFO_PAIR>& projectSheets =
project.GetProjectFile().GetSheets();
1704 projectSheets.clear();
1711 projectSheets.emplace_back( std::make_pair( sheet->
m_Uuid, sheet->
GetName() ) );
1717 IMPORT_REPORT_DATA reportData;
1719 reportData.m_sourceFile = inputFn.GetFullName();
1720 reportData.m_sourceFormat = formatName;
1721 reportData.m_outputFile = outputFn.GetFullName();
1722 reportData.m_statistics = {
1723 { wxS(
"symbols" ), symbolCount },
1724 { wxS(
"sheets" ), sheetCount }
1755 return drawingSheet;
1787 return std::unique_ptr<SCHEMATIC>(
1795 aSch->SetProject(
nullptr );
1838 return diffExitCode;
1866 std::vector<std::unique_ptr<LIB_SYMBOL>>& aOwners,
1870 if( aAllowEmpty && aPath.IsEmpty() )
1876 aOwners = std::move( loaded.first );
1877 aMap = std::move( loaded.second );
1882 aReporter.
Report( wxString::Format(
_(
"Failed to load %s: %s\n" ), aPath, ioe.
What() ),
1885 catch(
const std::exception& e )
1888 wxString::Format(
_(
"Failed to load %s: %s\n" ), aPath, wxString::FromUTF8( e.what() ) ),
1903 for(
const auto& [
name, symbol] : aMap )
1920 std::vector<std::unique_ptr<LIB_SYMBOL>> ownersA;
1921 std::vector<std::unique_ptr<LIB_SYMBOL>> ownersB;
1943 return diffExitCode;
1968 const wxString& aFileB,
const wxString& aLabelA,
1969 const wxString& aLabelB, wxWindow* aParent,
1977 wxWindow* parent = aParent ? aParent : ( wxTheApp ? wxTheApp->GetTopWindow() :
nullptr );
1992 if( !a.
doc && !aFileA.IsEmpty() )
1998 if( !b.
doc && !aFileB.IsEmpty() )
2008 std::unique_ptr<SCHEMATIC> emptyA;
2009 std::unique_ptr<SCHEMATIC> emptyB;
2013 emptyA = std::make_unique<SCHEMATIC>( &scratchPrjA );
2014 emptyA->CreateDefaultScreens();
2019 emptyB = std::make_unique<SCHEMATIC>( &scratchPrjB );
2020 emptyB->CreateDefaultScreens();
2033 const wxString labelA = aLabelA.IsEmpty() ? aFileA : aLabelA;
2034 const wxString labelB = aLabelB.IsEmpty() ? aFileB : aLabelB;
2037 parent, labelA, labelB,
result, std::move( refGeometry ), std::move( compGeometry ),
2040 SCH_SCREEN* refScreen = schA ? schA->RootScreen() : nullptr;
2041 SCH_SCREEN* compScreen = schB ? schB->RootScreen() : nullptr;
2043 if( !aSheetPath.empty() )
2047 if( auto sp = schA->Hierarchy().GetSheetPathByKIIDPath( aSheetPath, true ) )
2048 refScreen = sp->LastScreen();
2053 if( auto sp = schB->Hierarchy().GetSheetPathByKIIDPath( aSheetPath, true ) )
2054 compScreen = sp->LastScreen();
2064 emptyA->SetProject(
nullptr );
2067 emptyB->SetProject(
nullptr );
2073 std::vector<std::unique_ptr<LIB_SYMBOL>> ownersA;
2074 std::vector<std::unique_ptr<LIB_SYMBOL>> ownersB;
2103 const wxString labelA = aLabelA.IsEmpty() ? aFileA : aLabelA;
2104 const wxString labelB = aLabelB.IsEmpty() ? aFileB : aLabelB;
2122 const wxString& aOurs,
const wxString& aTheirs,
2123 const wxString& aOutput,
bool aInteractive,
bool aSingleFile,
2134 return runSchMerge( aAncestor, aOurs, aTheirs, aOutput, aInteractive );
2139 const wxString& aTheirs,
const wxString& aOutput,
2148 if( !ancestor.
doc || !ours.
doc || !theirs.
doc )
2158 auto hasSingleRoot = [](
const SCHEMATIC* aSch )
2160 return aSch->GetTopLevelSheets().size() == 1;
2163 if( !hasSingleRoot( ancestor.
doc.get() ) || !hasSingleRoot( ours.
doc.get() ) || !hasSingleRoot( theirs.
doc.get() ) )
2165 m_reporter->Report(
_(
"sch merge requires each input to have a single top-level sheet\n" ),
2181 if( aInteractive && !plan.
Resolved() )
2183 if( !
Pgm().IsGUI() )
2185 m_reporter->Report(
_(
"--interactive requires a GUI KiCad process; the console "
2186 "kicad-cli cannot open dialogs.\n" ),
2218 if( !applier.
Apply() )
2229 m_reporter->Report(
_(
"Merge contains hierarchical sheet structure changes that sch merge "
2236 SCH_SHEET* rootSheet = ancestor.
doc->GetTopLevelSheet( 0 );
2238 wxFileName outFn( aOutput );
2239 outFn.MakeAbsolute();
2245 const wxString outDir = outFn.GetPath();
2253 std::map<wxString, SCH_SCREEN*> basenameOwner;
2255 for(
size_t i = 0; i < screens.
GetCount(); ++i )
2259 if( !screen || screen == rootScreen )
2262 const wxString basename = wxFileName( screen->
GetFileName() ).GetFullName();
2264 if( basename.IsEmpty() )
2267 auto [it, inserted] = basenameOwner.emplace( basename, screen );
2269 if( !inserted && it->second != screen )
2271 m_reporter->Report( wxString::Format(
_(
"Cannot flatten sub-sheets with duplicate "
2272 "basename '%s'\n" ),
2282 for(
size_t i = 0; i < screens.
GetCount(); ++i )
2294 if( !childScreen || childScreen == rootScreen )
2297 const wxString basename = wxFileName( childScreen->
GetFileName() ).GetFullName();
2299 if( !basename.IsEmpty() )
2307 pi->SaveSchematicFile( outFn.GetFullPath(), rootSheet, ancestor.
doc.get() );
2309 for(
size_t i = 0; i < screens.
GetCount(); ++i )
2314 if( !screen || !sheet || screen == rootScreen )
2317 const wxString basename = wxFileName( screen->
GetFileName() ).GetFullName();
2319 if( basename.IsEmpty() )
2322 wxFileName outSubFn( outDir, basename );
2323 pi->SaveSchematicFile( outSubFn.GetFullPath(), sheet, ancestor.
doc.get() );
2328 m_reporter->Report( wxString::Format(
_(
"Failed to save merged schematic: %s\n" ), ioe.
What() ),
2340 wxFileName proFn = outFn;
2357 ancestor.
doc->ErcSettings().SaveToFile( wxEmptyString,
true );
2360 ancestor.
doc->Settings().SaveToFile( wxEmptyString,
true );
2362 std::set<wxString> touched;
2372 if( !
Pgm().GetSettingsManager().SaveProjectCopy( proFn.GetFullPath(), ancestor.
project ) )
2375 wxString::Format(
_(
"Failed to save merged project file: %s\n" ), proFn.GetFullPath() ),
2386 m_reporter->Report( wxString::Format( wxS(
"%s: %s\n" ), f.validator, f.message ), f.severity );
2393 m_reporter->Report( wxString::Format(
_(
"Merge completed with %zu unresolved conflict(s) in %s\n" ),
2408#include <wx/ffile.h>
2412 const wxString& aTheirs,
const wxString& aOutput )
2414 if( aOutput.IsEmpty() )
2423 std::vector<std::unique_ptr<LIB_SYMBOL>> owners;
2427 LIB_SIDE ancestor, ours, theirs;
2429 auto loadSide = [&](
const wxString& aPath, LIB_SIDE& aSide ) ->
int
2434 aSide.owners = std::move( loaded.first );
2435 aSide.map = std::move( loaded.second );
2440 m_reporter->Report( wxString::Format(
_(
"Failed to load %s: %s\n" ), aPath, ioe.
What() ),
2443 catch(
const std::exception& e )
2446 wxString::Format(
_(
"Failed to load %s: %s\n" ), aPath, wxString::FromUTF8( e.what() ) ),
2474 std::vector<std::unique_ptr<LIB_SYMBOL>> merged = applier.
Apply();
2479 const bool hadSilentFallback = applier.
GetReport().mergePropsFallback > 0;
2485 wxFileName outFn( aOutput );
2486 outFn.MakeAbsolute();
2495 for(
auto& sym : merged )
2506 m_reporter->Report( wxString::Format(
_(
"Failed to save merged symbol library: %s\n" ), ioe.
What() ),
2512 if( !planSnapshot.
Resolved() || hadSilentFallback )
2516 std::set<KIID_PATH> conflicts( planSnapshot.
unresolved.begin(), planSnapshot.
unresolved.end() );
2519 conflicts.insert(
id );
2521 m_reporter->Report( wxString::Format(
_(
"Symbol library merge completed with %zu unresolved "
2522 "conflict(s) in %s\n" ),
2523 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 ApplyBomPreset(const BOM_PRESET &preset)
wxString Export(const BOM_FMT_PRESET &settings)
void AddColumn(const wxString &aFieldName, const wxString &aLabel, bool aAddedByUser)
static const wxString ITEM_NUMBER_VARIABLE
void UpdateReferences(const SCH_REFERENCE_LIST &aRefs)
const SCH_REFERENCE_LIST & GetReferenceList() const
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
wxString GetSelectedVariant() const
std::vector< wxString > m_variantNames
wxString m_stringDelimiter
wxString m_fieldDelimiter
bool m_includeByteOrderMark
std::vector< wxString > m_fieldsOrdered
wxString m_refRangeDelimiter
std::vector< wxString > m_fieldsLabels
std::vector< wxString > m_fieldsGroupBy
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.
bool includeByteOrderMark
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.
SYMBOL_IMPORT_RECONCILE_RESULT ReconcileImportedSymbols(SCH_IO &aPlugin, SCHEMATIC &aSchematic, PROJECT &aProject, const wxString &aSchematicPath, const std::map< std::string, UTF8 > *aProperties, REPORTER &aReporter)
Reconcile aSchematic against the definitions aPlugin retained while loading it.
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.