KiCad PCB EDA Suite
|
#include <sch_easyeda_parser.h>
Public Member Functions | |
SCH_EASYEDA_PARSER (SCHEMATIC *aSchematic, PROGRESS_REPORTER *aProgressReporter) | |
~SCH_EASYEDA_PARSER () | |
double | ScaleSize (double aValue) override |
template<typename T > | |
VECTOR2< T > | RelPosSym (const VECTOR2< T > &aVec) |
std::pair< LIB_SYMBOL *, bool > | MakePowerSymbol (const wxString &aFlagTypename, const wxString &aNetname) |
void | ParseSymbolShapes (LIB_SYMBOL *aContainer, std::map< wxString, wxString > paramMap, wxArrayString aShapes) |
LIB_SYMBOL * | ParseSymbol (const VECTOR2D &aOrigin, std::map< wxString, wxString > aParams, wxArrayString aShapes) |
void | ParseSchematic (SCHEMATIC *aSchematic, SCH_SHEET *aRootSheet, const wxString &aFileName, wxArrayString aShapes) |
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 |
Private Attributes | |
SCHEMATIC * | m_schematic |
Definition at line 36 of file sch_easyeda_parser.h.
|
explicit |
Definition at line 62 of file sch_easyeda_parser.cpp.
References m_schematic.
SCH_EASYEDA_PARSER::~SCH_EASYEDA_PARSER | ( | ) |
Definition at line 69 of file sch_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(), ParseSchematic(), ParseSymbolShapes(), PCB_IO_EASYEDA_PARSER::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 PCB_IO_EASYEDA_PARSER::ParseToBoardItemContainer().
std::pair< LIB_SYMBOL *, bool > SCH_EASYEDA_PARSER::MakePowerSymbol | ( | const wxString & | aFlagTypename, |
const wxString & | aNetname | ||
) |
Definition at line 984 of file sch_easyeda_parser.cpp.
References _, EASYEDA::BAR, EASYEDA::CIRCLE, EASYEDA::EARTH, EasyEdaToKiCadLibID(), HelperGeneratePowerPortGraphics(), EASYEDA_PARSER_BASE::m_relOrigin, pin, EASYEDA::POWER_GROUND, and EASYEDA::SIGNAL_GROUND.
Referenced by ParseSchematic().
|
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 ParseSymbolShapes(), and PCB_IO_EASYEDA_PARSER::ParseToBoardItemContainer().
void SCH_EASYEDA_PARSER::ParseSchematic | ( | SCHEMATIC * | aSchematic, |
SCH_SHEET * | aRootSheet, | ||
const wxString & | aFileName, | ||
wxArrayString | aShapes | ||
) |
Definition at line 1067 of file sch_easyeda_parser.cpp.
References SEG::A, std::abs(), SHAPE_LINE_CHAIN::Append(), SCH_SCREEN::Append(), SEG::B, SPIN_STYLE::BOTTOM, SHAPE::Centre(), color, EASYEDA_PARSER_BASE::Convert(), ConvertStrokeStyle(), SHAPE_LINE_CHAIN::CSegment(), SCHEMATIC::CurrentSheet(), EasyEdaToKiCadLibID(), ENDPOINT, SCH_SYMBOL::GetBodyBoundingBox(), KIFONT::FONT::GetFont(), BOX2< Vec >::GetHeight(), EDA_TEXT::GetHorizJustify(), SVG_IMPORT_PLUGIN::GetImageHeight(), SVG_IMPORT_PLUGIN::GetImageWidth(), GRAPHICS_IMPORTER::GetItems(), BOX2< Vec >::GetLeft(), SCH_SCREEN::GetPageSettings(), LIB_SYMBOL::GetReferenceField(), SCH_SHEET::GetScreen(), REFERENCE_IMAGE::GetSize(), EDA_TEXT::GetText(), BOX2< Vec >::GetTop(), EDA_TEXT::GetVertJustify(), BOX2< Vec >::GetWidth(), GR_TEXT_H_ALIGN_CENTER, GR_TEXT_H_ALIGN_LEFT, GR_TEXT_H_ALIGN_RIGHT, GR_TEXT_V_ALIGN_BOTTOM, GR_TEXT_V_ALIGN_CENTER, GR_TEXT_V_ALIGN_TOP, SVG_IMPORT_PLUGIN::Import(), EDA_IU_SCALE::IUToMils(), EDA_IU_SCALE::IUTomm(), KiROUND(), LAYER_WIRE, SPIN_STYLE::LEFT, left, SVG_IMPORT_PLUGIN::LoadFromMemory(), EASYEDA_PARSER_BASE::m_relOrigin, MakePowerSymbol(), BOX2< Vec >::Merge(), EDA_IU_SCALE::MilsToIU(), SHAPE_LINE_CHAIN::Move(), ParseImageTransform(), ParseSymbol(), REFERENCE_IMAGE::ReadImageFile(), EASYEDA_PARSER_BASE::RelPos(), EASYEDA_PARSER_BASE::RelPosX(), EASYEDA_PARSER_BASE::RelPosY(), SPIN_STYLE::RIGHT, SPIN_STYLE::RotateCCW(), EASYEDA_PARSER_BASE::ScalePos(), ScaleSize(), SCH_LINE_T, SCH_SYMBOL_T, schIUScale, SHAPE_LINE_CHAIN::SegmentCount(), EDA_TEXT::SetFont(), PAGE_INFO::SetHeightMils(), EDA_TEXT::SetHorizJustify(), REFERENCE_IMAGE::SetImageScale(), GRAPHICS_IMPORT_PLUGIN::SetImporter(), GRAPHICS_IMPORTER::SetImportOffsetMM(), SCH_SCREEN::SetPageSettings(), SCH_FIELD::SetPosition(), GRAPHICS_IMPORTER::SetScale(), EDA_TEXT::SetTextAngleDegrees(), EDA_TEXT::SetTextSize(), EDA_TEXT::SetVertJustify(), PAGE_INFO::SetWidthMils(), STARTPOINT, SYM_MIRROR_X, SYM_ROTATE_CLOCKWISE, SYM_ROTATE_COUNTERCLOCKWISE, EASYEDA_PARSER_BASE::TransformTextToBaseline(), UnescapeHTML(), SPIN_STYLE::UP, VALUE_FIELD, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by LoadSchematic().
LIB_SYMBOL * SCH_EASYEDA_PARSER::ParseSymbol | ( | const VECTOR2D & | aOrigin, |
std::map< wxString, wxString > | aParams, | ||
wxArrayString | aShapes | ||
) |
Definition at line 923 of file sch_easyeda_parser.cpp.
References c_attributesWhitelist, EasyEdaToKiCadLibID(), get_opt(), EASYEDA_PARSER_BASE::m_relOrigin, ParseSymbolShapes(), SCH_FIELD::SetText(), and EDA_TEXT::SetVisible().
Referenced by loadSymbol(), and ParseSchematic().
void SCH_EASYEDA_PARSER::ParseSymbolShapes | ( | LIB_SYMBOL * | aContainer, |
std::map< wxString, wxString > | paramMap, | ||
wxArrayString | aShapes | ||
) |
Definition at line 394 of file sch_easyeda_parser.cpp.
References SEG::A, std::abs(), LIB_SYMBOL::AddDrawItem(), SHAPE_LINE_CHAIN::Append(), SEG::B, color, EASYEDA_PARSER_BASE::Convert(), ConvertElecType(), ConvertImageToLibShapes(), ConvertStrokeStyle(), SHAPE_LINE_CHAIN::CPoint(), SHAPE_ARC::GetArcMid(), KIFONT::FONT::GetFont(), SVG_IMPORT_PLUGIN::GetImageHeight(), SVG_IMPORT_PLUGIN::GetImageWidth(), GRAPHICS_IMPORTER::GetItems(), SHAPE_ARC::GetP0(), SHAPE_ARC::GetP1(), LIB_SYMBOL::GetReferenceField(), LIB_SYMBOL::GetValueField(), GR_TEXT_H_ALIGN_CENTER, GR_TEXT_H_ALIGN_LEFT, GR_TEXT_H_ALIGN_RIGHT, GR_TEXT_V_ALIGN_TOP, SVG_IMPORT_PLUGIN::Import(), SHAPE_LINE_CHAIN::IsClosed(), EDA_IU_SCALE::IUTomm(), LAYER_DEVICE, SVG_IMPORT_PLUGIN::LoadFromMemory(), EDA_IU_SCALE::MilsToIU(), EASYEDA_PARSER_BASE::ParseLineChains(), pin, SHAPE_LINE_CHAIN::PointCount(), RelPosSym(), scale, ScaleSize(), schIUScale, SHAPE_LINE_CHAIN::SetClosed(), EDA_TEXT::SetFont(), EDA_TEXT::SetHorizJustify(), GRAPHICS_IMPORT_PLUGIN::SetImporter(), GRAPHICS_IMPORTER::SetImportOffsetMM(), GRAPHICS_IMPORTER::SetScale(), EDA_TEXT::SetText(), EDA_TEXT::SetTextAngleDegrees(), EDA_TEXT::SetTextPos(), EDA_TEXT::SetTextSize(), EDA_TEXT::SetVertJustify(), EDA_TEXT::SetVisible(), EASYEDA_PARSER_BASE::TransformTextToBaseline(), UnescapeHTML(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by ParseSymbol().
|
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(), ParseSchematic(), and PCB_IO_EASYEDA_PARSER::ParseToBoardItemContainer().
|
inline |
Definition at line 48 of file sch_easyeda_parser.h.
References EASYEDA_PARSER_BASE::RelPosX(), EASYEDA_PARSER_BASE::RelPosY(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by ParseSymbolShapes().
|
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 ParseSchematic(), PCB_IO_EASYEDA_PARSER::ParseToBoardItemContainer(), 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 ParseSchematic(), PCB_IO_EASYEDA_PARSER::ParseToBoardItemContainer(), 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 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 42 of file sch_easyeda_parser.h.
References KiROUND(), EDA_IU_SCALE::MilsToIU(), and schIUScale.
Referenced by ParseSchematic(), and ParseSymbolShapes().
|
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 ParseSchematic(), ParseSymbolShapes(), and PCB_IO_EASYEDA_PARSER::ParseToBoardItemContainer().
|
protectedinherited |
Definition at line 69 of file easyeda_parser_base.h.
Referenced by MakePowerSymbol(), PCB_IO_EASYEDA_PARSER::ParseBoard(), PCB_IO_EASYEDA_PARSER::ParseFootprint(), ParseSchematic(), ParseSymbol(), PCB_IO_EASYEDA_PARSER::ParseToBoardItemContainer(), EASYEDA_PARSER_BASE::RelPos(), EASYEDA_PARSER_BASE::RelPosX(), and EASYEDA_PARSER_BASE::RelPosY().
|
private |
Definition at line 66 of file sch_easyeda_parser.h.
Referenced by SCH_EASYEDA_PARSER().