KiCad PCB EDA Suite
class_board.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) 2007 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
5  * Copyright (C) 1992-2020 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, you may find one here:
19  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20  * or you may search the http://www.gnu.org website for the version 2 license,
21  * or you may write to the Free Software Foundation, Inc.,
22  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23  */
24 
25 #ifndef CLASS_BOARD_H_
26 #define CLASS_BOARD_H_
27 
28 #include <tuple>
29 #include <board_design_settings.h>
30 #include <board_item_container.h>
31 #include <class_module.h>
32 #include <class_pad.h>
33 #include <common.h> // PAGE_INFO
34 #include <eda_rect.h>
36 #include <netinfo.h>
37 #include <pcb_plot_params.h>
38 #include <title_block.h>
39 #include <zone_settings.h>
40 
41 #include <memory>
42 
43 using std::unique_ptr;
44 
45 class PCB_BASE_FRAME;
46 class PCB_EDIT_FRAME;
47 class PCBNEW_SETTINGS;
48 class PICKED_ITEMS_LIST;
49 class BOARD;
50 class ZONE_CONTAINER;
51 class TRACK;
52 class D_PAD;
53 class MARKER_PCB;
54 class MSG_PANEL_ITEM;
55 class NETLIST;
56 class REPORTER;
57 class SHAPE_POLY_SET;
58 class CONNECTIVITY_DATA;
59 class COMPONENT;
60 
61 // Forward declare endpoint from class_track.h
62 enum ENDPOINT_T : int;
63 
68 enum LAYER_T
69 {
75 };
76 
77 
82 struct LAYER
83 {
85  {
86  clear();
87  }
88 
89  void clear()
90  {
91  m_type = LT_SIGNAL;
92  m_visible = true;
93  m_number = 0;
94  m_name.clear();
95  }
96 
97  /*
98  LAYER( const wxString& aName = wxEmptyString,
99  LAYER_T aType = LT_SIGNAL, bool aVisible = true, int aNumber = -1 ) :
100  m_name( aName ),
101  m_type( aType ),
102  m_visible( aVisible ),
103  m_number( aNumber )
104  {
105  }
106  */
107 
108  wxString m_name;
110  bool m_visible;
111  int m_number;
112 
119  static const char* ShowType( LAYER_T aType );
120 
128  static LAYER_T ParseType( const char* aType );
129 };
130 
131 
132 // Helper class to handle high light nets
134 {
135  friend class BOARD;
136 
137 protected:
138  int m_netCode; // net selected for highlight (-1 when no net selected )
139  bool m_highLightOn; // highlight active
140 
141  void Clear()
142  {
143  m_netCode = -1;
144  m_highLightOn = false;
145  }
146 
148  {
149  Clear();
150  }
151 };
152 
153 
154 DECL_VEC_FOR_SWIG( MARKERS, MARKER_PCB* )
155 DECL_VEC_FOR_SWIG( ZONE_CONTAINERS, ZONE_CONTAINER* )
156 DECL_DEQ_FOR_SWIG( TRACKS, TRACK* )
157 
158 
159 
164 {
165  friend class PCB_EDIT_FRAME;
166 
167 private:
169  wxString m_fileName;
170 
172  MARKERS m_markers;
173 
175  DRAWINGS m_drawings;
176 
178  MODULES m_modules;
179 
181  TRACKS m_tracks;
182 
184  ZONE_CONTAINERS m_ZoneDescriptorList;
185 
187 
188  // if true m_highLight_NetCode is used
189  HIGH_LIGHT_INFO m_highLight; // current high light data
190  HIGH_LIGHT_INFO m_highLightPrevious; // a previously stored high light data
191 
193 
194  std::shared_ptr<CONNECTIVITY_DATA> m_connectivity;
195 
202 
203 
204  // The default copy constructor & operator= are inadequate,
205  // either write one or do not use it at all
206  BOARD( const BOARD& aOther ) = delete;
207 
208  BOARD& operator=( const BOARD& aOther ) = delete;
209 
210 public:
211  static inline bool ClassOf( const EDA_ITEM* aItem )
212  {
213  return aItem && PCB_T == aItem->Type();
214  }
215 
216  void SetFileName( const wxString& aFileName ) { m_fileName = aFileName; }
217 
218  const wxString &GetFileName() const { return m_fileName; }
219 
220  TRACKS& Tracks()
221  {
222  return m_tracks;
223  }
224  const TRACKS& Tracks() const
225  {
226  return m_tracks;
227  }
228 
229  MODULES& Modules()
230  {
231  return m_modules;
232  }
233  const MODULES& Modules() const
234  {
235  return m_modules;
236  }
237 
238  DRAWINGS& Drawings()
239  {
240  return m_drawings;
241  }
242 
243  ZONE_CONTAINERS& Zones()
244  {
245  return m_ZoneDescriptorList;
246  }
247 
248  MARKERS& Markers()
249  {
250  return m_markers;
251  }
252 
253  const std::vector<BOARD_CONNECTED_ITEM*> AllConnectedItems();
254 
257 
258  BOARD();
259  ~BOARD();
260 
261  const wxPoint GetPosition() const override;
262  void SetPosition( const wxPoint& aPos ) override;
263 
264  bool IsEmpty() const
265  {
266  return m_drawings.empty() && m_modules.empty() && m_tracks.empty() &&
267  m_ZoneDescriptorList.empty();
268  }
269 
270  void Move( const wxPoint& aMoveVector ) override;
271 
272  void SetFileFormatVersionAtLoad( int aVersion ) { m_fileFormatVersionAtLoad = aVersion; }
273  int GetFileFormatVersionAtLoad() const { return m_fileFormatVersionAtLoad; }
274 
275  void Add( BOARD_ITEM* aItem, ADD_MODE aMode = ADD_MODE::INSERT ) override;
276 
277  void Remove( BOARD_ITEM* aBoardItem ) override;
278 
284  {
285  return m_modules.empty() ? nullptr : m_modules.front();
286  }
287 
292  {
293  for( MODULE* mod : m_modules )
294  delete mod;
295 
296  m_modules.clear();
297  }
298 
299  BOARD_ITEM* GetItem( const KIID& aID );
300 
306  std::shared_ptr<CONNECTIVITY_DATA> GetConnectivity() const
307  {
308  return m_connectivity;
309  }
310 
316  void BuildConnectivity();
317 
322  void DeleteMARKERs();
323 
328  void DeleteZONEOutlines();
329 
334  void SetAuxOrigin( const wxPoint& aPoint ) { m_designSettings.m_AuxOrigin = aPoint; }
335  const wxPoint& GetAuxOrigin() const { return m_designSettings.m_AuxOrigin; }
336 
341  void SetGridOrigin( const wxPoint& aPoint ) { m_designSettings.m_GridOrigin = aPoint; }
342  const wxPoint& GetGridOrigin() const { return m_designSettings.m_GridOrigin; }
343 
349  {
350  m_highLight.Clear();
351  m_highLightPrevious.Clear();
352  }
353 
358  int GetHighLightNetCode() const { return m_highLight.m_netCode; }
359 
364  void SetHighLightNet( int aNetCode)
365  {
366  m_highLight.m_netCode = aNetCode;
367  }
368 
373  bool IsHighLightNetON() const { return m_highLight.m_highLightOn; }
374 
379  void HighLightOFF() { m_highLight.m_highLightOn = false; }
380 
386  void HighLightON() { m_highLight.m_highLightOn = true; }
387 
392  int GetCopperLayerCount() const;
393 
394  void SetCopperLayerCount( int aCount );
395 
402  LSET GetEnabledLayers() const;
403 
410  void SetEnabledLayers( LSET aLayerMask );
411 
419  bool IsLayerEnabled( PCB_LAYER_ID aLayer ) const
420  {
421  return m_designSettings.IsLayerEnabled( aLayer );
422  }
423 
431  bool IsLayerVisible( PCB_LAYER_ID aLayer ) const
432  {
433  return m_designSettings.IsLayerVisible( aLayer );
434  }
435 
442  LSET GetVisibleLayers() const;
443 
450  void SetVisibleLayers( LSET aLayerMask );
451 
452  // these 2 functions are not tidy at this time, since there are PCB_LAYER_IDs that
453  // are not stored in the bitmap.
454 
462  int GetVisibleElements() const;
463 
471  void SetVisibleElements( int aMask );
472 
478  void SetVisibleAlls();
479 
488  bool IsElementVisible( GAL_LAYER_ID aLayer ) const;
489 
497  void SetElementVisibility( GAL_LAYER_ID aLayer, bool aNewState );
498 
506  bool IsModuleLayerVisible( PCB_LAYER_ID aLayer );
507 
513  {
514  // remove const-ness with cast. TODO(snh): Make GetDesignSettings const
515  return const_cast<BOARD_DESIGN_SETTINGS&>( m_designSettings );
516  }
517 
522  void SetDesignSettings( const BOARD_DESIGN_SETTINGS& aDesignSettings )
523  {
524  m_designSettings = aDesignSettings;
525  }
526 
527  const PAGE_INFO& GetPageSettings() const { return m_paper; }
528  void SetPageSettings( const PAGE_INFO& aPageSettings ) { m_paper = aPageSettings; }
529 
530  const PCB_PLOT_PARAMS& GetPlotOptions() const { return m_plotOptions; }
531  void SetPlotOptions( const PCB_PLOT_PARAMS& aOptions ) { m_plotOptions = aOptions; }
532 
533  TITLE_BLOCK& GetTitleBlock() { return m_titles; }
534  void SetTitleBlock( const TITLE_BLOCK& aTitleBlock ) { m_titles = aTitleBlock; }
535 
536  wxString GetSelectMenuText( EDA_UNITS aUnits ) const override;
537 
538  const PCBNEW_SETTINGS& GeneralSettings() const { return *m_generalSettings; }
539 
541  {
542  m_generalSettings = aSettings;
543  }
544 
560  bool GetBoardPolygonOutlines( SHAPE_POLY_SET& aOutlines,
561  wxString* aErrorText = nullptr, wxPoint* aErrorLocation = nullptr );
562 
574  void ConvertBrdLayerToPolygonalContours( PCB_LAYER_ID aLayer, SHAPE_POLY_SET& aOutlines );
575 
586  const PCB_LAYER_ID GetLayerID( const wxString& aLayerName ) const;
587 
598  const wxString GetLayerName( PCB_LAYER_ID aLayer ) const;
599 
609  bool SetLayerName( PCB_LAYER_ID aLayer, const wxString& aLayerName );
610 
622  static wxString GetStandardLayerName( PCB_LAYER_ID aLayerId )
623  {
624  // a BOARD's standard layer name is the PCB_LAYER_ID fixed name
625  return LSET::Name( aLayerId );
626  }
627 
636  bool SetLayerDescr( PCB_LAYER_ID aIndex, const LAYER& aLayer );
637 
646  LAYER_T GetLayerType( PCB_LAYER_ID aLayer ) const;
647 
656  bool SetLayerType( PCB_LAYER_ID aLayer, LAYER_T aLayerType );
657 
663  unsigned GetNodesCount( int aNet = -1 );
664 
669  unsigned GetUnconnectedNetCount() const;
670 
675  unsigned GetPadCount();
676 
681  D_PAD* GetPad( unsigned aIndex ) const;
682 
690  const std::vector<D_PAD*> GetPads();
691 
693  {
694  m_NetInfo.buildListOfNets();
695  }
696 
703  NETINFO_ITEM* FindNet( int aNetcode ) const;
704 
711  NETINFO_ITEM* FindNet( const wxString& aNetname ) const;
712 
714  {
715  return m_NetInfo;
716  }
717 
718 #ifndef SWIG
719 
724  {
725  return m_NetInfo.begin();
726  }
727 
733  {
734  return m_NetInfo.end();
735  }
736 #endif
737 
742  unsigned GetNetCount() const
743  {
744  return m_NetInfo.GetNetCount();
745  }
746 
753  EDA_RECT ComputeBoundingBox( bool aBoardEdgesOnly = false ) const;
754 
755  const EDA_RECT GetBoundingBox() const override
756  {
757  return ComputeBoundingBox( false );
758  }
759 
768  {
769  return ComputeBoundingBox( true );
770  }
771 
772  void GetMsgPanelInfo( EDA_UNITS aUnits, std::vector<MSG_PANEL_ITEM>& aList ) override;
773 
782  void Print( PCB_BASE_FRAME* aFrame, wxDC* aDC, const wxPoint& aOffset = ZeroOffset ) override;
783 
797  SEARCH_RESULT Visit( INSPECTOR inspector, void* testData, const KICAD_T scanTypes[] ) override;
798 
806  MODULE* FindModuleByReference( const wxString& aReference ) const;
807 
814  MODULE* FindModuleByPath( const KIID_PATH& aPath ) const;
815 
823  int SortedNetnamesList( wxArrayString& aNames, bool aSortbyPadsCount );
824 
832  void SynchronizeNetsAndNetClasses();
833 
834  /***************************************************************************/
835 
836  wxString GetClass() const override
837  {
838  return wxT( "BOARD" );
839  }
840 
841 #if defined(DEBUG)
842  void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
843 #endif
844 
845 
846  /*************************/
847  /* Copper Areas handling */
848  /*************************/
849 
861  ZONE_CONTAINER* HitTestForAnyFilledArea( const wxPoint& aRefPos,
862  PCB_LAYER_ID aStartLayer,
863  PCB_LAYER_ID aEndLayer,
864  int aNetCode );
865 
876  int SetAreasNetCodesFromNetNames( void );
877 
884  ZONE_CONTAINER* GetArea( int index ) const
885  {
886  if( (unsigned) index < m_ZoneDescriptorList.size() )
887  return m_ZoneDescriptorList[index];
888 
889  return NULL;
890  }
891 
898  int GetAreaIndex( const ZONE_CONTAINER* aArea ) const
899  {
900  for( int ii = 0; ii < GetAreaCount(); ii++ ) // Search for aArea in list
901  {
902  if( aArea == GetArea( ii ) ) // Found !
903  return ii;
904  }
905 
906  return -1;
907  }
908 
913  std::list<ZONE_CONTAINER*> GetZoneList( bool aIncludeZonesInFootprints = false );
914 
919  int GetAreaCount() const
920  {
921  return (int) m_ZoneDescriptorList.size();
922  }
923 
924  /* Functions used in test, merge and cut outlines */
925 
937  ZONE_CONTAINER* AddArea( PICKED_ITEMS_LIST* aNewZonesList, int aNetcode, PCB_LAYER_ID aLayer,
938  wxPoint aStartPointPosition, ZONE_HATCH_STYLE aHatch );
939 
950  ZONE_CONTAINER* InsertArea( int aNetcode, int aAreaIdx, PCB_LAYER_ID aLayer, int aCornerX,
951  int aCornerY, ZONE_HATCH_STYLE aHatch );
952 
962  bool NormalizeAreaPolygon( PICKED_ITEMS_LIST* aNewZonesList, ZONE_CONTAINER* aCurrArea );
963 
974  bool OnAreaPolygonModified( PICKED_ITEMS_LIST* aModifiedZonesList,
975  ZONE_CONTAINER* modified_area );
976 
987  bool CombineAllAreasInNet( PICKED_ITEMS_LIST* aDeletedList,
988  int aNetCode,
989  bool aUseLocalFlags );
990 
998  void RemoveArea( PICKED_ITEMS_LIST* aDeletedList, ZONE_CONTAINER* area_to_remove );
999 
1005  bool TestAreaIntersections( ZONE_CONTAINER* area_to_test );
1006 
1015  bool TestAreaIntersection( ZONE_CONTAINER* area_ref, ZONE_CONTAINER* area_to_test );
1016 
1028  bool CombineAreas( PICKED_ITEMS_LIST* aDeletedList,
1029  ZONE_CONTAINER* area_ref,
1030  ZONE_CONTAINER* area_to_combine );
1031 
1040  D_PAD* GetPad( const wxPoint& aPosition, LSET aLayerMask );
1041  D_PAD* GetPad( const wxPoint& aPosition )
1042  {
1043  return GetPad( aPosition, LSET().set() );
1044  }
1045 
1054  D_PAD* GetPad( TRACK* aTrace, ENDPOINT_T aEndPoint );
1055 
1066  D_PAD* GetPadFast( const wxPoint& aPosition, LSET aLayerMask );
1067 
1083  D_PAD* GetPad( std::vector<D_PAD*>& aPadList, const wxPoint& aPosition, LSET aLayerMask );
1084 
1091  void PadDelete( D_PAD* aPad );
1092 
1105  void GetSortedPadListByXthenYCoord( std::vector<D_PAD*>& aVector, int aNetCode = -1 );
1106 
1114  std::tuple<int, double, double> GetTrackLength( const TRACK& aTrack ) const;
1115 
1123  TRACKS TracksInNet( int aNetCode );
1124 
1139  MODULE* GetFootprint( const wxPoint& aPosition, PCB_LAYER_ID aActiveLayer,
1140  bool aVisibleOnly, bool aIgnoreLocked = false );
1141 
1146  void ClearAllNetCodes();
1147 
1153  void MapNets( const BOARD* aDestBoard );
1154 
1155  void SanitizeNetcodes();
1156 };
1157 
1158 #endif // CLASS_BOARD_H_
MODULES m_modules
MODULES for components on the board, owned by pointer.
Definition: class_board.h:178
EDA_UNITS
Definition: common.h:184
iterator end() const
Definition: netinfo.h:538
Wrapper class, so you can iterate through NETINFO_ITEM*s, not std::pair<int/wxString,...
Definition: netinfo.h:487
void SetFileFormatVersionAtLoad(int aVersion)
Definition: class_board.h:272
D_PAD * GetPad(const wxPoint &aPosition)
Definition: class_board.h:1041
void BuildListOfNets()
Definition: class_board.h:692
const EDA_RECT GetBoundingBox() const override
Function GetBoundingBox returns the orthogonal, bounding box of this object for display purposes.
Definition: class_board.h:755
ZONE_CONTAINER handles a list of polygons defining a copper zone.
Definition: class_zone.h:60
const PAGE_INFO & GetPageSettings() const
Definition: class_board.h:527
void SetElementVisibility(GAL_LAYER_ID aElement, bool aNewState)
Function SetElementVisibility changes the visibility of an element category.
static bool ClassOf(const EDA_ITEM *aItem)
Definition: class_board.h:211
const PCB_PLOT_PARAMS & GetPlotOptions() const
Definition: class_board.h:530
Definition: typeinfo.h:85
wxPoint m_GridOrigin
origin for grid offsets
void SetGridOrigin(const wxPoint &aPoint)
Function SetGridOrigin sets the origin point of the grid.
Definition: class_board.h:341
wxString m_name
The name of the layer, there should be no spaces in this name.
Definition: class_board.h:108
wxString m_fileName
the board filename
Definition: class_board.h:169
void SetPosition(wxString aStr, const wxString &aDefaultMeasurementUnit, int *aX, int *aY, const wxString &aActualConversion)
BOARD_ITEM is a base class for any item which can be embedded within the BOARD container class,...
bool IsLayerEnabled(PCB_LAYER_ID aLayerId) const
Function IsLayerEnabled tests whether a given layer is enabled.
void SetTitleBlock(const TITLE_BLOCK &aTitleBlock)
Definition: class_board.h:534
PAGE_INFO m_paper
Definition: class_board.h:198
const EDA_RECT GetBoardEdgesBoundingBox() const
Function GetBoardEdgesBoundingBox Returns the board bounding box calculated using exclusively the boa...
Definition: class_board.h:767
bool IsHighLightNetON() const
Function IsHighLightNetON.
Definition: class_board.h:373
MARKERS & Markers()
Definition: class_board.h:248
void SetPageSettings(const PAGE_INFO &aPageSettings)
Definition: class_board.h:528
LAYER_T m_type
The type of the layer.
Definition: class_board.h:109
NETINFO_LIST::iterator EndNets() const
Function EndNets.
Definition: class_board.h:732
ZONE_CONTAINER * m_CurrentZoneContour
zone contour currently in progress
Definition: class_board.h:256
GAL_LAYER_ID
GAL layers are "virtual" layers, i.e.
void HighLightOFF()
Function HighLightOFF Disable highlight.
Definition: class_board.h:379
LAYER()
Definition: class_board.h:84
#define DECL_DEQ_FOR_SWIG(TypeName, MemberType)
Definition: macros.h:139
bool IsLayerVisible(PCB_LAYER_ID aLayerId) const
Function IsLayerVisible tests whether a given layer is visible.
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Function GetDesignSettings.
Definition: class_board.h:512
HIGH_LIGHT_INFO m_highLight
Definition: class_board.h:189
NETINFO_LIST m_NetInfo
net info list (name, design constraints ..
Definition: class_board.h:201
REPORTER is a pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:62
HIGH_LIGHT_INFO m_highLightPrevious
Definition: class_board.h:190
bool IsLayerEnabled(PCB_LAYER_ID aLayer) const
Function IsLayerEnabled is a proxy function that calls the correspondent function in m_BoardSettings ...
Definition: class_board.h:419
TRACKS m_tracks
TRACKS for traces on the board, owned by pointer.
Definition: class_board.h:181
const wxString & GetFileName() const
Definition: class_board.h:218
TITLE_BLOCK holds the information shown in the lower right corner of a plot, printout,...
Definition: title_block.h:40
PCB_PLOT_PARAMS m_plotOptions
Definition: class_board.h:200
void SetVisibleAlls()
Function SetVisibleAlls Set the status of all visible element categories and layers to VISIBLE.
void SetAuxOrigin(const wxPoint &aPoint)
Function SetAuxOrigin sets the origin point used for plotting.
Definition: class_board.h:334
KICAD_T
Enum KICAD_T is the set of class identification values, stored in EDA_ITEM::m_StructType.
Definition: typeinfo.h:78
NETINFO_LIST::iterator BeginNets() const
Function BeginNets.
Definition: class_board.h:723
static const char * ShowType(LAYER_T aType)
Function ShowType converts a LAYER_T enum to a const char*.
const INSPECTOR_FUNC & INSPECTOR
Definition: base_struct.h:108
Definition: common.h:65
PCB_LAYER_ID
A quick note on layer IDs:
void SetGeneralSettings(PCBNEW_SETTINGS *aSettings)
Definition: class_board.h:540
int GetAreaCount() const
Function GetAreaCount.
Definition: class_board.h:919
LSET is a set of PCB_LAYER_IDs.
void ResetNetHighLight()
Function ResetNetHighLight Reset all high light data to the init state.
Definition: class_board.h:348
NETLIST stores all of information read from a netlist along with the flags used to update the NETLIST...
Definition: pcb_netlist.h:212
#define NULL
unsigned GetNetCount() const
Function GetNetCount.
Definition: class_board.h:742
MODULES & Modules()
Definition: class_board.h:229
static const wxChar * Name(PCB_LAYER_ID aLayerId)
Function Name returns the fixed name association with aLayerId.
Definition: lset.cpp:78
NETINFO_LIST is a container class for NETINFO_ITEM elements, which are the nets.
Definition: netinfo.h:408
SHAPE_POLY_SET.
PAGE_INFO describes the page size and margins of a paper page on which to eventually print or plot.
Definition: page_info.h:54
iterator begin() const
Definition: netinfo.h:533
LAYER_T
Enum LAYER_T gives the allowed types of layers, same as Specctra DSN spec.
Definition: class_board.h:68
std::shared_ptr< CONNECTIVITY_DATA > GetConnectivity() const
Function GetConnectivity() returns list of missing connections between components/tracks.
Definition: class_board.h:306
TITLE_BLOCK m_titles
text in lower right of screen and plots
Definition: class_board.h:199
MODULE * GetFirstModule() const
Gets the first module in the list (used in footprint viewer/editor) or NULL if none.
Definition: class_board.h:283
bool m_visible
Definition: class_board.h:110
#define DECL_VEC_FOR_SWIG(TypeName, MemberType)
Declare a std::vector but no swig template.
Definition: macros.h:138
void SetDesignSettings(const BOARD_DESIGN_SETTINGS &aDesignSettings)
Function SetDesignSettings.
Definition: class_board.h:522
ENDPOINT_T
Definition: class_track.h:54
MARKERS m_markers
MARKER_PCBs for clearance problems, owned by pointer.
Definition: class_board.h:172
const PCBNEW_SETTINGS & GeneralSettings() const
Definition: class_board.h:538
void SetFileName(const wxString &aFileName)
Definition: class_board.h:216
const wxPoint & GetAuxOrigin() const
Definition: class_board.h:335
void SetPlotOptions(const PCB_PLOT_PARAMS &aOptions)
Definition: class_board.h:531
PICKED_ITEMS_LIST is a holder to handle information on schematic or board items.
static LAYER_T ParseType(const char *aType)
Function ParseType converts a string to a LAYER_T.
const MODULES & Modules() const
Definition: class_board.h:233
PCB_PLOT_PARAMS handles plot parameters and options when plotting/printing a board.
NETINFO_LIST & GetNetInfo()
Definition: class_board.h:713
DRAWINGS m_drawings
BOARD_ITEMs for drawings on the board, owned by pointer.
Definition: class_board.h:175
const wxPoint & GetGridOrigin() const
Definition: class_board.h:342
Pad object description.
int GetFileFormatVersionAtLoad() const
Definition: class_board.h:273
void HighLightON()
Function HighLightON Enable highlight.
Definition: class_board.h:386
COMPONENT is used to store components and all of their related information found in a netlist.
Definition: pcb_netlist.h:80
int GetHighLightNetCode() const
Function GetHighLightNetCode.
Definition: class_board.h:358
void SetHighLightNet(int aNetCode)
Function SetHighLightNet.
Definition: class_board.h:364
void clear()
Definition: class_board.h:89
NETINFO_ITEM handles the data for a net.
Definition: netinfo.h:65
bool IsLayerVisible(PCB_LAYER_ID aLayer) const
Function IsLayerVisible is a proxy function that calls the correspondent function in m_BoardSettings ...
Definition: class_board.h:431
ZONE_CONTAINERS & Zones()
Definition: class_board.h:243
TITLE_BLOCK & GetTitleBlock()
Definition: class_board.h:533
Board layer functions and definitions.
ZONE_HATCH_STYLE
Zone hatch styles.
Definition: zone_settings.h:45
int m_fileFormatVersionAtLoad
the version loaded from the file
Definition: class_board.h:192
LAYER holds information pertinent to a layer of a BOARD.
Definition: class_board.h:82
BOARD holds information pertinent to a Pcbnew printed circuit board.
Definition: class_board.h:163
ZONE_CONTAINERS m_ZoneDescriptorList
edge zone descriptors, owned by pointer.
Definition: class_board.h:184
std::shared_ptr< CONNECTIVITY_DATA > m_connectivity
Definition: class_board.h:194
EDA_RECT handles the component boundary box.
Definition: eda_rect.h:44
PCB_EDIT_FRAME is the main frame for Pcbnew.
EDA_ITEM is a base class for most all the KiCad significant classes, used in schematics and boards.
Definition: base_struct.h:166
The common library.
wxString GetClass() const override
Function GetClass returns the class name.
Definition: class_board.h:836
const TRACKS & Tracks() const
Definition: class_board.h:224
unsigned GetNetCount() const
Function GetNetCount.
Definition: netinfo.h:435
void DeleteAllModules()
Removes all modules from the deque and frees the memory associated with them.
Definition: class_board.h:291
BOARD_DESIGN_SETTINGS m_designSettings
Definition: class_board.h:196
Module description (excepted pads)
ZONE_CONTAINER * GetArea(int index) const
Function GetArea returns the Area (Zone Container) at a given index.
Definition: class_board.h:884
Abstract interface for BOARD_ITEMs capable of storing other items inside.
int m_number
Definition: class_board.h:111
EDA_MSG_ITEM is used EDA_MSG_PANEL as the item type for displaying messages.
Definition: msgpanel.h:53
int GetAreaIndex(const ZONE_CONTAINER *aArea) const
Function GetAreaIndex returns the Area Index for the given Zone Container.
Definition: class_board.h:898
bool IsElementVisible(GAL_LAYER_ID aElement) const
Function IsElementVisible tests whether a given element category is visible.
SEARCH_RESULT
Definition: base_struct.h:54
DRAWINGS & Drawings()
Definition: class_board.h:238
bool IsEmpty() const
Definition: class_board.h:264
wxPoint m_AuxOrigin
origin for plot exports
PCB_BASE_FRAME basic PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
TRACKS & Tracks()
Definition: class_board.h:220
PCBNEW_SETTINGS * m_generalSettings
reference only; I have no ownership
Definition: class_board.h:197
void buildListOfNets()
Function buildListOfNets builds or rebuilds the list of NETINFO_ITEMs The list is sorted by names.
KICAD_T Type() const
Function Type()
Definition: base_struct.h:212
static wxString GetStandardLayerName(PCB_LAYER_ID aLayerId)
Function GetStandardLayerName returns an "English Standard" name of a PCB layer when given aLayerNumb...
Definition: class_board.h:622
BOARD_DESIGN_SETTINGS contains design settings for a BOARD object.