KiCad PCB EDA Suite
Loading...
Searching...
No Matches
export_gencad_writer.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) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
5 *
6* This program is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation, either version 3 of the License, or (at your
9 * option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20class BOARD;
21class wxString;
22struct aFile;
23
25{
26public:
28 m_board( aBoard ),
29 m_file( nullptr ),
30 m_flipBottomPads( false ),
31 m_useUniquePins( false ),
32 m_useIndividualShapes( false ),
33 m_storeOriginCoords( false )
34
35 {
36 }
37
42 bool WriteFile( const wxString& aFullFileName );
43
45 void SetPlotOffet( VECTOR2I aOffset ) { GencadOffset = aOffset; }
46
48 void FlipBottomPads( bool aFlip ) { m_flipBottomPads = aFlip; }
49
51 void UsePinNamesUnique( bool aUnique ) { m_useUniquePins = aUnique; }
52
54 void UseIndividualShapes( bool aUnique ) { m_useIndividualShapes = aUnique; }
55
57 void StoreOriginCoordsInFile( bool aStore ) { m_storeOriginCoords = aStore; }
58
59private:
64 void CreateBoardSection();
71 void FootprintWriteShape( FOOTPRINT* aFootprint, const wxString& aShapeName );
72 const wxString getShapeName( FOOTPRINT* aFootprint );
73
74 double MapXTo( int aX );
75 double MapYTo( int aY );
76
77
78private:
81 FILE* m_file;
82
83 // Export options
88
89 // These are the export origin (the auxiliary axis)
91};
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:290
void UseIndividualShapes(bool aUnique)
Make pad shapes unique.
GENCAD_EXPORTER(BOARD *aBoard)
const wxString getShapeName(FOOTPRINT *aFootprint)
bool CreateHeaderInfoData()
Creates the header section.
void UsePinNamesUnique(bool aUnique)
Make pin names unique.
void StoreOriginCoordsInFile(bool aStore)
Store coord origin in genCAD file.
void FlipBottomPads(bool aFlip)
Flip pad shapes on the bottom side.
void SetPlotOffet(VECTOR2I aOffset)
Set the coordinates offet when exporting items.
bool WriteFile(const wxString &aFullFileName)
Export a genCAD file.
void FootprintWriteShape(FOOTPRINT *aFootprint, const wxString &aShapeName)