|
KiCad PCB EDA Suite
|
#include <downgrade/sch_downgrade.h>#include <downgrade_scan.h>#include <cctype>#include <climits>#include <functional>#include <iterator>#include <map>#include <memory>#include <optional>#include <set>#include <string>#include <vector>#include <base_units.h>#include <common.h>#include <bus_alias.h>#include <eda_text.h>#include <project/net_settings.h>#include <project.h>#include <sch_file_versions.h>#include <sch_io/kicad_sexpr/writers/sch_writer_v9.h>#include <sch_io/kicad_sexpr/writers/sch_writer_v10.h>#include <schematic.h>#include <sch_screen.h>#include <sch_line.h>#include <sch_label.h>#include <sch_shape.h>#include <sch_sheet.h>#include <sch_symbol.h>#include <sch_group.h>#include <sch_pin.h>#include <sch_rule_area.h>#include <sch_sheet_path.h>#include <lib_symbol.h>#include <pin_map.h>#include <bitmap_base.h>#include <sch_bitmap.h>#include <string_utils.h>#include <eda_shape.h>#include <geometry/shape_ellipse.h>#include <geometry/shape_poly_set.h>Go to the source code of this file.
Classes | |
| struct | TEXT_DOWNGRADE_PLAN |
| struct | FROZEN_BUS_VECTOR |
| struct | SCREEN_RULE |
| struct | SYMBOL_VARIANT_SNAPSHOT |
| struct | SHEET_VARIANT_SNAPSHOT |
Functions | |
| static bool | isEllipse (const SCH_ITEM *aItem) |
| static bool | isHatchedFillItem (const SCH_ITEM &aItem) |
| static void | closePolyline (std::vector< VECTOR2I > &aPoints) |
| static void | ellipseToPolygon (SCH_SHAPE *aShape) |
| static bool | isRoundedRect (const SCH_ITEM *aItem) |
| static void | roundedRectToPolygon (SCH_SHAPE *aShape) |
| static bool | hasEscapedStackedPinNumber (const wxString &aNumber) |
| static bool | usesPlainStackedPinNumber (const wxString &aNumber) |
| static int | countSymbolEllipses (const LIB_SYMBOL *aSymbol) |
| static void | lowerSymbolEllipses (LIB_SYMBOL *aSymbol) |
| static int | countSymbolHatchedFills (const LIB_SYMBOL *aSymbol) |
| static void | lowerSymbolHatchedFills (LIB_SYMBOL *aSymbol) |
| static int | countSymbolPinMaps (const LIB_SYMBOL *aSymbol) |
| static void | dropSymbolPinMaps (LIB_SYMBOL *aSymbol) |
| static int | countSymbolRoundedRects (const LIB_SYMBOL *aSymbol) |
| static void | lowerSymbolRoundedRects (LIB_SYMBOL *aSymbol) |
| static int | countSymbolLocalPower (const LIB_SYMBOL *aSymbol) |
| static int | countSymbolEscapedStackedPins (const LIB_SYMBOL *aSymbol) |
| static int | countSymbolStackedPins (const LIB_SYMBOL *aSymbol) |
| static int | countSymbolJumperPins (const LIB_SYMBOL *aSymbol) |
| static void | dropSymbolJumperPins (LIB_SYMBOL *aSymbol) |
| static int | countSymbolNamedBodyStyles (const LIB_SYMBOL *aSymbol) |
| static void | dropSymbolBodyStyleNames (LIB_SYMBOL *aSymbol) |
| static int | countSelectedCustomBodyStyles (const SCH_SCREEN *aScreen) |
| static int | countUnresolvedCustomBodyStyles (const SCH_SCREEN *aScreen) |
| static void | bakeSelectedCustomBodyStyles (SCH_SCREEN *aScreen) |
| static int | countSymbolPositionExclusions (const LIB_SYMBOL *aSymbol) |
| static void | dropSymbolPositionExclusions (LIB_SYMBOL *aSymbol) |
| static int | countPositionExclusions (const SCH_SCREEN *aScreen) |
| static void | dropPositionExclusions (SCH_SCREEN *aScreen) |
| static bool | hasOwnLock (const SCH_ITEM *aItem) |
| static int | countLockedItems (const SCH_SCREEN *aScreen) |
| static void | unlockItems (SCH_SCREEN *aScreen) |
| static int | countEllipses (const SCH_SCREEN *aScreen) |
| static void | lowerEllipses (SCH_SCREEN *aScreen) |
| static int | countHatchedFills (const SCH_SCREEN *aScreen) |
| static void | lowerHatchedFills (SCH_SCREEN *aScreen) |
| static bool | hasPinMaps (const SCH_SYMBOL *aSymbol) |
| static int | countPinMaps (const SCH_SCREEN *aScreen) |
| static void | dropPinMaps (SCH_SCREEN *aScreen) |
| static int | countNamedBodyStyles (const SCH_SCREEN *aScreen) |
| static void | dropNamedBodyStyles (SCH_SCREEN *aScreen) |
| static int | countGroups (const SCH_SCREEN *aScreen) |
| static void | ungroupAll (SCH_SCREEN *aScreen) |
| static int | countJumperPinGroups (const SCH_SCREEN *aScreen) |
| static void | dropJumperPinGroups (SCH_SCREEN *aScreen) |
| static int | countRoundedRects (const SCH_SCREEN *aScreen) |
| static void | lowerRoundedRects (SCH_SCREEN *aScreen) |
| static int | countLocalPowerSymbols (const SCH_SCREEN *aScreen) |
| static bool | hasRuleAreaFlags (const SCH_RULE_AREA *aArea) |
| static int | countRuleAreaFlags (const SCH_SCREEN *aScreen) |
| static void | dropRuleAreaFlags (SCH_SCREEN *aScreen) |
| static int | countEscapedStackedPins (const SCH_SCREEN *aScreen) |
| static int | countStackedPins (const SCH_SCREEN *aScreen) |
| static void | omitSymbolGraphics (LIB_SYMBOL *aSymbol, const std::function< bool(const SCH_ITEM *)> &aMatches) |
| static void | omitScreenItems (SCH_SCREEN *aScreen, const std::function< bool(const SCH_ITEM *)> &aMatches) |
| static void | omitSelectedCustomBodyStyles (SCH_SCREEN *aScreen) |
| static void | omitSymbolEllipses (LIB_SYMBOL *aSymbol) |
| static void | omitSymbolRoundedRects (LIB_SYMBOL *aSymbol) |
| static void | omitEllipses (SCH_SCREEN *aScreen) |
| static void | omitRoundedRects (SCH_SCREEN *aScreen) |
| static void | omitSymbolHatchedFills (LIB_SYMBOL *aSymbol) |
| static void | omitHatchedFills (SCH_SCREEN *aScreen) |
| static void | visitSymbolItems (const LIB_SYMBOL *aSymbol, const std::function< void(EDA_ITEM *)> &aVisit) |
| static void | visitScreenItems (const SCH_SCREEN *aScreen, const std::function< void(EDA_ITEM *)> &aVisit) |
| static bool | isPostTargetTextVar (const wxString &aToken) |
| static bool | hasPostTargetTextVars (const wxString &aText) |
| static bool | hasActiveExpression (const wxString &aText) |
| static bool | hasEscapedTextControl (const wxString &aText) |
| static bool | textNeedsDowngrade (const wxString &aText, const PROJECT *aProject, bool aLegacyExpressions, std::set< wxString > &aVisiting, const TITLE_BLOCK *aTitles=nullptr) |
| static wxString | bakeLegacyExpressions (wxString aText, const SCH_ITEM *aItem, const SCH_SHEET_PATH *aPath, bool &aFailed) |
| static void | planTextDowngrade (EDA_ITEM *aItem, const std::vector< SCH_SHEET_PATH > &aPaths, bool aLibrary, bool aLegacyExpressions, TEXT_DOWNGRADE_PLAN &aPlan, const TITLE_BLOCK *aTitles=nullptr) |
| static TEXT_DOWNGRADE_PLAN | symbolTextPlan (const LIB_SYMBOL *aSymbol, bool aLegacyExpressions) |
| static TEXT_DOWNGRADE_PLAN | screenTextPlan (const SCH_SCREEN *aScreen, bool aLegacyExpressions) |
| static void | reportTextPlan (const TEXT_DOWNGRADE_PLAN &aPlan, COMPATIBILITY_REPORT &aReport) |
| static void | applyTextPlan (const TEXT_DOWNGRADE_PLAN &aPlan) |
| static bool | hasPaddedBusVector (const wxString &aText) |
| static FROZEN_BUS_VECTOR | frozenBusVector (const wxString &aBus, bool aPreTen) |
| static bool | hasIncompatibleBusVector (const wxString &aText, bool aPreTen) |
| static int | countIncompatibleBusLabels (const SCH_SCREEN *aScreen, bool aPreTen) |
| static int | countPaddedBusLabels (const SCH_SCREEN *aScreen) |
| static void | reportPaddedBuses (int aCount, COMPATIBILITY_REPORT &aReport) |
| static void | reportIncompatibleBuses (int aCount, COMPATIBILITY_REPORT &aReport) |
| static int | countSymbolCustomProperties (const LIB_SYMBOL *aSymbol) |
| static int | countCustomProperties (const SCH_SCREEN *aScreen) |
| static void | dropSymbolCustomProperties (LIB_SYMBOL *aSymbol) |
| static void | dropCustomProperties (SCH_SCREEN *aScreen) |
| static int | countAlternateSymbols (const SCH_SCREEN *aScreen) |
| static void | dropAlternateSymbols (SCH_SCREEN *aScreen) |
| static bool | hasLineEndings (const SCH_ITEM *aItem) |
| static SCH_SHAPE | lineEndingShape (const SCH_ITEM *aItem) |
| static bool | canLowerLineEndings (const SCH_ITEM *aItem) |
| static void | clearLineEndings (SCH_ITEM *aItem) |
| static int | countSymbolLineEndings (const LIB_SYMBOL *aSymbol) |
| static int | countLineEndings (const SCH_SCREEN *aScreen) |
| static std::vector< SCH_SHAPE * > | lineEndingPolygons (SCH_ITEM *aItem) |
| static void | lowerSymbolLineEndings (LIB_SYMBOL *aSymbol) |
| static void | lowerLineEndings (SCH_SCREEN *aScreen) |
| static void | dropSymbolLineEndings (LIB_SYMBOL *aSymbol) |
| static void | dropLineEndings (SCH_SCREEN *aScreen) |
| static std::vector< SCREEN_RULE > | screenRules () |
| COMPATIBILITY_REPORT | ClassifyScreenForDowngrade (const SCH_SCREEN *aScreen, const DOWNGRADE_TARGET &aTarget, bool aDropInsteadOfApproximate) |
| Report what a schematic screen would lose if exported to an older KiCad. | |
| static void | compensateReferenceImageScales (SCH_SCREEN *aScreen) |
| COMPATIBILITY_REPORT | ClassifySchematicStructureForDowngrade (const SCHEMATIC &aSchematic, const DOWNGRADE_TARGET &aTarget) |
| Schematic-wide structure the per-screen rules cannot see. Does not modify it. | |
| void | DowngradeScreenInPlace (SCH_SCREEN *aScreen, const DOWNGRADE_TARGET &aTarget, bool aDropInsteadOfApproximate) |
| Approximate or remove, in place, what the target cannot represent. | |
| COMPATIBILITY_REPORT | ClassifyLibSymbolForDowngrade (const LIB_SYMBOL *aSymbol, const DOWNGRADE_TARGET &aTarget, bool aDropInsteadOfApproximate) |
| Report what a library symbol would lose if exported to an older KiCad. Does not modify it. | |
| void | DowngradeLibSymbolInPlace (LIB_SYMBOL *aSymbol, const DOWNGRADE_TARGET &aTarget, bool aDropInsteadOfApproximate) |
| Symbol-scoped downgrade for standalone .kicad_sym files the screen pass never sees. | |
| void | SaveSchematicForTarget (SCH_SHEET *aSheet, SCHEMATIC *aSchematic, const wxString &aPath, const DOWNGRADE_TARGET &aTarget) |
| Save a schematic sheet file stamped for the target, using the writer for that version. | |
| void | SaveSymbolLibraryForTarget (const std::vector< LIB_SYMBOL * > &aSymbols, const wxString &aPath, const DOWNGRADE_TARGET &aTarget) |
| Save a .kicad_sym library stamped for the target. | |
| int | SymbolLibDowngradeCoveredVersion () |
| The symbol library format the denylist was generated against. | |
| int | SchDowngradeCoveredVersion () |
| The format the denylist was generated against. A format bump forces a review. | |
| wxString | FindUnsupportedSchToken (const wxString &aSerialized, const DOWNGRADE_TARGET &aTarget) |
| Scan serialized schematic text for tokens the target cannot parse. | |
| static SYMBOL_VARIANT_SNAPSHOT | snapshotSymbol (const SCH_SYMBOL *aSymbol, const SCH_SHEET_PATH &aPath, const wxString &aVariantName) |
| static SHEET_VARIANT_SNAPSHOT | snapshotSheet (const SCH_SHEET *aSheet, const SCH_SHEET_PATH &aPath, const wxString &aVariantName) |
| bool | FlattenSchematicVariant (SCHEMATIC &aSchematic, const wxString &aVariantName, wxString *aConflict) |
| Bake a variant into the base attributes of every symbol and sheet. | |
Variables | |
| static constexpr int | SCH_VER_SHAPE_HATCH = 20250222 |
| static constexpr int | SCH_VER_LOCAL_POWER = 20250227 |
| static constexpr int | SCH_VER_JUMPER_PINS = 20250324 |
| static constexpr int | SCH_VER_GROUPS = 20250513 |
| static constexpr int | SCH_VER_RULE_AREA_FLAGS = 20250610 |
| static constexpr int | SCH_VER_ROUNDED_RECT = 20250829 |
| static constexpr int | SCH_VER_LOCKING = 20260326 |
| static constexpr int | SCH_VER_ELLIPSE = 20260508 |
| static constexpr int | SCH_VER_STACKED_PINS = 20250901 |
| static constexpr int | SCH_VER_STACKED_PIN_ESCAPES = 20260622 |
| static constexpr int | SCH_VER_PIN_MAPS = 20260629 |
| static constexpr int | SCH_VER_BODY_STYLES = 20250827 |
| static constexpr int | SCH_VER_POSITION_EXCLUSIONS = 20260101 |
| static constexpr int | SCH_VER_IMAGE_PPI = 20260623 |
| static constexpr int | SCH_VER_LINE_ENDINGS = 20260818 |
| static constexpr int | SYMLIB_VER_LINE_ENDINGS = 20260710 |
| static constexpr int | SCH_VER_ALTERNATE_SYMBOLS = 20260722 |
| static constexpr int | SCH_VER_CUSTOM_PROPERTIES = 20260830 |
| static constexpr int | SCH_DOWNGRADE_COVERED = 20260830 |
| static constexpr int | SYMLIB_DOWNGRADE_COVERED = 20260830 |
| static constexpr KICAD_T | FILLABLE_TYPES [] = { SCH_SHAPE_T, SCH_TEXTBOX_T, SCH_RULE_AREA_T } |
| static constexpr DATED_TOKEN | SCH_TOKENS [] |
| static constexpr DATED_TOKEN | SCH_VALUES [] |
|
static |
Definition at line 1387 of file sch_downgrade.cpp.
References TEXT_DOWNGRADE_PLAN::m_replacements, and text.
Referenced by DowngradeLibSymbolInPlace(), and DowngradeScreenInPlace().
|
static |
Definition at line 1145 of file sch_downgrade.cpp.
References empty(), end, ExtractTextVarReferences(), FinalizeTextVarExpansion(), hasActiveExpression(), hasPostTargetTextVars(), INTERNAL, and SCH_ITEM::ResolveText().
Referenced by planTextDowngrade().
|
static |
Definition at line 413 of file sch_downgrade.cpp.
References SCH_SCREEN::AddLibSymbol(), SCH_SCREEN::Append(), BASE, DEMORGAN, LIB_SYMBOL::Flatten(), LIB_ID::Format(), LIB_SYMBOL::GetDrawItems(), LIB_SYMBOL::GetLibId(), SCH_SCREEN::GetLibSymbols(), SCH_SCREEN::Items(), name, EE_RTREE::OfType(), SCH_SCREEN::Remove(), LIB_SYMBOL::RemoveDrawItem(), SCH_SYMBOL_T, LIB_SYMBOL::SetBodyStyleNames(), LIB_SYMBOL::SetHasDeMorganBodyStyles(), LIB_SYMBOL::SetLibId(), LIB_SYMBOL::SetName(), and UTF8::wx_str().
Referenced by screenRules().
|
static |
Definition at line 1760 of file sch_downgrade.cpp.
References DEFAULT, STROKE_PARAMS::GetColor(), SCH_SHAPE::GetEffectiveWidth(), EDA_SHAPE::GetEndEnding(), EDA_SHAPE::GetFillMode(), SCH_ITEM::GetLayer(), EDA_SHAPE::GetLineStyle(), EDA_SHAPE::GetStartEnding(), SCH_SHAPE::GetStroke(), EDA_SHAPE::IsClosed(), LAYER_NOTES, lineEndingShape(), NO_FILL, NONE, SCH_LINE_T, SOLID, EDA_ITEM::Type(), and COLOR4D::UNSPECIFIED.
Referenced by ClassifyLibSymbolForDowngrade(), ClassifyScreenForDowngrade(), lowerLineEndings(), and lowerSymbolLineEndings().
| COMPATIBILITY_REPORT ClassifyLibSymbolForDowngrade | ( | const LIB_SYMBOL * | aSymbol, |
| const DOWNGRADE_TARGET & | aTarget, | ||
| bool | aDropInsteadOfApproximate ) |
Report what a library symbol would lose if exported to an older KiCad. Does not modify it.
Definition at line 2227 of file sch_downgrade.cpp.
References _, COMPATIBILITY_REPORT::Add(), BLOCK, canLowerLineEndings(), DROP, SCH_WRITER_V10::FORMAT_VERSION, LIB_SYMBOL::GetDrawItems(), hasLineEndings(), LOWER, DOWNGRADE_TARGET::m_schVersion, DOWNGRADE_TARGET::m_symLibVersion, reportTextPlan(), SCH_VER_CUSTOM_PROPERTIES, screenRules(), SEXPR_SYMBOL_LIB_FILE_VERSION, symbolTextPlan(), SYMLIB_DOWNGRADE_COVERED, and SYMLIB_VER_LINE_ENDINGS.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and classifySymbolLibraries().
| COMPATIBILITY_REPORT ClassifySchematicStructureForDowngrade | ( | const SCHEMATIC & | aSchematic, |
| const DOWNGRADE_TARGET & | aTarget ) |
Schematic-wide structure the per-screen rules cannot see. Does not modify it.
Definition at line 2146 of file sch_downgrade.cpp.
References _, COMPATIBILITY_REPORT::Add(), BLOCK, countAlternateSymbols(), SCH_WRITER_V10::FORMAT_VERSION, SCHEMATIC::GetAllBusAliases(), SCH_SCREENS::GetFirst(), SCH_SCREENS::GetNext(), SCHEMATIC::GetTopLevelSheets(), hasIncompatibleBusVector(), hasPaddedBusVector(), DOWNGRADE_TARGET::m_schVersion, reportIncompatibleBuses(), reportPaddedBuses(), SCHEMATIC::Root(), SCH_VER_ALTERNATE_SYMBOLS, SCH_VER_CUSTOM_PROPERTIES, SCH_VER_FLAT_HIERARCHY, and SCH_VER_VARIANTS.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and EESCHEMA_JOBS_HANDLER::JobDowngrade().
| COMPATIBILITY_REPORT ClassifyScreenForDowngrade | ( | const SCH_SCREEN * | aScreen, |
| const DOWNGRADE_TARGET & | aTarget, | ||
| bool | aDropInsteadOfApproximate = false ) |
Report what a schematic screen would lose if exported to an older KiCad.
Does not modify it. aDropInsteadOfApproximate reports LOWER features as DROP and selects their omission transforms.
Definition at line 2077 of file sch_downgrade.cpp.
References _, COMPATIBILITY_REPORT::Add(), BLOCK, canLowerLineEndings(), countIncompatibleBusLabels(), countPaddedBusLabels(), DROP, SCH_WRITER_V10::FORMAT_VERSION, hasLineEndings(), LOWER, DOWNGRADE_TARGET::m_schVersion, reportIncompatibleBuses(), reportPaddedBuses(), reportTextPlan(), SCH_DOWNGRADE_COVERED, SCH_VER_CUSTOM_PROPERTIES, SCH_VER_LINE_ENDINGS, screenRules(), screenTextPlan(), SEXPR_SCHEMATIC_FILE_VERSION, and visitScreenItems().
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), checkTransformedSchematicUsesOnlyKnownTokens(), and EESCHEMA_JOBS_HANDLER::JobDowngrade().
|
static |
Definition at line 1799 of file sch_downgrade.cpp.
Referenced by dropLineEndings(), dropSymbolLineEndings(), lineEndingPolygons(), lowerLineEndings(), and lowerSymbolLineEndings().
|
static |
Definition at line 111 of file sch_downgrade.cpp.
Referenced by ellipseToPolygon(), and roundedRectToPolygon().
|
static |
Definition at line 2133 of file sch_downgrade.cpp.
References REFERENCE_IMAGE::GetImage(), REFERENCE_IMAGE::GetImageScale(), BITMAP_BASE::GetLegacyPPI(), BITMAP_BASE::GetPPI(), SCH_SCREEN::Items(), EE_RTREE::OfType(), SCH_BITMAP_T, and REFERENCE_IMAGE::SetImageScale().
Referenced by DowngradeScreenInPlace().
|
static |
Definition at line 1694 of file sch_downgrade.cpp.
References SCH_SCREEN::Items(), name, EE_RTREE::OfType(), and SCH_SYMBOL_T.
Referenced by ClassifySchematicStructureForDowngrade(), and screenRules().
|
static |
Definition at line 1656 of file sch_downgrade.cpp.
References EDA_ITEM::GetCustomProperties(), and visitScreenItems().
Referenced by boardRules(), and screenRules().
|
static |
Definition at line 566 of file sch_downgrade.cpp.
References countSymbolEllipses(), SCH_SCREEN::GetLibSymbols(), isEllipse(), SCH_SCREEN::Items(), name, EE_RTREE::OfType(), and SCH_SHAPE_T.
Referenced by boardRules(), and screenRules().
|
static |
Definition at line 883 of file sch_downgrade.cpp.
References countSymbolEscapedStackedPins(), SCH_SCREEN::GetLibSymbols(), and name.
Referenced by screenRules().
|
static |
Definition at line 741 of file sch_downgrade.cpp.
References SCH_SCREEN::Items(), EE_RTREE::OfType(), and SCH_GROUP_T.
Referenced by screenRules().
|
static |
Definition at line 613 of file sch_downgrade.cpp.
References countSymbolHatchedFills(), FILLABLE_TYPES, SCH_SCREEN::GetLibSymbols(), SCH_SCREEN::Items(), name, and EE_RTREE::OfType().
Referenced by screenRules().
|
static |
Definition at line 1571 of file sch_downgrade.cpp.
References SCHEMATIC::BuildUnorderedSheetList(), FOR_NETNAME, EDA_ITEM::GetParent(), SCH_LABEL_BASE::GetShownText(), hasIncompatibleBusVector(), hasPaddedBusVector(), SCHEMATIC::IsValid(), path, SCH_GLOBAL_LABEL_T, SCH_HIER_LABEL_T, SCH_LABEL_T, SCH_SHEET_PIN_T, SCHEMATIC_T, text, EDA_ITEM::Type(), and visitScreenItems().
Referenced by ClassifyScreenForDowngrade().
|
static |
Definition at line 768 of file sch_downgrade.cpp.
References countSymbolJumperPins(), SCH_SCREEN::GetLibSymbols(), and name.
Referenced by screenRules().
|
static |
Definition at line 1825 of file sch_downgrade.cpp.
References hasLineEndings(), and visitScreenItems().
Referenced by screenRules().
|
static |
Definition at line 834 of file sch_downgrade.cpp.
References countSymbolLocalPower(), SCH_SCREEN::GetLibSymbols(), and name.
Referenced by screenRules().
|
static |
Definition at line 542 of file sch_downgrade.cpp.
References hasOwnLock(), and SCH_SCREEN::Items().
Referenced by screenRules().
|
static |
Definition at line 717 of file sch_downgrade.cpp.
References countSymbolNamedBodyStyles(), SCH_SCREEN::GetLibSymbols(), and name.
Referenced by screenRules().
|
static |
Definition at line 1605 of file sch_downgrade.cpp.
References hasPaddedBusVector(), SCH_DIRECTIVE_LABEL_T, SCH_GLOBAL_LABEL_T, SCH_HIER_LABEL_T, SCH_LABEL_T, SCH_SHEET_PIN_T, text, EDA_ITEM::Type(), and visitScreenItems().
Referenced by ClassifyScreenForDowngrade().
|
static |
Definition at line 676 of file sch_downgrade.cpp.
References countSymbolPinMaps(), SCH_SCREEN::GetLibSymbols(), hasPinMaps(), SCH_SCREEN::Items(), name, EE_RTREE::OfType(), and SCH_SYMBOL_T.
Referenced by screenRules().
|
static |
Definition at line 491 of file sch_downgrade.cpp.
References countSymbolPositionExclusions(), SCH_SCREEN::GetLibSymbols(), SCH_SCREEN::Items(), name, EE_RTREE::OfType(), and SCH_SYMBOL_T.
Referenced by screenRules().
|
static |
Definition at line 792 of file sch_downgrade.cpp.
References countSymbolRoundedRects(), SCH_SCREEN::GetLibSymbols(), isRoundedRect(), SCH_SCREEN::Items(), name, EE_RTREE::OfType(), and SCH_SHAPE_T.
Referenced by boardRules(), and screenRules().
|
static |
Definition at line 855 of file sch_downgrade.cpp.
References hasRuleAreaFlags(), SCH_SCREEN::Items(), EE_RTREE::OfType(), and SCH_RULE_AREA_T.
Referenced by screenRules().
|
static |
Definition at line 380 of file sch_downgrade.cpp.
References DEMORGAN, SCH_SCREEN::Items(), EE_RTREE::OfType(), and SCH_SYMBOL_T.
Referenced by screenRules().
|
static |
Definition at line 897 of file sch_downgrade.cpp.
References countSymbolStackedPins(), SCH_SCREEN::GetLibSymbols(), and name.
Referenced by screenRules().
|
static |
Definition at line 1644 of file sch_downgrade.cpp.
References EDA_ITEM::GetCustomProperties(), and visitSymbolItems().
Referenced by screenRules().
|
static |
Definition at line 224 of file sch_downgrade.cpp.
References LIB_SYMBOL::GetDrawItems(), and isEllipse().
Referenced by countEllipses(), and screenRules().
|
static |
Definition at line 325 of file sch_downgrade.cpp.
References LIB_SYMBOL::GetGraphicalPins(), hasEscapedStackedPinNumber(), and pin.
Referenced by countEscapedStackedPins(), and screenRules().
|
static |
Definition at line 253 of file sch_downgrade.cpp.
References LIB_SYMBOL::GetDrawItems(), and isHatchedFillItem().
Referenced by countHatchedFills(), and screenRules().
|
static |
Definition at line 353 of file sch_downgrade.cpp.
References LIB_SYMBOL::GetDuplicatePinNumbersAreJumpers(), JUMPER_GROUP_SET::IsEmpty(), and LIB_SYMBOL::JumperPinGroups().
Referenced by countJumperPinGroups(), and screenRules().
|
static |
Definition at line 1814 of file sch_downgrade.cpp.
References LIB_SYMBOL::GetDrawItems(), and hasLineEndings().
Referenced by screenRules().
|
static |
Definition at line 319 of file sch_downgrade.cpp.
References LIB_SYMBOL::IsLocalPower().
Referenced by countLocalPowerSymbols(), and screenRules().
|
static |
Definition at line 368 of file sch_downgrade.cpp.
References LIB_SYMBOL::HasDeMorganBodyStyles(), and LIB_SYMBOL::IsMultiBodyStyle().
Referenced by countNamedBodyStyles(), and screenRules().
|
static |
Definition at line 277 of file sch_downgrade.cpp.
References LIB_SYMBOL::GetAssociatedFootprints(), and LIB_SYMBOL::GetPinMaps().
Referenced by countPinMaps(), and screenRules().
|
static |
Definition at line 479 of file sch_downgrade.cpp.
References SYMBOL::GetExcludedFromPosFiles().
Referenced by countPositionExclusions(), and screenRules().
|
static |
Definition at line 290 of file sch_downgrade.cpp.
References LIB_SYMBOL::GetDrawItems(), and isRoundedRect().
Referenced by countRoundedRects(), and screenRules().
|
static |
Definition at line 339 of file sch_downgrade.cpp.
References LIB_SYMBOL::GetGraphicalPins(), pin, and usesPlainStackedPinNumber().
Referenced by countStackedPins(), and screenRules().
|
static |
Definition at line 394 of file sch_downgrade.cpp.
References DEMORGAN, SCH_ITEM::GetBodyStyle(), SCH_SYMBOL::GetLibSymbolRef(), SCH_SYMBOL::IsMissingLibSymbol(), SCH_SCREEN::Items(), EE_RTREE::OfType(), and SCH_SYMBOL_T.
Referenced by screenRules().
| void DowngradeLibSymbolInPlace | ( | LIB_SYMBOL * | aSymbol, |
| const DOWNGRADE_TARGET & | aTarget, | ||
| bool | aDropInsteadOfApproximate ) |
Symbol-scoped downgrade for standalone .kicad_sym files the screen pass never sees.
Definition at line 2270 of file sch_downgrade.cpp.
References applyTextPlan(), SCH_WRITER_V10::FORMAT_VERSION, LOWER, DOWNGRADE_TARGET::m_schVersion, DOWNGRADE_TARGET::m_symLibVersion, SCH_VER_CUSTOM_PROPERTIES, screenRules(), and symbolTextPlan().
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), checkNativeSymbolLibraryGolden(), and downgradeSymbolLibraries().
| void DowngradeScreenInPlace | ( | SCH_SCREEN * | aScreen, |
| const DOWNGRADE_TARGET & | aTarget, | ||
| bool | aDropInsteadOfApproximate = false ) |
Approximate or remove, in place, what the target cannot represent.
When aDropInsteadOfApproximate is true, omit LOWER features without generating replacements.
Definition at line 2203 of file sch_downgrade.cpp.
References applyTextPlan(), compensateReferenceImageScales(), SCH_WRITER_V10::FORMAT_VERSION, LOWER, DOWNGRADE_TARGET::m_schVersion, SCH_VER_CUSTOM_PROPERTIES, SCH_VER_IMAGE_PPI, screenRules(), and screenTextPlan().
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), checkExportUsesOnlyKnownTokens(), and EESCHEMA_JOBS_HANDLER::JobDowngrade().
|
static |
Definition at line 1711 of file sch_downgrade.cpp.
References SCH_SYMBOL::GetInstances(), SCH_SCREEN::Items(), name, EE_RTREE::OfType(), and SCH_SYMBOL_T.
Referenced by screenRules().
|
static |
Definition at line 1678 of file sch_downgrade.cpp.
References EDA_ITEM::ClearCustomProperties(), dropSymbolCustomProperties(), SCH_SCREEN::Items(), EE_RTREE::OfType(), SCH_SYMBOL_T, and visitScreenItems().
Referenced by boardRules(), and screenRules().
|
static |
Definition at line 782 of file sch_downgrade.cpp.
References dropSymbolJumperPins(), SCH_SCREEN::GetLibSymbols(), and name.
Referenced by screenRules().
|
static |
Definition at line 1963 of file sch_downgrade.cpp.
References clearLineEndings(), and visitScreenItems().
Referenced by screenRules().
|
static |
Definition at line 731 of file sch_downgrade.cpp.
References dropSymbolBodyStyleNames(), SCH_SCREEN::GetLibSymbols(), and name.
Referenced by screenRules().
|
static |
Definition at line 697 of file sch_downgrade.cpp.
References SCH_SYMBOL::ClearPinMapOverrides(), dropSymbolPinMaps(), SCH_SYMBOL::GetLibSymbolRef(), SCH_SCREEN::GetLibSymbols(), SCH_SCREEN::Items(), name, EE_RTREE::OfType(), and SCH_SYMBOL_T.
Referenced by screenRules().
|
static |
Definition at line 511 of file sch_downgrade.cpp.
References dropSymbolPositionExclusions(), SCH_SCREEN::GetLibSymbols(), SCH_SCREEN::Items(), name, EE_RTREE::OfType(), and SCH_SYMBOL_T.
Referenced by screenRules().
|
static |
Definition at line 869 of file sch_downgrade.cpp.
References SCH_SCREEN::Items(), EE_RTREE::OfType(), SCH_RULE_AREA_T, SCH_RULE_AREA::SetDNP(), SCH_RULE_AREA::SetExcludedFromBoard(), SCH_RULE_AREA::SetExcludedFromBOM(), and SCH_RULE_AREA::SetExcludedFromSim().
Referenced by screenRules().
|
static |
Definition at line 374 of file sch_downgrade.cpp.
References LIB_SYMBOL::SetBodyStyleNames().
Referenced by dropNamedBodyStyles(), and screenRules().
|
static |
Definition at line 1668 of file sch_downgrade.cpp.
References EDA_ITEM::ClearCustomProperties(), and visitSymbolItems().
Referenced by dropCustomProperties(), and screenRules().
|
static |
Definition at line 359 of file sch_downgrade.cpp.
References JUMPER_GROUP_SET::Clear(), LIB_SYMBOL::JumperPinGroups(), and LIB_SYMBOL::SetDuplicatePinNumbersAreJumpers().
Referenced by dropJumperPinGroups(), and screenRules().
|
static |
Definition at line 1956 of file sch_downgrade.cpp.
References clearLineEndings(), and LIB_SYMBOL::GetDrawItems().
Referenced by screenRules().
|
static |
Definition at line 283 of file sch_downgrade.cpp.
References LIB_SYMBOL::SetAssociatedFootprints(), and LIB_SYMBOL::SetPinMaps().
Referenced by dropPinMaps(), and screenRules().
|
static |
Definition at line 485 of file sch_downgrade.cpp.
References SYMBOL::SetExcludedFromPosFiles().
Referenced by dropPositionExclusions(), and screenRules().
|
static |
Definition at line 118 of file sch_downgrade.cpp.
References chain, closePolyline(), SHAPE_ELLIPSE::ConvertToPolyline(), ELLIPSE_ARC, EDA_SHAPE::GetEllipseCenter(), EDA_SHAPE::GetEllipseEndAngle(), EDA_SHAPE::GetEllipseMajorRadius(), EDA_SHAPE::GetEllipseMinorRadius(), EDA_SHAPE::GetEllipseRotation(), EDA_SHAPE::GetEllipseStartAngle(), EDA_SHAPE::GetShape(), POLY, schIUScale, EDA_SHAPE::SetPolyPoints(), and EDA_SHAPE::SetShape().
Referenced by lowerEllipses(), and lowerSymbolEllipses().
| wxString FindUnsupportedSchToken | ( | const wxString & | aSerialized, |
| const DOWNGRADE_TARGET & | aTarget ) |
Scan serialized schematic text for tokens the target cannot parse.
Returns the first such token, or empty if the output is safe. Non-empty means refuse the export.
Definition at line 2370 of file sch_downgrade.cpp.
References FindUnsupportedToken(), DOWNGRADE_TARGET::m_schVersion, SCH_TOKENS, SCH_VALUES, and SEXPR_SCHEMATIC_FILE_VERSION.
Referenced by BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
| bool FlattenSchematicVariant | ( | SCHEMATIC & | aSchematic, |
| const wxString & | aVariantName, | ||
| wxString * | aConflict ) |
Bake a variant into the base attributes of every symbol and sheet.
Returns false and names the reference in aConflict when a symbol shared between sheet instances resolves differently under the variant, which the base attributes cannot represent.
Definition at line 2477 of file sch_downgrade.cpp.
References _, SCH_SCREEN::AddLibSymbol(), SCH_SCREEN::Append(), SCHEMATIC::BuildUnorderedSheetList(), SCH_SYMBOL::GetField(), SCH_SYMBOL::GetLibId(), SCH_SYMBOL::GetLibSymbolRef(), SCH_SCREEN::GetLibSymbols(), SCH_FIELD::GetText(), SCH_SYMBOL::IsMissingLibSymbol(), SCH_SCREEN::Items(), SYMBOL_VARIANT_SNAPSHOT::m_alternate, SYMBOL_VARIANT_SNAPSHOT::m_symbolOverride, name, EE_RTREE::OfType(), path, REFERENCE, SCH_SCREEN::Remove(), SCH_SYMBOL_T, SHEET_FILENAME, SHEET_NAME, snapshotSheet(), and snapshotSymbol().
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), and EESCHEMA_JOBS_HANDLER::JobDowngrade().
|
static |
Definition at line 1429 of file sch_downgrade.cpp.
References result.
Referenced by hasIncompatibleBusVector().
|
static |
Definition at line 1082 of file sch_downgrade.cpp.
References ExpandTextVars(), and INTERNAL.
Referenced by bakeLegacyExpressions(), and textNeedsDowngrade().
|
static |
Definition at line 178 of file sch_downgrade.cpp.
References EscapeStackedPinItem(), ExpandStackedPinNotation(), and next().
Referenced by countSymbolEscapedStackedPins(), and usesPlainStackedPinNumber().
|
static |
Definition at line 1092 of file sch_downgrade.cpp.
Referenced by planTextDowngrade(), and textNeedsDowngrade().
|
static |
Definition at line 1548 of file sch_downgrade.cpp.
References frozenBusVector(), hasIncompatibleBusVector(), FROZEN_BUS_VECTOR::m_begin, FROZEN_BUS_VECTOR::m_end, FROZEN_BUS_VECTOR::m_prefix, FROZEN_BUS_VECTOR::m_valid, NET_SETTINGS::ParseBusGroup(), and NET_SETTINGS::ParseBusVector().
Referenced by ClassifySchematicStructureForDowngrade(), countIncompatibleBusLabels(), and hasIncompatibleBusVector().
|
static |
Definition at line 1727 of file sch_downgrade.cpp.
References NONE.
Referenced by ClassifyLibSymbolForDowngrade(), ClassifyScreenForDowngrade(), countLineEndings(), countSymbolLineEndings(), lowerLineEndings(), and lowerSymbolLineEndings().
|
static |
Definition at line 527 of file sch_downgrade.cpp.
References EDA_ITEM::GetParentGroup(), group, SCH_ITEM::IsLocked(), SCH_GROUP_T, and EDA_ITEM::Type().
Referenced by countLockedItems(), and unlockItems().
|
static |
Definition at line 1394 of file sch_downgrade.cpp.
References end, hasPaddedBusVector(), NET_SETTINGS::ParseBusGroup(), and NET_SETTINGS::ParseBusVector().
Referenced by ClassifySchematicStructureForDowngrade(), countIncompatibleBusLabels(), countPaddedBusLabels(), and hasPaddedBusVector().
|
static |
Definition at line 657 of file sch_downgrade.cpp.
References SCH_SYMBOL::GetInstances(), SCH_SYMBOL::GetLibSymbolRef(), SCH_SYMBOL::GetPinMapOverride(), PIN_MAP_INSTANCE_OVERRIDE::IsDefault(), and name.
Referenced by countPinMaps().
|
static |
Definition at line 1069 of file sch_downgrade.cpp.
References ExpandTextVars(), INTERNAL, and isPostTargetTextVar().
Referenced by bakeLegacyExpressions(), and planTextDowngrade().
|
static |
Definition at line 848 of file sch_downgrade.cpp.
References SCH_RULE_AREA::GetDNP(), SCH_RULE_AREA::GetExcludedFromBoard(), SCH_RULE_AREA::GetExcludedFromBOM(), and SCH_RULE_AREA::GetExcludedFromSim().
Referenced by countRuleAreaFlags().
|
static |
Definition at line 91 of file sch_downgrade.cpp.
References ELLIPSE, ELLIPSE_ARC, SCH_SHAPE_T, and EDA_ITEM::Type().
Referenced by countEllipses(), countSymbolEllipses(), lowerEllipses(), lowerSymbolEllipses(), omitEllipses(), omitEllipses(), omitEllipsesFp(), omitSymbolEllipses(), and DIPTRACE::SCH_PARSER::populateLibSymbolUnit().
|
static |
Definition at line 101 of file sch_downgrade.cpp.
References SCH_SHAPE_T, SCH_TEXTBOX_T, and EDA_ITEM::Type().
Referenced by countSymbolHatchedFills(), lowerSymbolHatchedFills(), and omitSymbolHatchedFills().
|
static |
Definition at line 1061 of file sch_downgrade.cpp.
Referenced by hasPostTargetTextVars(), and textNeedsDowngrade().
|
static |
Definition at line 142 of file sch_downgrade.cpp.
References EDA_SHAPE::GetCornerRadius(), EDA_SHAPE::GetShape(), RECTANGLE, SCH_SHAPE_T, and EDA_ITEM::Type().
Referenced by countRoundedRects(), countSymbolRoundedRects(), lowerRoundedRects(), lowerSymbolRoundedRects(), omitRoundedRects(), omitRoundedRects(), omitRoundedRectsFp(), and omitSymbolRoundedRects().
Definition at line 1838 of file sch_downgrade.cpp.
References EDA_ITEM::ClearCustomProperties(), clearLineEndings(), ERROR_INSIDE, FILLED_SHAPE, FILLED_WITH_COLOR, SHAPE_POLY_SET::Fracture(), STROKE_PARAMS::GetColor(), lineEndingShape(), EDA_ITEM::m_Uuid, SHAPE_POLY_SET::Outline(), SHAPE_POLY_SET::OutlineCount(), POLY, result, schIUScale, EDA_SHAPE::SetFillColor(), EDA_SHAPE::SetFillMode(), EDA_SHAPE::SetPolyShape(), EDA_SHAPE::SetShape(), SCH_SHAPE::SetStroke(), STROKE_PARAMS::SetWidth(), SHAPE_POLY_SET::Simplify(), SOLID, source, and COLOR4D::UNSPECIFIED.
Referenced by lowerLineEndings(), and lowerSymbolLineEndings().
Definition at line 1741 of file sch_downgrade.cpp.
References SCH_LINE::GetEndEnding(), SCH_LINE::GetEndPoint(), SCH_ITEM::GetLayer(), SCH_LINE::GetPenWidth(), SCH_LINE::GetStartEnding(), SCH_LINE::GetStartPoint(), SCH_LINE::GetStroke(), SEGMENT, EDA_SHAPE::SetEnd(), EDA_SHAPE::SetEndEnding(), SCH_ITEM::SetLayer(), EDA_SHAPE::SetStart(), EDA_SHAPE::SetStartEnding(), SCH_SHAPE::SetStroke(), and STROKE_PARAMS::SetWidth().
Referenced by canLowerLineEndings(), lineEndingPolygons(), lowerLineEndings(), and lowerSymbolLineEndings().
|
static |
Definition at line 587 of file sch_downgrade.cpp.
References ellipseToPolygon(), SCH_SCREEN::GetLibSymbols(), isEllipse(), SCH_SCREEN::Items(), lowerSymbolEllipses(), name, EE_RTREE::OfType(), and SCH_SHAPE_T.
Referenced by boardRules(), and screenRules().
|
static |
Definition at line 636 of file sch_downgrade.cpp.
References FILLABLE_TYPES, FILLED_SHAPE, SCH_SCREEN::GetLibSymbols(), EDA_SHAPE::IsHatchedFill(), SCH_SCREEN::Items(), lowerSymbolHatchedFills(), name, EE_RTREE::OfType(), and EDA_SHAPE::SetFillMode().
Referenced by screenRules().
|
static |
Definition at line 1905 of file sch_downgrade.cpp.
References SCH_SCREEN::Append(), canLowerLineEndings(), clearLineEndings(), SCH_SCREEN::GetLibSymbols(), group, hasLineEndings(), SCH_SCREEN::Items(), lineEndingPolygons(), lineEndingShape(), lowerSymbolLineEndings(), name, and SCH_SCREEN::Remove().
Referenced by screenRules().
|
static |
Definition at line 812 of file sch_downgrade.cpp.
References SCH_SCREEN::GetLibSymbols(), isRoundedRect(), SCH_SCREEN::Items(), lowerSymbolRoundedRects(), name, EE_RTREE::OfType(), roundedRectToPolygon(), and SCH_SHAPE_T.
Referenced by boardRules(), and screenRules().
|
static |
Definition at line 238 of file sch_downgrade.cpp.
References ellipseToPolygon(), LIB_SYMBOL::GetDrawItems(), and isEllipse().
Referenced by lowerEllipses(), and screenRules().
|
static |
Definition at line 267 of file sch_downgrade.cpp.
References FILLED_SHAPE, LIB_SYMBOL::GetDrawItems(), and isHatchedFillItem().
Referenced by lowerHatchedFills(), and screenRules().
|
static |
Definition at line 1869 of file sch_downgrade.cpp.
References LIB_SYMBOL::AddDrawItem(), canLowerLineEndings(), clearLineEndings(), LIB_SYMBOL::GetDrawItems(), hasLineEndings(), lineEndingPolygons(), lineEndingShape(), and LIB_SYMBOL::RemoveDrawItem().
Referenced by lowerLineEndings(), and screenRules().
|
static |
Definition at line 304 of file sch_downgrade.cpp.
References LIB_SYMBOL::GetDrawItems(), isRoundedRect(), and roundedRectToPolygon().
Referenced by lowerRoundedRects(), and screenRules().
|
static |
Definition at line 969 of file sch_downgrade.cpp.
References SCH_SCREEN::GetLibSymbols(), isEllipse(), name, omitScreenItems(), and omitSymbolEllipses().
Referenced by boardRules(), and screenRules().
|
static |
Definition at line 1003 of file sch_downgrade.cpp.
References FILLABLE_TYPES, SCH_SCREEN::GetLibSymbols(), EDA_SHAPE::IsHatchedFill(), SCH_SCREEN::Items(), name, NO_FILL, EE_RTREE::OfType(), omitSymbolHatchedFills(), and EDA_SHAPE::SetFillMode().
Referenced by screenRules().
|
static |
Definition at line 981 of file sch_downgrade.cpp.
References SCH_SCREEN::GetLibSymbols(), isRoundedRect(), name, omitScreenItems(), and omitSymbolRoundedRects().
Referenced by boardRules(), and screenRules().
|
static |
Definition at line 927 of file sch_downgrade.cpp.
References group, SCH_SCREEN::Items(), and SCH_SCREEN::Remove().
Referenced by omitEllipses(), omitRoundedRects(), and omitSelectedCustomBodyStyles().
|
static |
Definition at line 949 of file sch_downgrade.cpp.
References DEMORGAN, SCH_ITEM::GetBodyStyle(), omitScreenItems(), SCH_SYMBOL_T, and EDA_ITEM::Type().
Referenced by screenRules().
|
static |
Definition at line 959 of file sch_downgrade.cpp.
References isEllipse(), and omitSymbolGraphics().
Referenced by omitEllipses(), and screenRules().
|
static |
Definition at line 911 of file sch_downgrade.cpp.
References LIB_SYMBOL::GetDrawItems(), and LIB_SYMBOL::RemoveDrawItem().
Referenced by omitSymbolEllipses(), and omitSymbolRoundedRects().
|
static |
Definition at line 993 of file sch_downgrade.cpp.
References LIB_SYMBOL::GetDrawItems(), isHatchedFillItem(), and NO_FILL.
Referenced by omitHatchedFills(), and screenRules().
|
static |
Definition at line 963 of file sch_downgrade.cpp.
References isRoundedRect(), and omitSymbolGraphics().
Referenced by omitRoundedRects(), and screenRules().
|
static |
Definition at line 1205 of file sch_downgrade.cpp.
References bakeLegacyExpressions(), empty(), ExpandTextVars(), ExtractTextVarReferences(), FinalizeTextVarExpansion(), hasEscapedTextControl(), hasPostTargetTextVars(), INTERNAL, SCHEMATIC::IsValid(), TEXT_DOWNGRADE_PLAN::m_blocked, TEXT_DOWNGRADE_PLAN::m_replacements, path, SCHEMATIC::Project(), project, SCH_ITEM::ResolveText(), SCH_ITEM::Schematic(), text, and textNeedsDowngrade().
Referenced by screenTextPlan(), and symbolTextPlan().
|
static |
Definition at line 1634 of file sch_downgrade.cpp.
References _, COMPATIBILITY_REPORT::Add(), and BLOCK.
Referenced by ClassifySchematicStructureForDowngrade(), and ClassifyScreenForDowngrade().
|
static |
Definition at line 1623 of file sch_downgrade.cpp.
References _, COMPATIBILITY_REPORT::Add(), and BLOCK.
Referenced by ClassifySchematicStructureForDowngrade(), and ClassifyScreenForDowngrade().
|
static |
Definition at line 1367 of file sch_downgrade.cpp.
References _, COMPATIBILITY_REPORT::Add(), BLOCK, DROP, TEXT_DOWNGRADE_PLAN::m_blocked, and TEXT_DOWNGRADE_PLAN::m_replacements.
Referenced by ClassifyLibSymbolForDowngrade(), and ClassifyScreenForDowngrade().
|
static |
Definition at line 152 of file sch_downgrade.cpp.
References SHAPE_POLY_SET::Append(), closePolyline(), SHAPE_LINE_CHAIN::CPoints(), SHAPE_POLY_SET::Fillet(), EDA_SHAPE::GetCornerRadius(), EDA_SHAPE::GetRectCorners(), SHAPE_POLY_SET::NewOutline(), SHAPE_POLY_SET::Outline(), POLY, radius, schIUScale, EDA_SHAPE::SetCornerRadius(), EDA_SHAPE::SetPolyPoints(), and EDA_SHAPE::SetShape().
Referenced by lowerRoundedRects(), and lowerSymbolRoundedRects().
| void SaveSchematicForTarget | ( | SCH_SHEET * | aSheet, |
| SCHEMATIC * | aSchematic, | ||
| const wxString & | aPath, | ||
| const DOWNGRADE_TARGET & | aTarget ) |
Save a schematic sheet file stamped for the target, using the writer for that version.
Definition at line 2334 of file sch_downgrade.cpp.
References SCH_WRITER_V10::FORMAT_VERSION, SCH_WRITER_V9::FORMAT_VERSION, DOWNGRADE_TARGET::m_schVersion, SCH_WRITER_V10::SaveSchematicFile(), and SCH_WRITER_V9::SaveSchematicFile().
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), checkExportUsesOnlyKnownTokens(), and EESCHEMA_JOBS_HANDLER::JobDowngrade().
| void SaveSymbolLibraryForTarget | ( | const std::vector< LIB_SYMBOL * > & | aSymbols, |
| const wxString & | aPath, | ||
| const DOWNGRADE_TARGET & | aTarget ) |
Save a .kicad_sym library stamped for the target.
Symbols must already be downgraded and ordered parents first.
Definition at line 2346 of file sch_downgrade.cpp.
References DOWNGRADE_TARGET::m_symLibVersion, SCH_WRITER_V10::SaveSymbolLibrary(), SCH_WRITER_V9::SaveSymbolLibrary(), SCH_WRITER_V10::SYMBOL_LIB_VERSION, and SCH_WRITER_V9::SYMBOL_LIB_VERSION.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), checkNativeSymbolLibraryGolden(), and downgradeSymbolLibraries().
| int SchDowngradeCoveredVersion | ( | ) |
The format the denylist was generated against. A format bump forces a review.
Definition at line 2364 of file sch_downgrade.cpp.
References SCH_DOWNGRADE_COVERED.
Referenced by BOOST_AUTO_TEST_CASE().
|
static |
Definition at line 1991 of file sch_downgrade.cpp.
References _, bakeSelectedCustomBodyStyles(), BLOCK, countAlternateSymbols(), countCustomProperties(), countEllipses(), countEscapedStackedPins(), countGroups(), countHatchedFills(), countJumperPinGroups(), countLineEndings(), countLocalPowerSymbols(), countLockedItems(), countNamedBodyStyles(), countPinMaps(), countPositionExclusions(), countRoundedRects(), countRuleAreaFlags(), countSelectedCustomBodyStyles(), countStackedPins(), countSymbolCustomProperties(), countSymbolEllipses(), countSymbolEscapedStackedPins(), countSymbolHatchedFills(), countSymbolJumperPins(), countSymbolLineEndings(), countSymbolLocalPower(), countSymbolNamedBodyStyles(), countSymbolPinMaps(), countSymbolPositionExclusions(), countSymbolRoundedRects(), countSymbolStackedPins(), countUnresolvedCustomBodyStyles(), DROP, dropAlternateSymbols(), dropCustomProperties(), dropJumperPinGroups(), dropLineEndings(), dropNamedBodyStyles(), dropPinMaps(), dropPositionExclusions(), dropRuleAreaFlags(), dropSymbolBodyStyleNames(), dropSymbolCustomProperties(), dropSymbolJumperPins(), dropSymbolLineEndings(), dropSymbolPinMaps(), dropSymbolPositionExclusions(), LOWER, lowerEllipses(), lowerHatchedFills(), lowerLineEndings(), lowerRoundedRects(), lowerSymbolEllipses(), lowerSymbolHatchedFills(), lowerSymbolLineEndings(), lowerSymbolRoundedRects(), omitEllipses(), omitHatchedFills(), omitRoundedRects(), omitSelectedCustomBodyStyles(), omitSymbolEllipses(), omitSymbolHatchedFills(), omitSymbolRoundedRects(), SCH_VER_ALTERNATE_SYMBOLS, SCH_VER_BODY_STYLES, SCH_VER_CUSTOM_PROPERTIES, SCH_VER_ELLIPSE, SCH_VER_GROUPS, SCH_VER_JUMPER_PINS, SCH_VER_LINE_ENDINGS, SCH_VER_LOCAL_POWER, SCH_VER_LOCKING, SCH_VER_PIN_MAPS, SCH_VER_POSITION_EXCLUSIONS, SCH_VER_ROUNDED_RECT, SCH_VER_RULE_AREA_FLAGS, SCH_VER_SHAPE_HATCH, SCH_VER_STACKED_PIN_ESCAPES, SCH_VER_STACKED_PINS, ungroupAll(), and unlockItems().
Referenced by ClassifyLibSymbolForDowngrade(), ClassifyScreenForDowngrade(), DowngradeLibSymbolInPlace(), and DowngradeScreenInPlace().
|
static |
Definition at line 1300 of file sch_downgrade.cpp.
References TITLE_BLOCK::GetComment(), TITLE_BLOCK::GetCompany(), TITLE_BLOCK::GetDate(), SCH_SCREEN::GetLibSymbols(), EDA_ITEM::GetParent(), TITLE_BLOCK::GetRevision(), TITLE_BLOCK::GetTitle(), SCH_SCREEN::GetTitleBlock(), SCHEMATIC::IsValid(), SCH_SCREEN::Items(), name, path, plan(), planTextDowngrade(), SCHEMATIC::Project(), project, RECURSE, SCHEMATIC_T, textNeedsDowngrade(), EDA_ITEM::Type(), and visitSymbolItems().
Referenced by ClassifyScreenForDowngrade(), and DowngradeScreenInPlace().
|
static |
Definition at line 2450 of file sch_downgrade.cpp.
References SCH_SHEET::GetDNP(), SCH_SHEET::GetExcludedFromBoard(), SCH_SHEET::GetExcludedFromBOM(), SCH_SHEET::GetExcludedFromSim(), SCH_SHEET::GetInstances(), SHEET_VARIANT_SNAPSHOT::m_dnp, SHEET_VARIANT_SNAPSHOT::m_excludedFromBoard, SHEET_VARIANT_SNAPSHOT::m_excludedFromBOM, SHEET_VARIANT_SNAPSHOT::m_excludedFromSim, SHEET_VARIANT_SNAPSHOT::m_fieldOverrides, and SCH_SHEET_PATH::Path().
Referenced by FlattenSchematicVariant().
|
static |
Definition at line 2397 of file sch_downgrade.cpp.
References SCH_SYMBOL::GetDNP(), SCH_SYMBOL::GetExcludedFromBoard(), SCH_SYMBOL::GetExcludedFromBOM(), SCH_SYMBOL::GetExcludedFromPosFiles(), SCH_SYMBOL::GetExcludedFromSim(), SCH_SYMBOL::GetFields(), SCH_SYMBOL::GetFieldText(), SCH_SYMBOL::GetInstances(), SCH_SYMBOL::GetLibId(), SCH_SYMBOL::GetPinMapOverride(), SCH_SYMBOL::GetVariantLibSymbol(), SCHEMATIC::IsValid(), SYMBOL_VARIANT_SNAPSHOT::m_alternate, SYMBOL_VARIANT_SNAPSHOT::m_dnp, SYMBOL_VARIANT_SNAPSHOT::m_excludedFromBoard, SYMBOL_VARIANT_SNAPSHOT::m_excludedFromBOM, SYMBOL_VARIANT_SNAPSHOT::m_excludedFromPosFiles, SYMBOL_VARIANT_SNAPSHOT::m_excludedFromSim, SYMBOL_VARIANT_SNAPSHOT::m_fieldOverrides, SYMBOL_VARIANT_SNAPSHOT::m_pinMap, SYMBOL_VARIANT_SNAPSHOT::m_symbolOverride, SCH_SHEET_PATH::Path(), REFERENCE, and SCH_ITEM::Schematic().
Referenced by FlattenSchematicVariant().
| int SymbolLibDowngradeCoveredVersion | ( | ) |
The symbol library format the denylist was generated against.
Definition at line 2358 of file sch_downgrade.cpp.
References SYMLIB_DOWNGRADE_COVERED.
Referenced by BOOST_AUTO_TEST_CASE().
|
static |
Definition at line 1288 of file sch_downgrade.cpp.
References plan(), planTextDowngrade(), and visitSymbolItems().
Referenced by ClassifyLibSymbolForDowngrade(), and DowngradeLibSymbolInPlace().
|
static |
Definition at line 1098 of file sch_downgrade.cpp.
References ExpandTextVars(), PROJECT::GetTextVars(), hasActiveExpression(), hasEscapedTextControl(), INTERNAL, isPostTargetTextVar(), and textNeedsDowngrade().
Referenced by planTextDowngrade(), screenTextPlan(), and textNeedsDowngrade().
|
static |
Definition at line 748 of file sch_downgrade.cpp.
References group, SCH_SCREEN::Items(), EE_RTREE::OfType(), SCH_SCREEN::Remove(), and SCH_GROUP_T.
Referenced by screenRules().
|
static |
Definition at line 556 of file sch_downgrade.cpp.
References hasOwnLock(), and SCH_SCREEN::Items().
Referenced by screenRules().
|
static |
Definition at line 210 of file sch_downgrade.cpp.
References ExpandStackedPinNotation(), and hasEscapedStackedPinNumber().
Referenced by countSymbolStackedPins().
|
static |
Definition at line 1033 of file sch_downgrade.cpp.
References SCH_SCREEN::GetLibSymbols(), SCH_SCREEN::Items(), name, RECURSE, and visitSymbolItems().
Referenced by ClassifyScreenForDowngrade(), countCustomProperties(), countIncompatibleBusLabels(), countLineEndings(), countPaddedBusLabels(), dropCustomProperties(), and dropLineEndings().
|
static |
Definition at line 1024 of file sch_downgrade.cpp.
References LIB_SYMBOL::GetDrawItems().
Referenced by countSymbolCustomProperties(), dropSymbolCustomProperties(), screenTextPlan(), symbolTextPlan(), and visitScreenItems().
|
staticconstexpr |
Definition at line 610 of file sch_downgrade.cpp.
Referenced by countHatchedFills(), lowerHatchedFills(), and omitHatchedFills().
|
staticconstexpr |
Definition at line 87 of file sch_downgrade.cpp.
Referenced by ClassifyScreenForDowngrade(), and SchDowngradeCoveredVersion().
|
staticconstexpr |
Definition at line 2294 of file sch_downgrade.cpp.
Referenced by FindUnsupportedSchToken().
|
staticconstexpr |
Definition at line 2325 of file sch_downgrade.cpp.
Referenced by FindUnsupportedSchToken().
|
staticconstexpr |
Definition at line 82 of file sch_downgrade.cpp.
Referenced by ClassifySchematicStructureForDowngrade(), and screenRules().
|
staticconstexpr |
Definition at line 77 of file sch_downgrade.cpp.
Referenced by screenRules().
|
staticconstexpr |
Definition at line 83 of file sch_downgrade.cpp.
Referenced by ClassifyLibSymbolForDowngrade(), ClassifySchematicStructureForDowngrade(), ClassifyScreenForDowngrade(), DowngradeLibSymbolInPlace(), DowngradeScreenInPlace(), and screenRules().
|
staticconstexpr |
Definition at line 73 of file sch_downgrade.cpp.
Referenced by screenRules().
|
staticconstexpr |
Definition at line 69 of file sch_downgrade.cpp.
Referenced by screenRules().
|
staticconstexpr |
Definition at line 79 of file sch_downgrade.cpp.
Referenced by DowngradeScreenInPlace().
|
staticconstexpr |
Definition at line 68 of file sch_downgrade.cpp.
Referenced by screenRules().
|
staticconstexpr |
Definition at line 80 of file sch_downgrade.cpp.
Referenced by ClassifyScreenForDowngrade(), and screenRules().
|
staticconstexpr |
Definition at line 67 of file sch_downgrade.cpp.
Referenced by screenRules().
|
staticconstexpr |
Definition at line 72 of file sch_downgrade.cpp.
Referenced by screenRules().
|
staticconstexpr |
Definition at line 76 of file sch_downgrade.cpp.
Referenced by screenRules().
|
staticconstexpr |
Definition at line 78 of file sch_downgrade.cpp.
Referenced by screenRules().
|
staticconstexpr |
Definition at line 71 of file sch_downgrade.cpp.
Referenced by screenRules().
|
staticconstexpr |
Definition at line 70 of file sch_downgrade.cpp.
Referenced by screenRules().
|
staticconstexpr |
Definition at line 66 of file sch_downgrade.cpp.
Referenced by screenRules().
|
staticconstexpr |
Definition at line 75 of file sch_downgrade.cpp.
Referenced by screenRules().
|
staticconstexpr |
Definition at line 74 of file sch_downgrade.cpp.
Referenced by screenRules().
|
staticconstexpr |
Definition at line 88 of file sch_downgrade.cpp.
Referenced by ClassifyLibSymbolForDowngrade(), and SymbolLibDowngradeCoveredVersion().
|
staticconstexpr |
Definition at line 81 of file sch_downgrade.cpp.
Referenced by ClassifyLibSymbolForDowngrade().