|
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 int | countScreenItems (const SCH_SCREEN *aScreen, const std::function< bool(EDA_ITEM *)> &aPredicate) |
| 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 int | countRotatedBitmaps (const SCH_SCREEN *aScreen) |
| static int | countBitmapsWithOpacity (const SCH_SCREEN *aScreen) |
| static void | dropBitmapOpacity (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_VER_IMAGE_ROTATION = 20261025 |
| static constexpr int | SCH_VER_IMAGE_OPACITY = 20261025 |
| static constexpr int | SCH_DOWNGRADE_COVERED = 20261025 |
| static constexpr int | SYMLIB_DOWNGRADE_COVERED = 20261015 |
| 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 1402 of file sch_downgrade.cpp.
References TEXT_DOWNGRADE_PLAN::m_replacements, and text.
Referenced by DowngradeLibSymbolInPlace(), and DowngradeScreenInPlace().
|
static |
Definition at line 1160 of file sch_downgrade.cpp.
References empty(), end, ExtractTextVarReferences(), FinalizeTextVarExpansion(), hasActiveExpression(), hasPostTargetTextVars(), INTERNAL, and SCH_ITEM::ResolveText().
Referenced by planTextDowngrade().
|
static |
Definition at line 415 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 1785 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 2304 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 2223 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 2154 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(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), checkTransformedSchematicUsesOnlyKnownTokens(), and EESCHEMA_JOBS_HANDLER::JobDowngrade().
|
static |
Definition at line 1824 of file sch_downgrade.cpp.
Referenced by dropLineEndings(), dropSymbolLineEndings(), lineEndingPolygons(), lowerLineEndings(), and lowerSymbolLineEndings().
|
static |
Definition at line 113 of file sch_downgrade.cpp.
Referenced by ellipseToPolygon(), and roundedRectToPolygon().
|
static |
Definition at line 2210 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 1719 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 2014 of file sch_downgrade.cpp.
References countScreenItems(), REFERENCE_IMAGE::GetOpacity(), SCH_BITMAP::GetReferenceImage(), and SCH_BITMAP_T.
Referenced by screenRules().
|
static |
Definition at line 1681 of file sch_downgrade.cpp.
References EDA_ITEM::GetCustomProperties(), and visitScreenItems().
Referenced by boardRules(), and screenRules().
|
static |
Definition at line 568 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 885 of file sch_downgrade.cpp.
References countSymbolEscapedStackedPins(), SCH_SCREEN::GetLibSymbols(), and name.
Referenced by screenRules().
|
static |
Definition at line 743 of file sch_downgrade.cpp.
References SCH_SCREEN::Items(), EE_RTREE::OfType(), and SCH_GROUP_T.
Referenced by screenRules().
|
static |
Definition at line 615 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 1586 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 770 of file sch_downgrade.cpp.
References countSymbolJumperPins(), SCH_SCREEN::GetLibSymbols(), and name.
Referenced by screenRules().
|
static |
Definition at line 1850 of file sch_downgrade.cpp.
References hasLineEndings(), and visitScreenItems().
Referenced by screenRules().
|
static |
Definition at line 836 of file sch_downgrade.cpp.
References countSymbolLocalPower(), SCH_SCREEN::GetLibSymbols(), and name.
Referenced by screenRules().
|
static |
Definition at line 544 of file sch_downgrade.cpp.
References hasOwnLock(), and SCH_SCREEN::Items().
Referenced by screenRules().
|
static |
Definition at line 719 of file sch_downgrade.cpp.
References countSymbolNamedBodyStyles(), SCH_SCREEN::GetLibSymbols(), and name.
Referenced by screenRules().
|
static |
Definition at line 1630 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 678 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 493 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 1999 of file sch_downgrade.cpp.
References countScreenItems(), REFERENCE_IMAGE::GetOrientation(), SCH_BITMAP::GetReferenceImage(), EDA_ANGLE::IsZero(), and SCH_BITMAP_T.
Referenced by screenRules().
|
static |
Definition at line 794 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 857 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 1063 of file sch_downgrade.cpp.
References visitScreenItems().
Referenced by countBitmapsWithOpacity(), and countRotatedBitmaps().
|
static |
Definition at line 382 of file sch_downgrade.cpp.
References DEMORGAN, SCH_SCREEN::Items(), EE_RTREE::OfType(), and SCH_SYMBOL_T.
Referenced by screenRules().
|
static |
Definition at line 899 of file sch_downgrade.cpp.
References countSymbolStackedPins(), SCH_SCREEN::GetLibSymbols(), and name.
Referenced by screenRules().
|
static |
Definition at line 1669 of file sch_downgrade.cpp.
References EDA_ITEM::GetCustomProperties(), and visitSymbolItems().
Referenced by screenRules().
|
static |
Definition at line 226 of file sch_downgrade.cpp.
References LIB_SYMBOL::GetDrawItems(), and isEllipse().
Referenced by countEllipses(), and screenRules().
|
static |
Definition at line 327 of file sch_downgrade.cpp.
References LIB_SYMBOL::GetGraphicalPins(), hasEscapedStackedPinNumber(), and pin.
Referenced by countEscapedStackedPins(), and screenRules().
|
static |
Definition at line 255 of file sch_downgrade.cpp.
References LIB_SYMBOL::GetDrawItems(), and isHatchedFillItem().
Referenced by countHatchedFills(), and screenRules().
|
static |
Definition at line 355 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 1839 of file sch_downgrade.cpp.
References LIB_SYMBOL::GetDrawItems(), and hasLineEndings().
Referenced by screenRules().
|
static |
Definition at line 321 of file sch_downgrade.cpp.
References LIB_SYMBOL::IsLocalPower().
Referenced by countLocalPowerSymbols(), and screenRules().
|
static |
Definition at line 370 of file sch_downgrade.cpp.
References LIB_SYMBOL::HasDeMorganBodyStyles(), and LIB_SYMBOL::IsMultiBodyStyle().
Referenced by countNamedBodyStyles(), and screenRules().
|
static |
Definition at line 279 of file sch_downgrade.cpp.
References LIB_SYMBOL::GetAssociatedFootprints(), and LIB_SYMBOL::GetPinMaps().
Referenced by countPinMaps(), and screenRules().
|
static |
Definition at line 481 of file sch_downgrade.cpp.
References SYMBOL::GetExcludedFromPosFiles().
Referenced by countPositionExclusions(), and screenRules().
|
static |
Definition at line 292 of file sch_downgrade.cpp.
References LIB_SYMBOL::GetDrawItems(), and isRoundedRect().
Referenced by countRoundedRects(), and screenRules().
|
static |
Definition at line 341 of file sch_downgrade.cpp.
References LIB_SYMBOL::GetGraphicalPins(), pin, and usesPlainStackedPinNumber().
Referenced by countStackedPins(), and screenRules().
|
static |
Definition at line 396 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 2347 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 2280 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(), BOOST_AUTO_TEST_CASE(), checkExportUsesOnlyKnownTokens(), and EESCHEMA_JOBS_HANDLER::JobDowngrade().
|
static |
Definition at line 1736 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 2029 of file sch_downgrade.cpp.
References SCH_BITMAP_T, SCH_BITMAP::SetOpacity(), EDA_ITEM::Type(), and visitScreenItems().
Referenced by screenRules().
|
static |
Definition at line 1703 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 784 of file sch_downgrade.cpp.
References dropSymbolJumperPins(), SCH_SCREEN::GetLibSymbols(), and name.
Referenced by screenRules().
|
static |
Definition at line 1988 of file sch_downgrade.cpp.
References clearLineEndings(), and visitScreenItems().
Referenced by screenRules().
|
static |
Definition at line 733 of file sch_downgrade.cpp.
References dropSymbolBodyStyleNames(), SCH_SCREEN::GetLibSymbols(), and name.
Referenced by screenRules().
|
static |
Definition at line 699 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 513 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 871 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 376 of file sch_downgrade.cpp.
References LIB_SYMBOL::SetBodyStyleNames().
Referenced by dropNamedBodyStyles(), and screenRules().
|
static |
Definition at line 1693 of file sch_downgrade.cpp.
References EDA_ITEM::ClearCustomProperties(), and visitSymbolItems().
Referenced by dropCustomProperties(), and screenRules().
|
static |
Definition at line 361 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 1981 of file sch_downgrade.cpp.
References clearLineEndings(), and LIB_SYMBOL::GetDrawItems().
Referenced by screenRules().
|
static |
Definition at line 285 of file sch_downgrade.cpp.
References LIB_SYMBOL::SetAssociatedFootprints(), and LIB_SYMBOL::SetPinMaps().
Referenced by dropPinMaps(), and screenRules().
|
static |
Definition at line 487 of file sch_downgrade.cpp.
References SYMBOL::SetExcludedFromPosFiles().
Referenced by dropPositionExclusions(), and screenRules().
|
static |
Definition at line 120 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 2448 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 2555 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, SHEET_REF_SUFFIX, 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 1444 of file sch_downgrade.cpp.
References result.
Referenced by hasIncompatibleBusVector().
|
static |
Definition at line 1097 of file sch_downgrade.cpp.
References ExpandTextVars(), and INTERNAL.
Referenced by bakeLegacyExpressions(), and textNeedsDowngrade().
|
static |
Definition at line 180 of file sch_downgrade.cpp.
References EscapeStackedPinItem(), ExpandStackedPinNotation(), and next().
Referenced by countSymbolEscapedStackedPins(), and usesPlainStackedPinNumber().
|
static |
Definition at line 1107 of file sch_downgrade.cpp.
Referenced by planTextDowngrade(), and textNeedsDowngrade().
|
static |
Definition at line 1563 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 1752 of file sch_downgrade.cpp.
References NONE.
Referenced by ClassifyLibSymbolForDowngrade(), ClassifyScreenForDowngrade(), countLineEndings(), countSymbolLineEndings(), lowerLineEndings(), and lowerSymbolLineEndings().
|
static |
Definition at line 529 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 1409 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 659 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 1084 of file sch_downgrade.cpp.
References ExpandTextVars(), INTERNAL, and isPostTargetTextVar().
Referenced by bakeLegacyExpressions(), and planTextDowngrade().
|
static |
Definition at line 850 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 93 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 103 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 1076 of file sch_downgrade.cpp.
Referenced by hasPostTargetTextVars(), and textNeedsDowngrade().
|
static |
Definition at line 144 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 1863 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 1766 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 589 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 638 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 1930 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 814 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 240 of file sch_downgrade.cpp.
References ellipseToPolygon(), LIB_SYMBOL::GetDrawItems(), and isEllipse().
Referenced by lowerEllipses(), and screenRules().
|
static |
Definition at line 269 of file sch_downgrade.cpp.
References FILLED_SHAPE, LIB_SYMBOL::GetDrawItems(), and isHatchedFillItem().
Referenced by lowerHatchedFills(), and screenRules().
|
static |
Definition at line 1894 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 306 of file sch_downgrade.cpp.
References LIB_SYMBOL::GetDrawItems(), isRoundedRect(), and roundedRectToPolygon().
Referenced by lowerRoundedRects(), and screenRules().
|
static |
Definition at line 971 of file sch_downgrade.cpp.
References SCH_SCREEN::GetLibSymbols(), isEllipse(), name, omitScreenItems(), and omitSymbolEllipses().
Referenced by boardRules(), and screenRules().
|
static |
Definition at line 1005 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 983 of file sch_downgrade.cpp.
References SCH_SCREEN::GetLibSymbols(), isRoundedRect(), name, omitScreenItems(), and omitSymbolRoundedRects().
Referenced by boardRules(), and screenRules().
|
static |
Definition at line 929 of file sch_downgrade.cpp.
References group, SCH_SCREEN::Items(), and SCH_SCREEN::Remove().
Referenced by omitEllipses(), omitRoundedRects(), and omitSelectedCustomBodyStyles().
|
static |
Definition at line 951 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 961 of file sch_downgrade.cpp.
References isEllipse(), and omitSymbolGraphics().
Referenced by omitEllipses(), and screenRules().
|
static |
Definition at line 913 of file sch_downgrade.cpp.
References LIB_SYMBOL::GetDrawItems(), and LIB_SYMBOL::RemoveDrawItem().
Referenced by omitSymbolEllipses(), and omitSymbolRoundedRects().
|
static |
Definition at line 995 of file sch_downgrade.cpp.
References LIB_SYMBOL::GetDrawItems(), isHatchedFillItem(), and NO_FILL.
Referenced by omitHatchedFills(), and screenRules().
|
static |
Definition at line 965 of file sch_downgrade.cpp.
References isRoundedRect(), and omitSymbolGraphics().
Referenced by omitRoundedRects(), and screenRules().
|
static |
Definition at line 1220 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 1659 of file sch_downgrade.cpp.
References _, COMPATIBILITY_REPORT::Add(), and BLOCK.
Referenced by ClassifySchematicStructureForDowngrade(), and ClassifyScreenForDowngrade().
|
static |
Definition at line 1648 of file sch_downgrade.cpp.
References _, COMPATIBILITY_REPORT::Add(), and BLOCK.
Referenced by ClassifySchematicStructureForDowngrade(), and ClassifyScreenForDowngrade().
|
static |
Definition at line 1382 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 154 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 2412 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_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 2424 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 2442 of file sch_downgrade.cpp.
References SCH_DOWNGRADE_COVERED.
Referenced by BOOST_AUTO_TEST_CASE().
|
static |
Definition at line 2057 of file sch_downgrade.cpp.
References _, bakeSelectedCustomBodyStyles(), BLOCK, countAlternateSymbols(), countBitmapsWithOpacity(), countCustomProperties(), countEllipses(), countEscapedStackedPins(), countGroups(), countHatchedFills(), countJumperPinGroups(), countLineEndings(), countLocalPowerSymbols(), countLockedItems(), countNamedBodyStyles(), countPinMaps(), countPositionExclusions(), countRotatedBitmaps(), countRoundedRects(), countRuleAreaFlags(), countSelectedCustomBodyStyles(), countStackedPins(), countSymbolCustomProperties(), countSymbolEllipses(), countSymbolEscapedStackedPins(), countSymbolHatchedFills(), countSymbolJumperPins(), countSymbolLineEndings(), countSymbolLocalPower(), countSymbolNamedBodyStyles(), countSymbolPinMaps(), countSymbolPositionExclusions(), countSymbolRoundedRects(), countSymbolStackedPins(), countUnresolvedCustomBodyStyles(), DROP, dropAlternateSymbols(), dropBitmapOpacity(), 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_IMAGE_OPACITY, SCH_VER_IMAGE_ROTATION, 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 1315 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 2528 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 2475 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 2436 of file sch_downgrade.cpp.
References SYMLIB_DOWNGRADE_COVERED.
Referenced by BOOST_AUTO_TEST_CASE().
|
static |
Definition at line 1303 of file sch_downgrade.cpp.
References plan(), planTextDowngrade(), and visitSymbolItems().
Referenced by ClassifyLibSymbolForDowngrade(), and DowngradeLibSymbolInPlace().
|
static |
Definition at line 1113 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 750 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 558 of file sch_downgrade.cpp.
References hasOwnLock(), and SCH_SCREEN::Items().
Referenced by screenRules().
|
static |
Definition at line 212 of file sch_downgrade.cpp.
References ExpandStackedPinNotation(), and hasEscapedStackedPinNumber().
Referenced by countSymbolStackedPins().
|
static |
Definition at line 1035 of file sch_downgrade.cpp.
References SCH_SCREEN::GetLibSymbols(), SCH_SCREEN::Items(), name, RECURSE, and visitSymbolItems().
Referenced by ClassifyScreenForDowngrade(), countCustomProperties(), countIncompatibleBusLabels(), countLineEndings(), countPaddedBusLabels(), countScreenItems(), dropBitmapOpacity(), dropCustomProperties(), and dropLineEndings().
|
static |
Definition at line 1026 of file sch_downgrade.cpp.
References LIB_SYMBOL::GetDrawItems().
Referenced by countSymbolCustomProperties(), dropSymbolCustomProperties(), screenTextPlan(), symbolTextPlan(), and visitScreenItems().
|
staticconstexpr |
Definition at line 612 of file sch_downgrade.cpp.
Referenced by countHatchedFills(), lowerHatchedFills(), and omitHatchedFills().
|
staticconstexpr |
Definition at line 89 of file sch_downgrade.cpp.
Referenced by ClassifyScreenForDowngrade(), and SchDowngradeCoveredVersion().
|
staticconstexpr |
Definition at line 2371 of file sch_downgrade.cpp.
Referenced by FindUnsupportedSchToken().
|
staticconstexpr |
Definition at line 2403 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 85 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 84 of file sch_downgrade.cpp.
Referenced by screenRules().
|
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 90 of file sch_downgrade.cpp.
Referenced by ClassifyLibSymbolForDowngrade(), and SymbolLibDowngradeCoveredVersion().
|
staticconstexpr |
Definition at line 81 of file sch_downgrade.cpp.
Referenced by ClassifyLibSymbolForDowngrade().