KiCad PCB EDA Suite
Loading...
Searching...
No Matches
altium_parser_utils.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) 2020-2021 Thomas Pointhuber <[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 ALTIUM_PARSER_UTILS_H
22#define ALTIUM_PARSER_UTILS_H
23
24#include <map>
25
26#include <string_utils.h>
27#include <lib_id.h>
28
29#include <iostream>
30#include <math/vector2d.h>
31#include <set>
32
33LIB_ID AltiumToKiCadLibID( const wxString& aLibName, const wxString& aLibReference );
34
35wxString AltiumPropertyToKiCadString( const wxString& aString );
36
40wxString AltiumEscapeTextVars( const wxString& aText );
41
49wxString AltiumSchSpecialStringsToKiCadVariables( const wxString& aString,
50 const std::map<wxString, wxString>& aOverrides,
51 std::set<wxString>* aUnmapped = nullptr );
52
59wxString AltiumPcbSpecialStringsToKiCadStrings( const wxString& aString,
60 const std::map<wxString, wxString>& aOverrides,
61 std::set<wxString>* aUnmapped = nullptr );
62
63wxString AltiumPinNamesToKiCad( wxString& aString );
64
74wxString AltiumPinDesignatorToKiCad( const wxString& aDesignator );
75
76VECTOR2I AltiumGetEllipticalPos( double aMajor, double aMinor, double aAngleRadians );
77#endif //ALTIUM_PARSER_UTILS_H
wxString AltiumPinDesignatorToKiCad(const wxString &aDesignator)
Convert an Altium pin designator string to the equivalent KiCad pin number.
wxString AltiumPropertyToKiCadString(const wxString &aString)
wxString AltiumSchSpecialStringsToKiCadVariables(const wxString &aString, const std::map< wxString, wxString > &aOverrides, std::set< wxString > *aUnmapped=nullptr)
Convert the special strings in Altium schematic text to KiCad variables.
wxString AltiumEscapeTextVars(const wxString &aText)
Escape the KiCad variables and expressions in literal Altium text, which Altium shows as typed.
wxString AltiumPcbSpecialStringsToKiCadStrings(const wxString &aString, const std::map< wxString, wxString > &aOverrides, std::set< wxString > *aUnmapped=nullptr)
Convert the special strings in Altium PCB text to KiCad variables.
wxString AltiumPinNamesToKiCad(wxString &aString)
VECTOR2I AltiumGetEllipticalPos(double aMajor, double aMinor, double aAngleRadians)
LIB_ID AltiumToKiCadLibID(const wxString &aLibName, const wxString &aLibReference)
A logical library item identifier and consists of various portions much like a URI.
Definition lib_id.h:45
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:708