altium: parse no_erc record
This commit is contained in:
parent
79a02d7997
commit
ad93396d35
|
@ -229,7 +229,7 @@ ASCH_POLYGON::ASCH_POLYGON( const std::map<wxString, wxString>& aProperties )
|
|||
|
||||
ASCH_ROUND_RECTANGLE::ASCH_ROUND_RECTANGLE( const std::map<wxString, wxString>& aProperties )
|
||||
{
|
||||
wxASSERT( PropertiesReadRecord( aProperties ) == ALTIUM_SCH_RECORD::RECTANGLE );
|
||||
wxASSERT( PropertiesReadRecord( aProperties ) == ALTIUM_SCH_RECORD::ROUND_RECTANGLE );
|
||||
|
||||
ownerindex =
|
||||
ALTIUM_PARSER::PropertiesReadInt( aProperties, "OWNERINDEX", ALTIUM_COMPONENT_NONE );
|
||||
|
@ -314,6 +314,18 @@ ASCH_RECTANGLE::ASCH_RECTANGLE( const std::map<wxString, wxString>& aProperties
|
|||
}
|
||||
|
||||
|
||||
ASCH_NO_ERC::ASCH_NO_ERC( const std::map<wxString, wxString>& aProperties )
|
||||
{
|
||||
wxASSERT( PropertiesReadRecord( aProperties ) == ALTIUM_SCH_RECORD::NO_ERC );
|
||||
|
||||
location = wxPoint( PropertiesReadKiCadUnitFrac( aProperties, "LOCATION.X" ),
|
||||
-PropertiesReadKiCadUnitFrac( aProperties, "LOCATION.Y" ) );
|
||||
|
||||
isActive = ALTIUM_PARSER::PropertiesReadBool( aProperties, "ISACTIVE", true );
|
||||
supressAll = ALTIUM_PARSER::PropertiesReadInt( aProperties, "SUPPRESSALL", true );
|
||||
}
|
||||
|
||||
|
||||
ASCH_NET_LABEL::ASCH_NET_LABEL( const std::map<wxString, wxString>& aProperties )
|
||||
{
|
||||
wxASSERT( PropertiesReadRecord( aProperties ) == ALTIUM_SCH_RECORD::NET_LABEL );
|
||||
|
|
|
@ -321,6 +321,17 @@ struct ASCH_RECTANGLE
|
|||
};
|
||||
|
||||
|
||||
struct ASCH_NO_ERC
|
||||
{
|
||||
wxPoint location;
|
||||
|
||||
bool isActive;
|
||||
bool supressAll;
|
||||
|
||||
explicit ASCH_NO_ERC( const std::map<wxString, wxString>& aProperties );
|
||||
};
|
||||
|
||||
|
||||
struct ASCH_NET_LABEL
|
||||
{
|
||||
wxString text;
|
||||
|
|
|
@ -345,6 +345,7 @@ void SCH_ALTIUM_PLUGIN::Parse( const CFB::CompoundFileReader& aReader )
|
|||
case ALTIUM_SCH_RECORD::PORT:
|
||||
break;
|
||||
case ALTIUM_SCH_RECORD::NO_ERC:
|
||||
ParseNoERC( properties );
|
||||
break;
|
||||
case ALTIUM_SCH_RECORD::NET_LABEL:
|
||||
ParseNetLabel( properties );
|
||||
|
@ -1051,6 +1052,20 @@ void SCH_ALTIUM_PLUGIN::ParseRectangle( const std::map<wxString, wxString>& aPro
|
|||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::ParseNoERC( const std::map<wxString, wxString>& aProperties )
|
||||
{
|
||||
ASCH_NO_ERC elem( aProperties );
|
||||
|
||||
if( elem.isActive )
|
||||
{
|
||||
SCH_NO_CONNECT* noConnect = new SCH_NO_CONNECT( elem.location );
|
||||
|
||||
noConnect->SetFlags( IS_NEW );
|
||||
m_currentSheet->GetScreen()->Append( noConnect );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::ParseNetLabel( const std::map<wxString, wxString>& aProperties )
|
||||
{
|
||||
ASCH_NET_LABEL elem( aProperties );
|
||||
|
|
|
@ -107,6 +107,7 @@ private:
|
|||
void ParseArc( const std::map<wxString, wxString>& aProperties );
|
||||
void ParseLine( const std::map<wxString, wxString>& aProperties );
|
||||
void ParseRectangle( const std::map<wxString, wxString>& aProperties );
|
||||
void ParseNoERC( const std::map<wxString, wxString>& aProperties );
|
||||
void ParseNetLabel( const std::map<wxString, wxString>& aProperties );
|
||||
void ParseBus( const std::map<wxString, wxString>& aProperties );
|
||||
void ParseWire( const std::map<wxString, wxString>& aProperties );
|
||||
|
|
Loading…
Reference in New Issue