KiCad PCB EDA Suite
Loading...
Searching...
No Matches
pcad_pcb_component.cpp
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) 2007, 2008 Lubo Racko <[email protected]>
5 * Copyright (C) 2007, 2008, 2012-2013 Alexander Lunev <[email protected]>
6 * Copyright (C) 2012-2023 KiCad Developers, see AUTHORS.TXT for contributors.
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, you may find one here:
20 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
21 * or you may search the http://www.gnu.org website for the version 2 license,
22 * or you may write to the Free Software Foundation, Inc.,
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
24 */
25
27
28#include <board.h>
29#include <common.h>
30#include <footprint.h>
31
32#include <wx/string.h>
33
34
35namespace PCAD2KICAD {
36
38 m_Uuid(),
39 m_callbacks( aCallbacks ),
40 m_board( aBoard )
41{
42 m_ObjType = wxT( '?' );
43 m_PCadLayer = 0;
44 m_KiCadLayer = F_Cu; // It *has* to be somewhere...
45 m_PositionX = 0;
46 m_PositionY = 0;
49 m_Net = wxEmptyString;
50 m_NetCode = 0;
51 m_CompRef = wxEmptyString;
52 m_PatGraphRefName = wxEmptyString;
53}
54
55
57{
58}
59
60
61void PCAD_PCB_COMPONENT::SetPosOffset( int aX_offs, int aY_offs )
62{
63 m_PositionX += aX_offs;
64 m_PositionY += aY_offs;
65}
66
68{
70}
71
72} // namespace PCAD2KICAD
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:290
virtual void SetPosOffset(int aX_offs, int aY_offs)
PCAD_PCB_COMPONENT(PCAD_CALLBACKS *aCallbacks, BOARD *aBoard)
The common library.
static constexpr EDA_ANGLE ANGLE_0
Definition: eda_angle.h:401
@ F_Cu
Definition: layer_ids.h:64
void InitTTextValue(TTEXTVALUE *aTextValue)