47 comp.m_mirror = wxT(
"M" );
55 comp.m_comp_name.Trim().Trim(
false );
56 comp.m_part_name.Trim().Trim(
false );
58 if( comp.m_comp_name.IsEmpty() )
61 comp.m_comp_name = wxString::Format(
"UNNAMED%zu",
m_compList.size() );
64 wxRegEx spaces(
"\\s" );
65 spaces.Replace( &comp.m_comp_name,
"_" );
66 spaces.Replace( &comp.m_part_name,
"_" );
87 ost <<
"# CMP " <<
m_index << std::endl;
100 ost <<
"#" << std::endl;
void WriteAttributes(std::ostream &ost, const std::string &prefix="") const
void WriteAttributes(std::ostream &ost) const
std::list< ODB_COMPONENT > m_compList
ODB_COMPONENT & AddComponent(const FOOTPRINT *aFp, const EDA_DATA::PACKAGE &aPkg)
void Write(std::ostream &ost) const
const UTF8 & GetLibItemName() const
const wxString GetFullLibraryName() const
const size_t m_index
! CMP index number on board to be used in SNT(TOP), 0~n-1
std::list< TOEPRINT > m_toeprints
std::pair< wxString, wxString > m_center
size_t m_pkg_ref
! package ref number from PKG in eda/data file, 0~n-1
wxString m_part_name
! Part identification is a single string of ASCII characters without spaces
void Write(std::ostream &ost) const
wxString m_comp_name
! Unique reference designator (component name)
static std::string m_unitsStr
static constexpr EDA_ANGLE ANGLE_0
static constexpr EDA_ANGLE ANGLE_360
std::pair< wxString, wxString > AddXY(const VECTOR2I &aVec)
wxString Double2String(double aVal)
size_t m_subnet_num
! Number of subnet (SNT record TOP) in the referenced net
std::pair< wxString, wxString > m_center
! Board location of the pin.
void Write(std::ostream &ost) const
size_t m_net_num
! Number of NET record in the eda/data file.
wxString m_mirror
! equal to CMP m_mirror.
const size_t m_pin_num
! index of PIN record in the eda/data file, 0~n-1.
wxString m_toeprint_name
! Name of the pad in PIN record
wxString m_rot
! Rotation, clockwise, it equals to the actual PAD rotation, ! not CMP m_rot.