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 );
565 bool res = helper->WriteNetlist( outPath, netlistOption, *
m_reporter );
592 if( !currentVariant.IsEmpty() && currentVariant != wxS(
"all" ) )
604 if(
copy.CheckAnnotation(
611 m_reporter->Report(
_(
"Warning: schematic has annotation errors, please use the schematic "
612 "editor to fix them\n" ),
620 if(
erc.TestDuplicateSheetNames(
false ) > 0 )
644 false, currentVariant );
646 false, currentVariant );
648 false, currentVariant );
651 std::set<wxString> userFieldNames;
653 for(
size_t i = 0; i < referenceList.
GetCount(); ++i )
655 SCH_SYMBOL* symbol = referenceList[i].GetSymbol();
659 if( !field.IsMandatory() && !field.IsPrivate() )
660 userFieldNames.insert( field.GetName() );
664 for(
const wxString& fieldName : userFieldNames )
670 if( userFieldNames.count( templateFieldname.m_Name ) == 0 )
673 false, currentVariant );
706 wxString::Format(
_(
"BOM preset '%s' not found" ) + wxS(
"\n" ), aBomJob->
m_bomPresetName ),
720 auto normalizeFieldName = [&dataModel](
const wxString& aName ) -> wxString
722 if( aName.IsEmpty() )
723 return wxEmptyString;
728 wxString wrapped = wxS(
"${" ) + aName + wxS(
"}" );
740 wxString fieldName = normalizeFieldName( rawFieldName );
742 if( fieldName.IsEmpty() )
750 if( fieldName == wxS(
"*" ) )
756 field.
name = modelField.name;
761 bool fieldAlreadyPresent =
false;
765 if( presetField.
name == field.
name )
767 fieldAlreadyPresent =
true;
772 bool fieldLaterInList =
false;
776 if( normalizeFieldName( fieldInList ) == field.
name )
778 fieldLaterInList =
true;
783 if( !fieldAlreadyPresent && !fieldLaterInList )
792 field.
name = fieldName;
793 field.
show = !fieldName.StartsWith( wxT(
"__" ), &field.
name );
821 std::optional<BOM_FMT_PRESET> schFmtPreset;
843 m_reporter->Report( wxString::Format(
_(
"BOM format preset '%s' not found" ) + wxS(
"\n" ),
865 fn.SetName( fn.GetName() );
872 bool hasVariantPlaceholder = configuredPath.Contains( wxS(
"${VARIANT}" ) );
875 std::vector<wxString> variantsToProcess;
883 variantsToProcess.push_back( currentVariant );
886 for(
const wxString& variantName : variantsToProcess )
888 std::vector<wxString> singleVariant = { variantName };
895 if( hasVariantPlaceholder )
897 wxString variantPath = configuredPath;
898 variantPath.Replace( wxS(
"${VARIANT}" ), variantName );
916 if( !f.Open( outPath, wxFile::write ) )
918 m_reporter->Report( wxString::Format(
_(
"Unable to open destination '%s'" ), outPath ),
924 bool res = f.Write( dataModel.
Export( fmt ) );
965 m_reporter->Report(
_(
"Warning: schematic has annotation errors, please use the "
966 "schematic editor to fix them\n" ),
974 if(
erc.TestDuplicateSheetNames(
false ) > 0 )
977 std::unique_ptr<NETLIST_EXPORTER_XML> xmlNetlist = std::make_unique<NETLIST_EXPORTER_XML>( sch );
982 fn.SetName( fn.GetName() +
"-bom" );
1014 std::shared_ptr<LIB_SYMBOL> parent;
1024 symbolToPlot = parent.get();
1028 for(
int unit = 1; unit < symbol->
GetUnitCount() + 1; unit++ )
1040 for( wxChar c : wxFileName::GetForbiddenChars( wxPATH_DOS ) )
1041 filename.Replace( c,
' ' );
1046 filename += wxString::Format(
"_unit%d", unit );
1050 if( bodyStyle == 2 )
1051 filename += wxS(
"_demorgan" );
1058 fn.SetName( filename );
1059 m_reporter->Report( wxString::Format(
_(
"Plotting symbol '%s' unit %d to '%s'\n" ), symbol->
GetName(),
1060 unit, fn.GetFullPath() ),
1075 const double scale = 1.0;
1080 plotter->
SetCreator( wxT(
"Eeschema-SVG" ) );
1082 if( !plotter->
OpenFile( fn.GetFullPath() ) )
1085 wxString::Format(
_(
"Unable to open destination '%s'" ) + wxS(
"\n" ), fn.GetFullPath() ),
1097 bool background =
true;
1102 symbolToPlot->
Plot( plotter, background, plotOpts, unit, bodyStyle, offset,
false );
1103 symbol->
PlotFields( plotter, background, plotOpts, unit, bodyStyle, offset,
false );
1105 symbolToPlot->
Plot( plotter, !background, plotOpts, unit, bodyStyle, offset,
false );
1106 symbol->
PlotFields( plotter, !background, plotOpts, unit, bodyStyle, offset,
false );
1131 wxString singleFileFilter;
1133 auto schLibrary = std::make_unique<SCH_IO_KICAD_SEXPR_LIB_CACHE>( fn.GetFullPath() );
1143 bool recovered =
false;
1145 if( !fn.IsDir() && wxDir::Exists( fn.GetPath() ) )
1149 schLibrary = std::make_unique<SCH_IO_KICAD_SEXPR_LIB_CACHE>( fn.GetPath() );
1151 singleFileFilter = fn.GetFullPath();
1175 symbol = schLibrary->GetSymbol( svgJob->
m_symbol );
1188 m_reporter->Report( wxString::Format(
_(
"Unable to create output directory '%s'." ) + wxS(
"\n" ),
1212 const std::map<wxString, wxString>& sourceFiles = schLibrary->GetSymbolSourceFiles();
1213 const wxFileName filterFile( singleFileFilter );
1215 for(
const auto& [
name, libSymbol] : libSymMap )
1218 if( !singleFileFilter.IsEmpty() )
1220 auto srcIt = sourceFiles.find(
name );
1222 if( srcIt == sourceFiles.end() || !wxFileName( srcIt->second ).SameAs( filterFile ) )
1263 else if(
fileType != SCH_IO_MGR::SCH_KICAD )
1265 m_reporter->Report(
_(
"Output path must be specified to convert legacy and non-KiCad libraries\n" ),
1271 if(
fileType == SCH_IO_MGR::SCH_KICAD )
1344 fn.SetName( fn.GetName() + wxS(
"-erc" ) );
1374 std::shared_ptr<SHEETLIST_ERC_ITEMS_PROVIDER> markersProvider =
1375 std::make_shared<SHEETLIST_ERC_ITEMS_PROVIDER>( sch );
1388 markersProvider->SetSeverities( ercJob->
m_severity );
1390 m_reporter->Report( wxString::Format(
_(
"Found %d violations\n" ), markersProvider->GetCount() ),
1393 ERC_REPORT reportWriter( sch, units, markersProvider );
1395 bool wroteReport =
false;
1412 if( markersProvider->GetCount() > 0 )
1424 if( aUpgradeJob ==
nullptr )
1432 bool shouldSave = aUpgradeJob->
m_force;
1444 wxFileName schPath( aUpgradeJob->
m_filename );
1445 schPath.MakeAbsolute();
1446 const wxString schFullPath = schPath.GetFullPath();
1451 SCH_SHEET* loadedSheet = pi->LoadSchematicFile( schFullPath, sch );
1452 pi->SaveSchematicFile( schFullPath, loadedSheet, sch );
1457 wxString::Format(
_(
"Error saving schematic file '%s'.\n%s" ), schFullPath, ioe.
What().GetData() );
1483 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 );
1580 m_reporter->Report( wxString::Format(
_(
"No plugin found for file type '%s'\n" ),
1586 m_reporter->Report( wxString::Format(
_(
"Importing '%s' using %s format...\n" ),
1587 inputFn.GetFullPath(), formatName ),
1590 loadedSheet = pi->LoadSchematicFile( inputFn.GetFullPath(), schematic.get() );
1600 m_reporter->Report( wxString::Format(
_(
"Error during import: %s\n" ), ioe.
What() ),
1605 size_t symbolCount = 0;
1606 size_t sheetCount = 0;
1612 std::vector<SCH_SHEET*> topLevelSheets = schematic->GetTopLevelSheets();
1613 bool loadedIsTopLevel = std::find( topLevelSheets.begin(), topLevelSheets.end(),
1614 loadedSheet ) != topLevelSheets.end();
1615 bool loadedIsVirtualRoot = loadedSheet == &schematic->Root()
1618 if( !loadedIsTopLevel && !loadedIsVirtualRoot )
1619 schematic->SetTopLevelSheets( { loadedSheet } );
1622 std::unique_ptr<TOOL_MANAGER> toolManager = std::make_unique<TOOL_MANAGER>();
1623 toolManager->SetEnvironment( schematic.get(),
nullptr,
nullptr,
Kiface().KifaceSettings(),
1628 schematic->RecalculateConnections( &dummyCommit,
GLOBAL_CLEANUP, toolManager.get() );
1631 schematic->SetSheetNumberAndCount();
1633 if(
SCH_SHEET* topSheet = schematic->GetTopLevelSheet() )
1634 topSheet->SetFileName( outputFn.GetFullName() );
1636 schematic->RootScreen()->SetFileName( outputFn.GetFullPath() );
1640 std::unordered_map<SCH_SCREEN*, wxString> filenameMap;
1641 filenameMap[schematic->RootScreen()] = outputFn.GetFullPath();
1647 filenameMap, errorMsg ) )
1657 for(
size_t i = 0; i < screens.
GetCount(); i++ )
1660 wxString
path = filenameMap[screen];
1662 if(
path.IsEmpty() )
1665 wxFileName fn(
path );
1668 pi->SaveSchematicFile( fn.GetFullPath(), screens.
GetSheet( i ), schematic.get() );
1672 symbolCount += std::distance( symbols.begin(), symbols.end() );
1677 m_reporter->Report( wxString::Format(
_(
"Error saving imported schematic: %s\n" ),
1682 catch(
const std::exception& exc )
1684 m_reporter->Report( wxString::Format(
_(
"Error saving imported schematic: %s\n" ),
1690 m_reporter->Report( wxString::Format(
_(
"Successfully saved imported schematic to '%s'\n" ),
1691 outputFn.GetFullPath() ),
1695 if(
Pgm().GetSettingsManager().IsProjectOpenNotDummy() )
1697 std::vector<FILE_INFO_PAIR>& projectSheets =
project.GetProjectFile().GetSheets();
1698 projectSheets.clear();
1705 projectSheets.emplace_back( std::make_pair( sheet->
m_Uuid, sheet->
GetName() ) );
1711 IMPORT_REPORT_DATA reportData;
1713 reportData.m_sourceFile = inputFn.GetFullName();
1714 reportData.m_sourceFormat = formatName;
1715 reportData.m_outputFile = outputFn.GetFullName();
1716 reportData.m_statistics = {
1717 { wxS(
"symbols" ), symbolCount },
1718 { wxS(
"sheets" ), sheetCount }
1749 return drawingSheet;
1781 return std::unique_ptr<SCHEMATIC>(
1789 aSch->SetProject(
nullptr );
1832 return diffExitCode;
1860 std::vector<std::unique_ptr<LIB_SYMBOL>>& aOwners,
1864 if( aAllowEmpty && aPath.IsEmpty() )
1870 aOwners = std::move( loaded.first );
1871 aMap = std::move( loaded.second );
1876 aReporter.
Report( wxString::Format(
_(
"Failed to load %s: %s\n" ), aPath, ioe.
What() ),
1879 catch(
const std::exception& e )
1882 wxString::Format(
_(
"Failed to load %s: %s\n" ), aPath, wxString::FromUTF8( e.what() ) ),
1897 for(
const auto& [
name, symbol] : aMap )
1914 std::vector<std::unique_ptr<LIB_SYMBOL>> ownersA;
1915 std::vector<std::unique_ptr<LIB_SYMBOL>> ownersB;
1937 return diffExitCode;
1962 const wxString& aFileB,
const wxString& aLabelA,
1963 const wxString& aLabelB, wxWindow* aParent,
1971 wxWindow* parent = aParent ? aParent : ( wxTheApp ? wxTheApp->GetTopWindow() :
nullptr );
1986 if( !a.
doc && !aFileA.IsEmpty() )
1992 if( !b.
doc && !aFileB.IsEmpty() )
2002 std::unique_ptr<SCHEMATIC> emptyA;
2003 std::unique_ptr<SCHEMATIC> emptyB;
2007 emptyA = std::make_unique<SCHEMATIC>( &scratchPrjA );
2008 emptyA->CreateDefaultScreens();
2013 emptyB = std::make_unique<SCHEMATIC>( &scratchPrjB );
2014 emptyB->CreateDefaultScreens();
2027 const wxString labelA = aLabelA.IsEmpty() ? aFileA : aLabelA;
2028 const wxString labelB = aLabelB.IsEmpty() ? aFileB : aLabelB;
2031 parent, labelA, labelB,
result, std::move( refGeometry ), std::move( compGeometry ),
2034 SCH_SCREEN* refScreen = schA ? schA->RootScreen() : nullptr;
2035 SCH_SCREEN* compScreen = schB ? schB->RootScreen() : nullptr;
2037 if( !aSheetPath.empty() )
2041 if( auto sp = schA->Hierarchy().GetSheetPathByKIIDPath( aSheetPath, true ) )
2042 refScreen = sp->LastScreen();
2047 if( auto sp = schB->Hierarchy().GetSheetPathByKIIDPath( aSheetPath, true ) )
2048 compScreen = sp->LastScreen();
2058 emptyA->SetProject(
nullptr );
2061 emptyB->SetProject(
nullptr );
2067 std::vector<std::unique_ptr<LIB_SYMBOL>> ownersA;
2068 std::vector<std::unique_ptr<LIB_SYMBOL>> ownersB;
2097 const wxString labelA = aLabelA.IsEmpty() ? aFileA : aLabelA;
2098 const wxString labelB = aLabelB.IsEmpty() ? aFileB : aLabelB;
2116 const wxString& aOurs,
const wxString& aTheirs,
2117 const wxString& aOutput,
bool aInteractive,
bool aSingleFile,
2128 return runSchMerge( aAncestor, aOurs, aTheirs, aOutput, aInteractive );
2133 const wxString& aTheirs,
const wxString& aOutput,
2142 if( !ancestor.
doc || !ours.
doc || !theirs.
doc )
2152 auto hasSingleRoot = [](
const SCHEMATIC* aSch )
2154 return aSch->GetTopLevelSheets().size() == 1;
2157 if( !hasSingleRoot( ancestor.
doc.get() ) || !hasSingleRoot( ours.
doc.get() ) || !hasSingleRoot( theirs.
doc.get() ) )
2159 m_reporter->Report(
_(
"sch merge requires each input to have a single top-level sheet\n" ),
2175 if( aInteractive && !plan.
Resolved() )
2177 if( !
Pgm().IsGUI() )
2179 m_reporter->Report(
_(
"--interactive requires a GUI KiCad process; the console "
2180 "kicad-cli cannot open dialogs.\n" ),
2212 if( !applier.
Apply() )
2223 m_reporter->Report(
_(
"Merge contains hierarchical sheet structure changes that sch merge "
2230 SCH_SHEET* rootSheet = ancestor.
doc->GetTopLevelSheet( 0 );
2232 wxFileName outFn( aOutput );
2233 outFn.MakeAbsolute();
2239 const wxString outDir = outFn.GetPath();
2247 std::map<wxString, SCH_SCREEN*> basenameOwner;
2249 for(
size_t i = 0; i < screens.
GetCount(); ++i )
2253 if( !screen || screen == rootScreen )
2256 const wxString basename = wxFileName( screen->
GetFileName() ).GetFullName();
2258 if( basename.IsEmpty() )
2261 auto [it, inserted] = basenameOwner.emplace( basename, screen );
2263 if( !inserted && it->second != screen )
2265 m_reporter->Report( wxString::Format(
_(
"Cannot flatten sub-sheets with duplicate "
2266 "basename '%s'\n" ),
2276 for(
size_t i = 0; i < screens.
GetCount(); ++i )
2288 if( !childScreen || childScreen == rootScreen )
2291 const wxString basename = wxFileName( childScreen->
GetFileName() ).GetFullName();
2293 if( !basename.IsEmpty() )
2301 pi->SaveSchematicFile( outFn.GetFullPath(), rootSheet, ancestor.
doc.get() );
2303 for(
size_t i = 0; i < screens.
GetCount(); ++i )
2308 if( !screen || !sheet || screen == rootScreen )
2311 const wxString basename = wxFileName( screen->
GetFileName() ).GetFullName();
2313 if( basename.IsEmpty() )
2316 wxFileName outSubFn( outDir, basename );
2317 pi->SaveSchematicFile( outSubFn.GetFullPath(), sheet, ancestor.
doc.get() );
2322 m_reporter->Report( wxString::Format(
_(
"Failed to save merged schematic: %s\n" ), ioe.
What() ),
2334 wxFileName proFn = outFn;
2351 ancestor.
doc->ErcSettings().SaveToFile( wxEmptyString,
true );
2354 ancestor.
doc->Settings().SaveToFile( wxEmptyString,
true );
2356 std::set<wxString> touched;
2366 if( !
Pgm().GetSettingsManager().SaveProjectCopy( proFn.GetFullPath(), ancestor.
project ) )
2369 wxString::Format(
_(
"Failed to save merged project file: %s\n" ), proFn.GetFullPath() ),
2380 m_reporter->Report( wxString::Format( wxS(
"%s: %s\n" ), f.validator, f.message ), f.severity );
2387 m_reporter->Report( wxString::Format(
_(
"Merge completed with %zu unresolved conflict(s) in %s\n" ),
2402#include <wx/ffile.h>
2406 const wxString& aTheirs,
const wxString& aOutput )
2408 if( aOutput.IsEmpty() )
2417 std::vector<std::unique_ptr<LIB_SYMBOL>> owners;
2421 LIB_SIDE ancestor, ours, theirs;
2423 auto loadSide = [&](
const wxString& aPath, LIB_SIDE& aSide ) ->
int
2428 aSide.owners = std::move( loaded.first );
2429 aSide.map = std::move( loaded.second );
2434 m_reporter->Report( wxString::Format(
_(
"Failed to load %s: %s\n" ), aPath, ioe.
What() ),
2437 catch(
const std::exception& e )
2440 wxString::Format(
_(
"Failed to load %s: %s\n" ), aPath, wxString::FromUTF8( e.what() ) ),
2468 std::vector<std::unique_ptr<LIB_SYMBOL>> merged = applier.
Apply();
2473 const bool hadSilentFallback = applier.
GetReport().mergePropsFallback > 0;
2479 wxFileName outFn( aOutput );
2480 outFn.MakeAbsolute();
2489 for(
auto& sym : merged )
2500 m_reporter->Report( wxString::Format(
_(
"Failed to save merged symbol library: %s\n" ), ioe.
What() ),
2506 if( !planSnapshot.
Resolved() || hadSilentFallback )
2510 std::set<KIID_PATH> conflicts( planSnapshot.
unresolved.begin(), planSnapshot.
unresolved.end() );
2513 conflicts.insert(
id );
2515 m_reporter->Report( wxString::Format(
_(
"Symbol library merge completed with %zu unresolved "
2516 "conflict(s) in %s\n" ),
2517 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 GetSelectedVariant() const
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.