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-2017 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 <pcb_general_settings.h>
34 #include <common.h> // PAGE_INFO
35 #include <eda_rect.h>
37 #include <netinfo.h>
38 #include <pcb_plot_params.h>
39 #include <title_block.h>
40 #include <zone_settings.h>
41 
42 #include <memory>
43 
44 using std::unique_ptr;
45 
46 class PCB_BASE_FRAME;
47 class PCB_EDIT_FRAME;
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 
65 enum LAYER_T
66 {
72 };
73 
74 
79 struct LAYER
80 {
82  {
83  clear();
84  }
85 
86  void clear()
87  {
88  m_type = LT_SIGNAL;
89  m_visible = true;
90  m_number = 0;
91  m_name.clear();
92  }
93 
94  /*
95  LAYER( const wxString& aName = wxEmptyString,
96  LAYER_T aType = LT_SIGNAL, bool aVisible = true, int aNumber = -1 ) :
97  m_name( aName ),
98  m_type( aType ),
99  m_visible( aVisible ),
100  m_number( aNumber )
101  {
102  }
103  */
104 
105  wxString m_name;
107  bool m_visible;
108  int m_number;
109 
116  static const char* ShowType( LAYER_T aType );
117 
125  static LAYER_T ParseType( const char* aType );
126 };
127 
128 
129 // Helper class to handle high light nets
131 {
132  friend class BOARD;
133 
134 protected:
135  int m_netCode; // net selected for highlight (-1 when no net selected )
136  bool m_highLightOn; // highlight active
137 
138  void Clear()
139  {
140  m_netCode = -1;
141  m_highLightOn = false;
142  }
143 
145  {
146  Clear();
147  }
148 };
149 
150 
151 DECL_VEC_FOR_SWIG( MARKERS, MARKER_PCB* )
152 DECL_VEC_FOR_SWIG( ZONE_CONTAINERS, ZONE_CONTAINER* )
153 DECL_DEQ_FOR_SWIG( TRACKS, TRACK* )
154 
155 
156 
161 {
162  friend class PCB_EDIT_FRAME;
163 
164 private:
166  wxString m_fileName;
167 
169  MARKERS m_markers;
170 
172  DRAWINGS m_drawings;
173 
175  MODULES m_modules;
176 
178  TRACKS m_tracks;
179 
181  ZONE_CONTAINERS m_ZoneDescriptorList;
182 
184 
185  // if true m_highLight_NetCode is used
186  HIGH_LIGHT_INFO m_highLight; // current high light data
187  HIGH_LIGHT_INFO m_highLightPrevious; // a previously stored high light data
188 
190 
191  std::shared_ptr<CONNECTIVITY_DATA> m_connectivity;
192 
199 
200 
201  // The default copy constructor & operator= are inadequate,
202  // either write one or do not use it at all
203  BOARD( const BOARD& aOther ) = delete;
204 
205  BOARD& operator=( const BOARD& aOther ) = delete;
206 
207 public:
208  static inline bool ClassOf( const EDA_ITEM* aItem )
209  {
210  return aItem && PCB_T == aItem->Type();
211  }
212 
213  void SetFileName( const wxString& aFileName ) { m_fileName = aFileName; }
214 
215  const wxString &GetFileName() const { return m_fileName; }
216 
217  TRACKS& Tracks()
218  {
219  return m_tracks;
220  }
221  const TRACKS& Tracks() const
222  {
223  return m_tracks;
224  }
225 
226  MODULES& Modules()
227  {
228  return m_modules;
229  }
230  const MODULES& Modules() const
231  {
232  return m_modules;
233  }
234 
235  DRAWINGS& Drawings()
236  {
237  return m_drawings;
238  }
239 
240  ZONE_CONTAINERS& Zones()
241  {
242  return m_ZoneDescriptorList;
243  }
244 
245  const std::vector<BOARD_CONNECTED_ITEM*> AllConnectedItems();
246 
249 
250  BOARD();
251  ~BOARD();
252 
253  const wxPoint GetPosition() const override;
254  void SetPosition( const wxPoint& aPos ) override;
255 
256  bool IsEmpty() const
257  {
258  return m_drawings.empty() && m_modules.empty() && m_tracks.empty() &&
259  m_ZoneDescriptorList.empty();
260  }
261 
262  void Move( const wxPoint& aMoveVector ) override;
263 
264  void SetFileFormatVersionAtLoad( int aVersion ) { m_fileFormatVersionAtLoad = aVersion; }
265  int GetFileFormatVersionAtLoad() const { return m_fileFormatVersionAtLoad; }
266 
267  void Add( BOARD_ITEM* aItem, ADD_MODE aMode = ADD_MODE::INSERT ) override;
268 
269  void Remove( BOARD_ITEM* aBoardItem ) override;
270 
276  {
277  return m_modules.empty() ? nullptr : m_modules.front();
278  }
279 
284  {
285  for( MODULE* mod : m_modules )
286  delete mod;
287 
288  m_modules.clear();
289  }
290 
291  BOARD_ITEM* GetItem( void* aWeakReference );
292 
293  BOARD_ITEM* Duplicate( const BOARD_ITEM* aItem, bool aAddToBoard = false );
294 
300  std::shared_ptr<CONNECTIVITY_DATA> GetConnectivity() const
301  {
302  return m_connectivity;
303  }
304 
310  void BuildConnectivity();
311 
312 
317  void DeleteMARKERs();
318 
323  void DeleteZONEOutlines();
324 
331  MARKER_PCB* GetMARKER( int index ) const
332  {
333  if( (unsigned) index < m_markers.size() )
334  return m_markers[index];
335 
336  return NULL;
337  }
338 
343  int GetMARKERCount() const
344  {
345  return (int) m_markers.size();
346  }
347 
352  void SetAuxOrigin( const wxPoint& aPoint ) { m_designSettings.m_AuxOrigin = aPoint; }
353  const wxPoint& GetAuxOrigin() const { return m_designSettings.m_AuxOrigin; }
354 
359  void SetGridOrigin( const wxPoint& aPoint ) { m_designSettings.m_GridOrigin = aPoint; }
360  const wxPoint& GetGridOrigin() const { return m_designSettings.m_GridOrigin; }
361 
367  {
368  m_highLight.Clear();
369  m_highLightPrevious.Clear();
370  }
371 
376  int GetHighLightNetCode() const { return m_highLight.m_netCode; }
377 
382  void SetHighLightNet( int aNetCode)
383  {
384  m_highLight.m_netCode = aNetCode;
385  }
386 
391  bool IsHighLightNetON() const { return m_highLight.m_highLightOn; }
392 
397  void HighLightOFF() { m_highLight.m_highLightOn = false; }
398 
404  void HighLightON() { m_highLight.m_highLightOn = true; }
405 
410  int GetCopperLayerCount() const;
411 
412  void SetCopperLayerCount( int aCount );
413 
420  LSET GetEnabledLayers() const;
421 
428  void SetEnabledLayers( LSET aLayerMask );
429 
437  bool IsLayerEnabled( PCB_LAYER_ID aLayer ) const
438  {
439  return m_designSettings.IsLayerEnabled( aLayer );
440  }
441 
449  bool IsLayerVisible( PCB_LAYER_ID aLayer ) const
450  {
451  return m_designSettings.IsLayerVisible( aLayer );
452  }
453 
460  LSET GetVisibleLayers() const;
461 
468  void SetVisibleLayers( LSET aLayerMask );
469 
470  // these 2 functions are not tidy at this time, since there are PCB_LAYER_IDs that
471  // are not stored in the bitmap.
472 
480  int GetVisibleElements() const;
481 
489  void SetVisibleElements( int aMask );
490 
496  void SetVisibleAlls();
497 
506  bool IsElementVisible( GAL_LAYER_ID aLayer ) const;
507 
515  void SetElementVisibility( GAL_LAYER_ID aLayer, bool aNewState );
516 
524  bool IsModuleLayerVisible( PCB_LAYER_ID aLayer );
525 
531  {
532  // remove const-ness with cast. TODO(snh): Make GetDesignSettings const
533  return const_cast<BOARD_DESIGN_SETTINGS&>( m_designSettings );
534  }
535 
540  void SetDesignSettings( const BOARD_DESIGN_SETTINGS& aDesignSettings )
541  {
542  m_designSettings = aDesignSettings;
543  }
544 
545  const PAGE_INFO& GetPageSettings() const { return m_paper; }
546  void SetPageSettings( const PAGE_INFO& aPageSettings ) { m_paper = aPageSettings; }
547 
548  const PCB_PLOT_PARAMS& GetPlotOptions() const { return m_plotOptions; }
549  void SetPlotOptions( const PCB_PLOT_PARAMS& aOptions ) { m_plotOptions = aOptions; }
550 
551  TITLE_BLOCK& GetTitleBlock() { return m_titles; }
552  void SetTitleBlock( const TITLE_BLOCK& aTitleBlock ) { m_titles = aTitleBlock; }
553 
554  wxString GetSelectMenuText( EDA_UNITS aUnits ) const override;
555 
560  const COLORS_DESIGN_SETTINGS& Colors() const { return m_generalSettings->Colors(); }
561 
562  const PCB_GENERAL_SETTINGS& GeneralSettings() const { return *m_generalSettings; }
563 
564  void SetGeneralSettings( PCB_GENERAL_SETTINGS* aGeneralSettings )
565  {
566  m_generalSettings = aGeneralSettings;
567  }
568 
584  bool GetBoardPolygonOutlines( SHAPE_POLY_SET& aOutlines,
585  wxString* aErrorText = nullptr, wxPoint* aErrorLocation = nullptr );
586 
598  void ConvertBrdLayerToPolygonalContours( PCB_LAYER_ID aLayer, SHAPE_POLY_SET& aOutlines );
599 
610  const PCB_LAYER_ID GetLayerID( const wxString& aLayerName ) const;
611 
622  const wxString GetLayerName( PCB_LAYER_ID aLayer ) const;
623 
633  bool SetLayerName( PCB_LAYER_ID aLayer, const wxString& aLayerName );
634 
646  static wxString GetStandardLayerName( PCB_LAYER_ID aLayerId )
647  {
648  // a BOARD's standard layer name is the PCB_LAYER_ID fixed name
649  return LSET::Name( aLayerId );
650  }
651 
660  bool SetLayerDescr( PCB_LAYER_ID aIndex, const LAYER& aLayer );
661 
670  LAYER_T GetLayerType( PCB_LAYER_ID aLayer ) const;
671 
680  bool SetLayerType( PCB_LAYER_ID aLayer, LAYER_T aLayerType );
681 
687  unsigned GetNodesCount( int aNet = -1 );
688 
693  unsigned GetUnconnectedNetCount() const;
694 
699  unsigned GetPadCount();
700 
705  D_PAD* GetPad( unsigned aIndex ) const;
706 
714  const std::vector<D_PAD*> GetPads();
715 
717  {
718  m_NetInfo.buildListOfNets();
719  }
720 
727  NETINFO_ITEM* FindNet( int aNetcode ) const;
728 
735  NETINFO_ITEM* FindNet( const wxString& aNetname ) const;
736 
738  {
739  return m_NetInfo;
740  }
741 
742 #ifndef SWIG
743 
748  {
749  return m_NetInfo.begin();
750  }
751 
757  {
758  return m_NetInfo.end();
759  }
760 #endif
761 
766  unsigned GetNetCount() const
767  {
768  return m_NetInfo.GetNetCount();
769  }
770 
777  EDA_RECT ComputeBoundingBox( bool aBoardEdgesOnly = false ) const;
778 
779  const EDA_RECT GetBoundingBox() const override
780  {
781  return ComputeBoundingBox( false );
782  }
783 
792  {
793  return ComputeBoundingBox( true );
794  }
795 
796  void GetMsgPanelInfo( EDA_UNITS aUnits, std::vector<MSG_PANEL_ITEM>& aList ) override;
797 
806  void Print( PCB_BASE_FRAME* aFrame, wxDC* aDC, const wxPoint& aOffset = ZeroOffset ) override;
807 
821  SEARCH_RESULT Visit( INSPECTOR inspector, void* testData, const KICAD_T scanTypes[] ) override;
822 
832  MODULE* FindModuleByReference( const wxString& aReference ) const;
833 
843  MODULE* FindModule( const wxString& aRefOrTimeStamp, bool aSearchByTimeStamp = false ) const;
844 
852  int SortedNetnamesList( wxArrayString& aNames, bool aSortbyPadsCount );
853 
861  void SynchronizeNetsAndNetClasses();
862 
863  /***************************************************************************/
864 
865  wxString GetClass() const override
866  {
867  return wxT( "BOARD" );
868  }
869 
870 #if defined(DEBUG)
871  void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
872 #endif
873 
874 
875  /*************************/
876  /* Copper Areas handling */
877  /*************************/
878 
890  ZONE_CONTAINER* HitTestForAnyFilledArea( const wxPoint& aRefPos,
891  PCB_LAYER_ID aStartLayer,
892  PCB_LAYER_ID aEndLayer,
893  int aNetCode );
894 
905  int SetAreasNetCodesFromNetNames( void );
906 
913  ZONE_CONTAINER* GetArea( int index ) const
914  {
915  if( (unsigned) index < m_ZoneDescriptorList.size() )
916  return m_ZoneDescriptorList[index];
917 
918  return NULL;
919  }
920 
927  int GetAreaIndex( const ZONE_CONTAINER* aArea ) const
928  {
929  for( int ii = 0; ii < GetAreaCount(); ii++ ) // Search for aArea in list
930  {
931  if( aArea == GetArea( ii ) ) // Found !
932  return ii;
933  }
934 
935  return -1;
936  }
937 
942  std::list<ZONE_CONTAINER*> GetZoneList( bool aIncludeZonesInFootprints = false );
943 
948  int GetAreaCount() const
949  {
950  return (int) m_ZoneDescriptorList.size();
951  }
952 
953  /* Functions used in test, merge and cut outlines */
954 
966  ZONE_CONTAINER* AddArea( PICKED_ITEMS_LIST* aNewZonesList, int aNetcode, PCB_LAYER_ID aLayer,
967  wxPoint aStartPointPosition, ZONE_HATCH_STYLE aHatch );
968 
979  ZONE_CONTAINER* InsertArea( int aNetcode, int aAreaIdx, PCB_LAYER_ID aLayer, int aCornerX,
980  int aCornerY, ZONE_HATCH_STYLE aHatch );
981 
991  bool NormalizeAreaPolygon( PICKED_ITEMS_LIST* aNewZonesList, ZONE_CONTAINER* aCurrArea );
992 
1003  bool OnAreaPolygonModified( PICKED_ITEMS_LIST* aModifiedZonesList,
1004  ZONE_CONTAINER* modified_area );
1005 
1016  bool CombineAllAreasInNet( PICKED_ITEMS_LIST* aDeletedList,
1017  int aNetCode,
1018  bool aUseLocalFlags );
1019 
1027  void RemoveArea( PICKED_ITEMS_LIST* aDeletedList, ZONE_CONTAINER* area_to_remove );
1028 
1034  bool TestAreaIntersections( ZONE_CONTAINER* area_to_test );
1035 
1044  bool TestAreaIntersection( ZONE_CONTAINER* area_ref, ZONE_CONTAINER* area_to_test );
1045 
1057  bool CombineAreas( PICKED_ITEMS_LIST* aDeletedList,
1058  ZONE_CONTAINER* area_ref,
1059  ZONE_CONTAINER* area_to_combine );
1060 
1069  D_PAD* GetPad( const wxPoint& aPosition, LSET aLayerMask );
1070  D_PAD* GetPad( const wxPoint& aPosition )
1071  {
1072  return GetPad( aPosition, LSET().set() );
1073  }
1074 
1083  D_PAD* GetPad( TRACK* aTrace, ENDPOINT_T aEndPoint );
1084 
1095  D_PAD* GetPadFast( const wxPoint& aPosition, LSET aLayerMask );
1096 
1112  D_PAD* GetPad( std::vector<D_PAD*>& aPadList, const wxPoint& aPosition, LSET aLayerMask );
1113 
1120  void PadDelete( D_PAD* aPad );
1121 
1134  void GetSortedPadListByXthenYCoord( std::vector<D_PAD*>& aVector, int aNetCode = -1 );
1135 
1143  std::tuple<int, double, double> GetTrackLength( const TRACK& aTrack ) const;
1144 
1152  TRACKS TracksInNet( int aNetCode );
1153 
1168  MODULE* GetFootprint( const wxPoint& aPosition, PCB_LAYER_ID aActiveLayer,
1169  bool aVisibleOnly, bool aIgnoreLocked = false );
1170 
1175  void ClearAllNetCodes();
1176 
1182  void MapNets( const BOARD* aDestBoard );
1183 
1184  void SanitizeNetcodes();
1185 };
1186 
1187 #endif // CLASS_BOARD_H_
MODULES m_modules
MODULES for components on the board, owned by pointer.
Definition: class_board.h:175
EDA_UNITS
Definition: common.h:72
iterator end() const
Definition: netinfo.h:531
Wrapper class, so you can iterate through NETINFO_ITEM*s, not std::pair<int/wxString,...
Definition: netinfo.h:480
void SetFileFormatVersionAtLoad(int aVersion)
Definition: class_board.h:264
D_PAD * GetPad(const wxPoint &aPosition)
Definition: class_board.h:1070
void BuildListOfNets()
Definition: class_board.h:716
const EDA_RECT GetBoundingBox() const override
Function GetBoundingBox returns the orthogonal, bounding box of this object for display purposes.
Definition: class_board.h:779
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:545
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:208
const PCB_PLOT_PARAMS & GetPlotOptions() const
Definition: class_board.h:548
Definition: typeinfo.h:85
int GetMARKERCount() const
Function GetMARKERCount.
Definition: class_board.h:343
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:359
wxString m_name
The name of the layer, there should be no spaces in this name.
Definition: class_board.h:105
wxString m_fileName
the board filename
Definition: class_board.h:166
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:552
PAGE_INFO m_paper
Definition: class_board.h:195
const EDA_RECT GetBoardEdgesBoundingBox() const
Function GetBoardEdgesBoundingBox Returns the board bounding box calculated using exclusively the boa...
Definition: class_board.h:791
bool IsHighLightNetON() const
Function IsHighLightNetON.
Definition: class_board.h:391
void SetPageSettings(const PAGE_INFO &aPageSettings)
Definition: class_board.h:546
LAYER_T m_type
The type of the layer.
Definition: class_board.h:106
NETINFO_LIST::iterator EndNets() const
Function EndNets.
Definition: class_board.h:756
ZONE_CONTAINER * m_CurrentZoneContour
zone contour currently in progress
Definition: class_board.h:248
GAL_LAYER_ID
GAL layers are "virtual" layers, i.e.
void HighLightOFF()
Function HighLightOFF Disable highlight.
Definition: class_board.h:397
LAYER()
Definition: class_board.h:81
#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:530
HIGH_LIGHT_INFO m_highLight
Definition: class_board.h:186
NETINFO_LIST m_NetInfo
net info list (name, design constraints ..
Definition: class_board.h:198
REPORTER is a pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:61
HIGH_LIGHT_INFO m_highLightPrevious
Definition: class_board.h:187
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:437
TRACKS m_tracks
TRACKS for traces on the board, owned by pointer.
Definition: class_board.h:178
const wxString & GetFileName() const
Definition: class_board.h:215
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:197
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:352
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:747
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
PCB_LAYER_ID
A quick note on layer IDs:
int GetAreaCount() const
Function GetAreaCount.
Definition: class_board.h:948
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:366
NETLIST stores all of information read from a netlist along with the flags used to update the NETLIST...
Definition: pcb_netlist.h:217
#define NULL
unsigned GetNetCount() const
Function GetNetCount.
Definition: class_board.h:766
MODULES & Modules()
Definition: class_board.h:226
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:409
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:526
LAYER_T
Enum LAYER_T gives the allowed types of layers, same as Specctra DSN spec.
Definition: class_board.h:65
std::shared_ptr< CONNECTIVITY_DATA > GetConnectivity() const
Function GetConnectivity() returns list of missing connections between components/tracks.
Definition: class_board.h:300
TITLE_BLOCK m_titles
text in lower right of screen and plots
Definition: class_board.h:196
MODULE * GetFirstModule() const
Gets the first module in the list (used in footprint viewer/editor) or NULL if none.
Definition: class_board.h:275
bool m_visible
Definition: class_board.h:107
ENDPOINT_T
Definition: class_track.h:53
#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:540
void SetGeneralSettings(PCB_GENERAL_SETTINGS *aGeneralSettings)
Definition: class_board.h:564
MARKERS m_markers
MARKER_PCBs for clearance problems, owned by pointer.
Definition: class_board.h:169
void SetFileName(const wxString &aFileName)
Definition: class_board.h:213
const wxPoint & GetAuxOrigin() const
Definition: class_board.h:353
void SetPlotOptions(const PCB_PLOT_PARAMS &aOptions)
Definition: class_board.h:549
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:230
PCB_PLOT_PARAMS handles plot parameters and options when plotting/printing a board.
NETINFO_LIST & GetNetInfo()
Definition: class_board.h:737
DRAWINGS m_drawings
BOARD_ITEMs for drawings on the board, owned by pointer.
Definition: class_board.h:172
const wxPoint & GetGridOrigin() const
Definition: class_board.h:360
Pad object description.
COLORS_DESIGN_SETTINGS & Colors()
int GetFileFormatVersionAtLoad() const
Definition: class_board.h:265
void HighLightON()
Function HighLightON Enable highlight.
Definition: class_board.h:404
COMPONENT is used to store components and all of their related information found in a netlist.
Definition: pcb_netlist.h:85
MARKER_PCB * GetMARKER(int index) const
Function GetMARKER returns the MARKER at a given index.
Definition: class_board.h:331
int GetHighLightNetCode() const
Function GetHighLightNetCode.
Definition: class_board.h:376
void SetHighLightNet(int aNetCode)
Function SetHighLightNet.
Definition: class_board.h:382
void clear()
Definition: class_board.h:86
const COLORS_DESIGN_SETTINGS & Colors() const
Function GetColorSettings.
Definition: class_board.h:560
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:449
ZONE_CONTAINERS & Zones()
Definition: class_board.h:240
TITLE_BLOCK & GetTitleBlock()
Definition: class_board.h:551
Board layer functions and definitions.
ZONE_HATCH_STYLE
Zone hatch styles.
Definition: zone_settings.h:45
const PCB_GENERAL_SETTINGS & GeneralSettings() const
Definition: class_board.h:562
int m_fileFormatVersionAtLoad
the version loaded from the file
Definition: class_board.h:189
PCB_GENERAL_SETTINGS * m_generalSettings
reference only; I have no ownership
Definition: class_board.h:194
LAYER holds information pertinent to a layer of a BOARD.
Definition: class_board.h:79
BOARD holds information pertinent to a Pcbnew printed circuit board.
Definition: class_board.h:160
ZONE_CONTAINERS m_ZoneDescriptorList
edge zone descriptors, owned by pointer.
Definition: class_board.h:181
std::shared_ptr< CONNECTIVITY_DATA > m_connectivity
Definition: class_board.h:191
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:163
The common library.
wxString GetClass() const override
Function GetClass returns the class name.
Definition: class_board.h:865
const TRACKS & Tracks() const
Definition: class_board.h:221
COLORS_DESIGN_SETTINGS is a list of color settings for designs in Pcbnew.
unsigned GetNetCount() const
Function GetNetCount.
Definition: netinfo.h:436
void DeleteAllModules()
Removes all modules from the deque and frees the memory associated with them.
Definition: class_board.h:283
BOARD_DESIGN_SETTINGS m_designSettings
Definition: class_board.h:193
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:913
Abstract interface for BOARD_ITEMs capable of storing other items inside.
int m_number
Definition: class_board.h:108
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:927
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:235
bool IsEmpty() const
Definition: class_board.h:256
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:217
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:207
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:646
BOARD_DESIGN_SETTINGS contains design settings for a BOARD object.