KiCad PCB EDA Suite
|
#include <pcb_io_easyeda_parser.h>
Public Member Functions | |
PCB_IO_EASYEDA_PARSER (PROGRESS_REPORTER *aProgressReporter) | |
~PCB_IO_EASYEDA_PARSER () | |
PCB_LAYER_ID | LayerToKi (const wxString &aLayer) |
double | ScaleSize (double aValue) override |
void | ParseBoard (BOARD *aBoard, const VECTOR2D &aOrigin, std::map< wxString, std::unique_ptr< FOOTPRINT > > &aFootprintMap, wxArrayString aShapes) |
FOOTPRINT * | ParseFootprint (const VECTOR2D &aOrigin, const EDA_ANGLE &aOrientation, int aLayer, BOARD *aParent, std::map< wxString, wxString > aParams, std::map< wxString, std::unique_ptr< FOOTPRINT > > &aFootprintMap, wxArrayString aShapes) |
void | ParseToBoardItemContainer (BOARD_ITEM_CONTAINER *aContainer, BOARD *aParent, std::map< wxString, wxString > paramMap, std::map< wxString, std::unique_ptr< FOOTPRINT > > &aFootprintMap, wxArrayString shapes) |
double | ConvertSize (const wxString &aValue) |
double | ScaleSize (const wxString &aValue) |
template<typename T > | |
VECTOR2< T > | ScalePos (const VECTOR2< T > &aValue) |
double | RelPosX (double aValue) |
double | RelPosX (const wxString &aValue) |
double | RelPosY (double aValue) |
double | RelPosY (const wxString &aValue) |
template<typename T > | |
VECTOR2< T > | RelPos (const VECTOR2< T > &aVec) |
void | TransformTextToBaseline (EDA_TEXT *textItem, const wxString &baselineAlign) |
std::vector< SHAPE_LINE_CHAIN > | ParseLineChains (const wxString &aData, int aArcMinSegLen, bool aForceClosed) |
Static Public Member Functions | |
static double | Convert (const wxString &aValue) |
Protected Attributes | |
VECTOR2D | m_relOrigin |
Definition at line 46 of file pcb_io_easyeda_parser.h.
|
explicit |
Definition at line 59 of file pcb_io_easyeda_parser.cpp.
PCB_IO_EASYEDA_PARSER::~PCB_IO_EASYEDA_PARSER | ( | ) |
Definition at line 63 of file pcb_io_easyeda_parser.cpp.
|
staticinherited |
Definition at line 33 of file easyeda_parser_base.cpp.
References _, and THROW_IO_ERROR.
Referenced by EASYEDA_PARSER_BASE::ConvertSize(), PCB_IO_EASYEDA::FootprintLoad(), loadSymbol(), EASYEDA_PARSER_BASE::ParseLineChains(), SCH_EASYEDA_PARSER::ParseSchematic(), SCH_EASYEDA_PARSER::ParseSymbolShapes(), ParseToBoardItemContainer(), EASYEDA_PARSER_BASE::RelPosX(), EASYEDA_PARSER_BASE::RelPosY(), and EASYEDA_PARSER_BASE::ScaleSize().
|
inlineinherited |
Definition at line 39 of file easyeda_parser_base.h.
References EASYEDA_PARSER_BASE::Convert(), and EASYEDA_PARSER_BASE::ScaleSize().
Referenced by ParseToBoardItemContainer().
PCB_LAYER_ID PCB_IO_EASYEDA_PARSER::LayerToKi | ( | const wxString & | aLayer | ) |
Definition at line 67 of file pcb_io_easyeda_parser.cpp.
References B_Cu, B_Fab, B_Mask, B_Paste, B_SilkS, Dwgs_User, Eco1_User, Eco2_User, Edge_Cuts, F_Cu, F_Fab, F_Mask, F_Paste, F_SilkS, In10_Cu, In11_Cu, In12_Cu, In13_Cu, In14_Cu, In15_Cu, In16_Cu, In17_Cu, In18_Cu, In19_Cu, In1_Cu, In20_Cu, In21_Cu, In22_Cu, In23_Cu, In24_Cu, In25_Cu, In26_Cu, In27_Cu, In28_Cu, In29_Cu, In2_Cu, In30_Cu, In3_Cu, In4_Cu, In5_Cu, In6_Cu, In7_Cu, In8_Cu, In9_Cu, User_1, User_2, User_3, User_4, and User_5.
Referenced by PCB_IO_EASYEDA::LoadBoard(), and ParseToBoardItemContainer().
void PCB_IO_EASYEDA_PARSER::ParseBoard | ( | BOARD * | aBoard, |
const VECTOR2D & | aOrigin, | ||
std::map< wxString, std::unique_ptr< FOOTPRINT > > & | aFootprintMap, | ||
wxArrayString | aShapes | ||
) |
Definition at line 1122 of file pcb_io_easyeda_parser.cpp.
References BOARD::Add(), ConnectBoardShapes(), BOARD::Drawings(), Edge_Cuts, EASYEDA_PARSER_BASE::m_relOrigin, ParseToBoardItemContainer(), PCB_SHAPE_T, and SHAPE_JOIN_DISTANCE.
Referenced by PCB_IO_EASYEDA::LoadBoard().
FOOTPRINT * PCB_IO_EASYEDA_PARSER::ParseFootprint | ( | const VECTOR2D & | aOrigin, |
const EDA_ANGLE & | aOrientation, | ||
int | aLayer, | ||
BOARD * | aParent, | ||
std::map< wxString, wxString > | aParams, | ||
std::map< wxString, std::unique_ptr< FOOTPRINT > > & | aFootprintMap, | ||
wxArrayString | aShapes | ||
) |
Definition at line 1076 of file pcb_io_easyeda_parser.cpp.
References ANGLE_180, B_Cu, ConnectBoardShapes(), Edge_Cuts, F_Cu, EASYEDA_PARSER_BASE::m_relOrigin, ParseToBoardItemContainer(), PCB_SHAPE_T, and SHAPE_JOIN_DISTANCE.
Referenced by PCB_IO_EASYEDA::FootprintLoad(), and ParseToBoardItemContainer().
|
inherited |
Definition at line 111 of file easyeda_parser_base.cpp.
References SHAPE_LINE_CHAIN::Append(), SHAPE_LINE_CHAIN::Clear(), SHAPE_ARC::ConstructFromStartEndCenter(), EASYEDA_PARSER_BASE::Convert(), delta, BEZIER_POLY::GetPoly(), SHAPE_LINE_CHAIN::PointCount(), EASYEDA_PARSER_BASE::RelPos(), SHAPE_LINE_CHAIN::SetClosed(), unknown, and VECTOR2< T >::x.
Referenced by SCH_EASYEDA_PARSER::ParseSymbolShapes(), and ParseToBoardItemContainer().
void PCB_IO_EASYEDA_PARSER::ParseToBoardItemContainer | ( | BOARD_ITEM_CONTAINER * | aContainer, |
BOARD * | aParent, | ||
std::map< wxString, wxString > | paramMap, | ||
std::map< wxString, std::unique_ptr< FOOTPRINT > > & | aFootprintMap, | ||
wxArrayString | shapes | ||
) |
Definition at line 146 of file pcb_io_easyeda_parser.cpp.
References _, SEG::A, BOARD::Add(), FOOTPRINT::Add(), BOARD_ITEM_CONTAINER::Add(), FOOTPRINT::AddField(), SHAPE_POLY_SET::AddHole(), PADSTACK::ALL_LAYERS, ANGLE_0, ANGLE_180, SHAPE_LINE_CHAIN::Append(), SHAPE_POLY_SET::Append(), SEG::B, B_Cu, Cmts_User, EASYEDA_PARSER_BASE::Convert(), EASYEDA_PARSER_BASE::ConvertSize(), SHAPE_POLY_SET::COutline(), SHAPE_POLY_SET::CPolygons(), DEGREES_T, delta, DIRECT_MODEL_UUID_KEY, EasyEdaToKiCadLibID(), Edge_Cuts, EscapeString(), F_Cu, BOARD::FindNet(), Flip(), SHAPE_POLY_SET::Fracture(), get_opt(), FOOTPRINT::GetField(), FOOTPRINT::GetFieldCount(), KIFONT::FONT::GetFont(), FOOTPRINT::GetLayer(), BOARD::GetNetCount(), FOOTPRINT::GetOrientation(), FOOTPRINT::GetOrientationDegrees(), GR_TEXT_H_ALIGN_LEFT, GR_TEXT_V_ALIGN_TOP, group, HIDDEN_TEXT_SIZE(), IsBackLayer(), IsCopperLayer(), EDA_IU_SCALE::IUTomm(), KiROUND(), LayerToKi(), FP_3DMODEL::m_Filename, FP_3DMODEL::m_Offset, EASYEDA_PARSER_BASE::m_relOrigin, FP_3DMODEL::m_Rotation, EDA_IU_SCALE::mmToIU(), MODEL_SIZE_KEY, FOOTPRINT::Models(), FOOTPRINT::Move(), SHAPE_LINE_CHAIN::Move(), name, SHAPE_POLY_SET::OutlineCount(), pad, ParseFootprint(), EASYEDA_PARSER_BASE::ParseLineChains(), pcbIUScale, SHAPE_POLY_SET::PM_STRICTLY_SIMPLE, PAD::PTHMask(), SHAPE_POLY_SET::RebuildHolesFromContours(), REFERENCE_FIELD, EASYEDA_PARSER_BASE::RelPos(), EASYEDA_PARSER_BASE::RelPosX(), EASYEDA_PARSER_BASE::RelPosY(), SHAPE_LINE_CHAIN::Rotate(), RotatePoint(), ScaleSize(), SHAPE_LINE_CHAIN::SetClosed(), FOOTPRINT::SetFPID(), BOARD_ITEM::SetLayer(), EDA_TEXT::SetText(), EDA_TEXT::SetVisible(), PAD::SMDMask(), text, THROW_IO_ERROR, EASYEDA_PARSER_BASE::TransformTextToBaseline(), UnescapeHTML(), unknown, PAD::UnplatedHoleMask(), VALUE_FIELD, via, VECTOR2< T >::x, VECTOR3< T >::x, VECTOR2< T >::y, VECTOR3< T >::y, and VECTOR3< T >::z.
Referenced by ParseBoard(), and ParseFootprint().
|
inlineinherited |
Definition at line 58 of file easyeda_parser_base.h.
References EASYEDA_PARSER_BASE::m_relOrigin, and EASYEDA_PARSER_BASE::ScalePos().
Referenced by EASYEDA_PARSER_BASE::ParseLineChains(), SCH_EASYEDA_PARSER::ParseSchematic(), and ParseToBoardItemContainer().
|
inherited |
Definition at line 58 of file easyeda_parser_base.cpp.
References EASYEDA_PARSER_BASE::Convert(), and EASYEDA_PARSER_BASE::RelPosX().
|
inherited |
Definition at line 44 of file easyeda_parser_base.cpp.
References EASYEDA_PARSER_BASE::m_relOrigin, EASYEDA_PARSER_BASE::ScaleSize(), and VECTOR2< T >::x.
Referenced by SCH_EASYEDA_PARSER::ParseSchematic(), ParseToBoardItemContainer(), SCH_EASYEDA_PARSER::RelPosSym(), and EASYEDA_PARSER_BASE::RelPosX().
|
inherited |
Definition at line 64 of file easyeda_parser_base.cpp.
References EASYEDA_PARSER_BASE::Convert(), and EASYEDA_PARSER_BASE::RelPosY().
|
inherited |
Definition at line 51 of file easyeda_parser_base.cpp.
References EASYEDA_PARSER_BASE::m_relOrigin, EASYEDA_PARSER_BASE::ScaleSize(), and VECTOR2< T >::y.
Referenced by SCH_EASYEDA_PARSER::ParseSchematic(), ParseToBoardItemContainer(), SCH_EASYEDA_PARSER::RelPosSym(), and EASYEDA_PARSER_BASE::RelPosY().
|
inlineinherited |
Definition at line 46 of file easyeda_parser_base.h.
References EASYEDA_PARSER_BASE::ScaleSize(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by SCH_EASYEDA_PARSER::ParseSchematic(), and EASYEDA_PARSER_BASE::RelPos().
|
inlineinherited |
Definition at line 43 of file easyeda_parser_base.h.
References EASYEDA_PARSER_BASE::Convert(), and EASYEDA_PARSER_BASE::ScaleSize().
Referenced by EASYEDA_PARSER_BASE::ScaleSize().
|
inlineoverridevirtual |
Implements EASYEDA_PARSER_BASE.
Definition at line 54 of file pcb_io_easyeda_parser.h.
References KiROUND().
Referenced by PCB_IO_EASYEDA::LoadBoard(), and ParseToBoardItemContainer().
|
inherited |
Definition at line 70 of file easyeda_parser_base.cpp.
References EDA_TEXT::GetTextAngle(), EDA_TEXT::GetTextPos(), EDA_TEXT::GetTextSize(), RotatePoint(), EDA_TEXT::SetTextPos(), and VECTOR2< T >::y.
Referenced by SCH_EASYEDA_PARSER::ParseSchematic(), SCH_EASYEDA_PARSER::ParseSymbolShapes(), and ParseToBoardItemContainer().
|
protectedinherited |
Definition at line 69 of file easyeda_parser_base.h.
Referenced by SCH_EASYEDA_PARSER::MakePowerSymbol(), ParseBoard(), ParseFootprint(), SCH_EASYEDA_PARSER::ParseSchematic(), SCH_EASYEDA_PARSER::ParseSymbol(), ParseToBoardItemContainer(), EASYEDA_PARSER_BASE::RelPos(), EASYEDA_PARSER_BASE::RelPosX(), and EASYEDA_PARSER_BASE::RelPosY().