diff --git a/eeschema/sch_plugins/cadstar/cadstar_sch_archive_loader.cpp b/eeschema/sch_plugins/cadstar/cadstar_sch_archive_loader.cpp index 9707523055..972da01389 100644 --- a/eeschema/sch_plugins/cadstar/cadstar_sch_archive_loader.cpp +++ b/eeschema/sch_plugins/cadstar/cadstar_sch_archive_loader.cpp @@ -449,6 +449,20 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadSchematicSymbolInstances() "net power / symbol. The symbol was not loaded." ), sym.ID ) ); } + + if( sym.ScaleRatioDenominator != 1 || sym.ScaleRatioNumerator != 1 ) + { + wxString symbolName = sym.ComponentRef.Designator; + + if( symbolName.empty() ) + symbolName = wxString::Format( "ID: %s", sym.ID); + + wxLogError( wxString::Format( + _( "Symbol '%s' is scaled in the original CADSTAR schematic but this is not" + "supported in KiCad. The symbol was loaded with 1:1 scale and may require " + "manual fixing." ), + symbolName, sym.PartRef.RefID ) ); + } } } diff --git a/eeschema/sch_plugins/cadstar/cadstar_sch_archive_parser.cpp b/eeschema/sch_plugins/cadstar/cadstar_sch_archive_parser.cpp index 7702a51f2b..a9d843fdad 100644 --- a/eeschema/sch_plugins/cadstar/cadstar_sch_archive_parser.cpp +++ b/eeschema/sch_plugins/cadstar/cadstar_sch_archive_parser.cpp @@ -677,6 +677,11 @@ void CADSTAR_SCH_ARCHIVE_PARSER::SYMBOL::Parse( XNODE* aNode ) { Fixed = true; } + else if( cNodeName == wxT( "SCALE" ) ) + { + ScaleRatioNumerator = GetXmlAttributeIDLong( cNode, 0 ); + ScaleRatioDenominator = GetXmlAttributeIDLong( cNode, 1 ); + } else if( cNodeName == wxT( "READABILITY" ) ) { Readability = ParseReadability( cNode ); diff --git a/eeschema/sch_plugins/cadstar/cadstar_sch_archive_parser.h b/eeschema/sch_plugins/cadstar/cadstar_sch_archive_parser.h index cea5cff2d1..ebf202cab4 100644 --- a/eeschema/sch_plugins/cadstar/cadstar_sch_archive_parser.h +++ b/eeschema/sch_plugins/cadstar/cadstar_sch_archive_parser.h @@ -260,6 +260,8 @@ public: long OrientAngle = 0; bool Mirror = false; bool Fixed = false; + long ScaleRatioNumerator = 1; ///< Symbols can be arbitrarily scaled in CADSTAR + long ScaleRatioDenominator = 1; READABILITY Readability = READABILITY::BOTTOM_TO_TOP; bool IsComponent = false;