KiCad PCB EDA Suite
Loading...
Searching...
No Matches
sch_easyeda_parser.h
Go to the documentation of this file.
1
/*
2
* This program source code file is part of KiCad, a free EDA CAD application.
3
*
4
* Copyright (C) 2023 Alex Shvartzkop <
[email protected]
>
5
* Copyright The KiCad Developers, see AUTHORS.txt for contributors.
6
*
7
* This program is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU General Public License
9
* as published by the Free Software Foundation; either version 2
10
* of the License, or (at your option) any later version.
11
*
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License
18
* along with this program. If not, see <https://www.gnu.org/licenses/>.
19
*/
20
21
#ifndef SCH_EASYEDA_PARSER_H_
22
#define SCH_EASYEDA_PARSER_H_
23
24
#include <
io/easyeda/easyeda_parser_base.h
>
25
#include <
io/easyeda/easyeda_parser_structs.h
>
26
27
#include <
sch_io/sch_io_mgr.h
>
28
29
30
class
EDA_TEXT
;
31
32
class
SCH_EASYEDA_PARSER
:
public
EASYEDA_PARSER_BASE
33
{
34
public
:
35
explicit
SCH_EASYEDA_PARSER
(
SCHEMATIC
* aSchematic,
PROGRESS_REPORTER
* aProgressReporter );
36
~SCH_EASYEDA_PARSER
();
37
38
double
ScaleSize
(
double
aValue )
override
39
{
40
return
KiROUND
(
schIUScale
.MilsToIU( aValue * 10 ) );
41
}
42
43
template
<
typename
T>
44
VECTOR2<T>
RelPosSym
(
const
VECTOR2<T>
& aVec )
45
{
46
return
VECTOR2<T>
(
RelPosX
( aVec.
x
),
RelPosY
( aVec.
y
) );
47
}
48
49
std::pair<LIB_SYMBOL*, bool>
MakePowerSymbol
(
const
wxString& aFlagTypename,
50
const
wxString& aNetname );
51
52
void
ParseSymbolShapes
(
LIB_SYMBOL
* aContainer, std::map<wxString, wxString> paramMap,
53
wxArrayString aShapes );
54
55
LIB_SYMBOL
*
ParseSymbol
(
const
VECTOR2D
& aOrigin, std::map<wxString, wxString> aParams,
56
wxArrayString aShapes );
57
58
void
ParseSchematic
(
SCHEMATIC
* aSchematic,
SCH_SHEET
* aRootSheet,
const
wxString& aFileName,
59
wxArrayString aShapes );
60
61
private
:
62
SCHEMATIC
*
m_schematic
;
63
};
64
65
66
#endif
// SCH_EASYEDA_PARSER_H_
schIUScale
constexpr EDA_IU_SCALE schIUScale
Definition
base_units.h:123
KiROUND
constexpr BOX2I KiROUND(const BOX2D &aBoxD)
Definition
box2.h:986
EASYEDA_PARSER_BASE
Definition
easyeda_parser_base.h:31
EASYEDA_PARSER_BASE::RelPosX
double RelPosX(double aValue)
Definition
easyeda_parser_base.cpp:40
EASYEDA_PARSER_BASE::RelPosY
double RelPosY(double aValue)
Definition
easyeda_parser_base.cpp:47
EDA_TEXT
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
Definition
eda_text.h:89
LIB_SYMBOL
Define a library symbol object.
Definition
lib_symbol.h:79
PROGRESS_REPORTER
A progress reporter interface for use in multi-threaded environments.
Definition
progress_reporter.h:36
SCHEMATIC
Holds all the data relating to one schematic.
Definition
schematic.h:90
SCH_EASYEDA_PARSER::ParseSymbolShapes
void ParseSymbolShapes(LIB_SYMBOL *aContainer, std::map< wxString, wxString > paramMap, wxArrayString aShapes)
Definition
sch_easyeda_parser.cpp:390
SCH_EASYEDA_PARSER::~SCH_EASYEDA_PARSER
~SCH_EASYEDA_PARSER()
Definition
sch_easyeda_parser.cpp:65
SCH_EASYEDA_PARSER::MakePowerSymbol
std::pair< LIB_SYMBOL *, bool > MakePowerSymbol(const wxString &aFlagTypename, const wxString &aNetname)
Definition
sch_easyeda_parser.cpp:980
SCH_EASYEDA_PARSER::ScaleSize
double ScaleSize(double aValue) override
Definition
sch_easyeda_parser.h:38
SCH_EASYEDA_PARSER::ParseSchematic
void ParseSchematic(SCHEMATIC *aSchematic, SCH_SHEET *aRootSheet, const wxString &aFileName, wxArrayString aShapes)
Definition
sch_easyeda_parser.cpp:1063
SCH_EASYEDA_PARSER::RelPosSym
VECTOR2< T > RelPosSym(const VECTOR2< T > &aVec)
Definition
sch_easyeda_parser.h:44
SCH_EASYEDA_PARSER::m_schematic
SCHEMATIC * m_schematic
Definition
sch_easyeda_parser.h:62
SCH_EASYEDA_PARSER::ParseSymbol
LIB_SYMBOL * ParseSymbol(const VECTOR2D &aOrigin, std::map< wxString, wxString > aParams, wxArrayString aShapes)
Definition
sch_easyeda_parser.cpp:919
SCH_EASYEDA_PARSER::SCH_EASYEDA_PARSER
SCH_EASYEDA_PARSER(SCHEMATIC *aSchematic, PROGRESS_REPORTER *aProgressReporter)
Definition
sch_easyeda_parser.cpp:58
SCH_SHEET
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
Definition
sch_sheet.h:44
VECTOR2
Define a general 2D-vector/point.
Definition
vector2d.h:67
VECTOR2::x
T x
Definition
vector2d.h:75
VECTOR2::y
T y
Definition
vector2d.h:75
easyeda_parser_base.h
easyeda_parser_structs.h
sch_io_mgr.h
VECTOR2D
VECTOR2< double > VECTOR2D
Definition
vector2d.h:682
src
eeschema
sch_io
easyeda
sch_easyeda_parser.h
Generated on Fri Jun 26 2026 00:05:35 for KiCad PCB EDA Suite by
1.13.2