altium: add support for junction
This commit is contained in:
parent
30ea1a274e
commit
b4b8e31177
|
@ -205,6 +205,20 @@ ASCH_WIRE::ASCH_WIRE( const std::map<wxString, wxString>& aProperties )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ASCH_JUNCTION::ASCH_JUNCTION( const std::map<wxString, wxString>& aProperties )
|
||||||
|
{
|
||||||
|
wxASSERT( PropertiesReadRecord( aProperties ) == ALTIUM_SCH_RECORD::JUNCTION );
|
||||||
|
|
||||||
|
ownerpartid = ALTIUM_PARSER::PropertiesReadInt( aProperties, "OWNERPARTID", -1 );
|
||||||
|
|
||||||
|
int x = ALTIUM_PARSER::PropertiesReadInt( aProperties, "LOCATION.X", 0 );
|
||||||
|
int xfrac = ALTIUM_PARSER::PropertiesReadInt( aProperties, "LOCATION.X_FRAC", 0 );
|
||||||
|
int y = ALTIUM_PARSER::PropertiesReadInt( aProperties, "LOCATION.Y", 0 );
|
||||||
|
int yfrac = ALTIUM_PARSER::PropertiesReadInt( aProperties, "LOCATION.Y_FRAC", 0 );
|
||||||
|
location = wxPoint( Altium2KiCadUnit( x, xfrac ), -Altium2KiCadUnit( y, yfrac ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
ASCH_DESIGNATOR::ASCH_DESIGNATOR( const std::map<wxString, wxString>& aProperties )
|
ASCH_DESIGNATOR::ASCH_DESIGNATOR( const std::map<wxString, wxString>& aProperties )
|
||||||
{
|
{
|
||||||
wxASSERT( PropertiesReadRecord( aProperties ) == ALTIUM_SCH_RECORD::DESIGNATOR );
|
wxASSERT( PropertiesReadRecord( aProperties ) == ALTIUM_SCH_RECORD::DESIGNATOR );
|
||||||
|
|
|
@ -242,6 +242,16 @@ struct ASCH_WIRE
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
struct ASCH_JUNCTION
|
||||||
|
{
|
||||||
|
int ownerpartid;
|
||||||
|
|
||||||
|
wxPoint location;
|
||||||
|
|
||||||
|
explicit ASCH_JUNCTION( const std::map<wxString, wxString>& aProperties );
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
struct ASCH_DESIGNATOR
|
struct ASCH_DESIGNATOR
|
||||||
{
|
{
|
||||||
int ownerindex;
|
int ownerindex;
|
||||||
|
|
|
@ -350,6 +350,7 @@ void SCH_ALTIUM_PLUGIN::Parse( const CFB::CompoundFileReader& aReader )
|
||||||
case ALTIUM_SCH_RECORD::TEXT_FRAME:
|
case ALTIUM_SCH_RECORD::TEXT_FRAME:
|
||||||
break;
|
break;
|
||||||
case ALTIUM_SCH_RECORD::JUNCTION:
|
case ALTIUM_SCH_RECORD::JUNCTION:
|
||||||
|
ParseJunction( properties );
|
||||||
break;
|
break;
|
||||||
case ALTIUM_SCH_RECORD::IMAGE:
|
case ALTIUM_SCH_RECORD::IMAGE:
|
||||||
break;
|
break;
|
||||||
|
@ -683,6 +684,17 @@ void SCH_ALTIUM_PLUGIN::ParseWire( const std::map<wxString, wxString>& aProperti
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SCH_ALTIUM_PLUGIN::ParseJunction( const std::map<wxString, wxString>& aProperties )
|
||||||
|
{
|
||||||
|
ASCH_JUNCTION elem( aProperties );
|
||||||
|
|
||||||
|
SCH_JUNCTION* junction = new SCH_JUNCTION( elem.location );
|
||||||
|
|
||||||
|
junction->SetFlags( IS_NEW );
|
||||||
|
m_currentSheet->GetScreen()->Append( junction );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void SCH_ALTIUM_PLUGIN::ParseDesignator( const std::map<wxString, wxString>& aProperties )
|
void SCH_ALTIUM_PLUGIN::ParseDesignator( const std::map<wxString, wxString>& aProperties )
|
||||||
{
|
{
|
||||||
ASCH_DESIGNATOR elem( aProperties );
|
ASCH_DESIGNATOR elem( aProperties );
|
||||||
|
|
|
@ -104,6 +104,7 @@ private:
|
||||||
void ParseNetLabel( const std::map<wxString, wxString>& aProperties );
|
void ParseNetLabel( const std::map<wxString, wxString>& aProperties );
|
||||||
void ParseBus( const std::map<wxString, wxString>& aProperties );
|
void ParseBus( const std::map<wxString, wxString>& aProperties );
|
||||||
void ParseWire( const std::map<wxString, wxString>& aProperties );
|
void ParseWire( const std::map<wxString, wxString>& aProperties );
|
||||||
|
void ParseJunction( const std::map<wxString, wxString>& aProperties );
|
||||||
void ParseDesignator( const std::map<wxString, wxString>& aProperties );
|
void ParseDesignator( const std::map<wxString, wxString>& aProperties );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Reference in New Issue