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-2016 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 
30 #ifndef CLASS_BOARD_H_
31 #define CLASS_BOARD_H_
32 
33 
34 #include <dlist.h>
35 
36 #include <common.h> // PAGE_INFO
38 #include <class_netinfo.h>
39 #include <class_pad.h>
42 #include <class_title_block.h>
43 #include <class_zone_settings.h>
44 #include <pcb_plot_params.h>
45 #include <board_item_container.h>
46 
47 
48 class PCB_BASE_FRAME;
49 class PCB_EDIT_FRAME;
50 class PICKED_ITEMS_LIST;
51 class BOARD;
52 class ZONE_CONTAINER;
53 class SEGZONE;
54 class TRACK;
55 class D_PAD;
56 class MARKER_PCB;
57 class MSG_PANEL_ITEM;
58 class NETLIST;
59 class REPORTER;
60 class RN_DATA;
61 class SHAPE_POLY_SET;
62 
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;
109 
111 
112  bool m_visible;
113 
114  int m_number;
115 
122  static const char* ShowType( LAYER_T aType );
123 
131  static LAYER_T ParseType( const char* aType );
132 };
133 
134 
135 // Helper class to handle high light nets
137 {
138  friend class BOARD;
139 
140 protected:
141  int m_netCode; // net selected for highlight (-1 when no net selected )
142  bool m_highLightOn; // highlight active
143 
144  void Clear()
145  {
146  m_netCode = -1;
147  m_highLightOn = false;
148  }
149 
151  {
152  Clear();
153  }
154 };
155 
156 
157 DECL_VEC_FOR_SWIG(MARKERS, MARKER_PCB*)
158 DECL_VEC_FOR_SWIG(ZONE_CONTAINERS, ZONE_CONTAINER*)
159 DECL_VEC_FOR_SWIG(TRACKS, TRACK*)
160 
161 
167 {
168  friend class PCB_EDIT_FRAME;
169 
170 private:
172  wxString m_fileName;
173 
175  MARKERS m_markers;
176 
178  ZONE_CONTAINERS m_ZoneDescriptorList;
179 
181 
182  // if true m_highLight_NetCode is used
183  HIGH_LIGHT_INFO m_highLight; // current high light data
184  HIGH_LIGHT_INFO m_highLightPrevious; // a previously stored high light data
185 
187 
190 
197 
200 
203 
213  void chainMarkedSegments( wxPoint aPosition, const LSET& aLayerSet, TRACKS* aList );
214 
215  // The default copy constructor & operator= are inadequate,
216  // either write one or do not use it at all
217  BOARD( const BOARD& aOther ) :
218  BOARD_ITEM_CONTAINER( aOther ), m_NetInfo( this )
219  {
220  assert( false );
221  }
222 
223  BOARD& operator=( const BOARD& aOther )
224  {
225  assert( false );
226  return *this; // just to mute warning
227  }
228 
229 public:
230  static inline bool ClassOf( const EDA_ITEM* aItem )
231  {
232  return aItem && PCB_T == aItem->Type();
233  }
234 
235  void SetFileName( const wxString& aFileName ) { m_fileName = aFileName; }
236 
237  const wxString &GetFileName() const { return m_fileName; }
238 
241 
242  DLIST<BOARD_ITEM> m_Drawings; // linked list of lines & texts
243  DLIST<MODULE> m_Modules; // linked list of MODULEs
244  DLIST<TRACK> m_Track; // linked list of TRACKs and VIAs
245  DLIST<SEGZONE> m_Zone; // linked list of SEGZONEs
246 
248  std::vector<RATSNEST_ITEM> m_FullRatsnest;
249 
251  std::vector<RATSNEST_ITEM> m_LocalRatsnest;
252 
255 
256  BOARD();
257  ~BOARD();
258 
259  virtual const wxPoint& GetPosition() const override;
260 
261  virtual void SetPosition( const wxPoint& aPos ) override;
262 
263  bool IsEmpty() const
264  {
265  return m_Drawings.GetCount() == 0 && m_Modules.GetCount() == 0 &&
266  m_Track.GetCount() == 0 && m_Zone.GetCount() == 0;
267  }
268 
269  void Move( const wxPoint& aMoveVector ) override;
270 
271  void SetFileFormatVersionAtLoad( int aVersion ) { m_fileFormatVersionAtLoad = aVersion; }
272  int GetFileFormatVersionAtLoad() const { return m_fileFormatVersionAtLoad; }
273 
275  void Add( BOARD_ITEM* aItem, ADD_MODE aMode = ADD_INSERT ) override;
276 
278  void Remove( BOARD_ITEM* aBoardItem ) override;
279 
280  BOARD_ITEM* Duplicate( const BOARD_ITEM* aItem, bool aAddToBoard = false );
281 
288  {
289  return m_ratsnest;
290  }
291 
296  void DeleteMARKERs();
297 
302  void DeleteZONEOutlines();
303 
310  MARKER_PCB* GetMARKER( int index ) const
311  {
312  if( (unsigned) index < m_markers.size() )
313  return m_markers[index];
314 
315  return NULL;
316  }
317 
322  int GetMARKERCount() const
323  {
324  return (int) m_markers.size();
325  }
326 
331  void SetAuxOrigin( const wxPoint& aPoint ) { m_designSettings.m_AuxOrigin = aPoint; }
332  const wxPoint& GetAuxOrigin() const { return m_designSettings.m_AuxOrigin; }
333 
338  void SetGridOrigin( const wxPoint& aPoint ) { m_designSettings.m_GridOrigin = aPoint; }
339  const wxPoint& GetGridOrigin() const { return m_designSettings.m_GridOrigin; }
340 
346  {
347  m_highLight.Clear();
348  m_highLightPrevious.Clear();
349  }
350 
355  int GetHighLightNetCode() const { return m_highLight.m_netCode; }
356 
361  void SetHighLightNet( int aNetCode)
362  {
363  m_highLight.m_netCode = aNetCode;
364  }
365 
370  bool IsHighLightNetON() const { return m_highLight.m_highLightOn; }
371 
376  void HighLightOFF() { m_highLight.m_highLightOn = false; }
377 
383  void HighLightON() { m_highLight.m_highLightOn = true; }
384 
389  void PushHighLight();
390 
395  void PopHighLight();
396 
401  int GetCopperLayerCount() const;
402 
403  void SetCopperLayerCount( int aCount );
404 
411  LSET GetEnabledLayers() const;
412 
419  void SetEnabledLayers( LSET aLayerMask );
420 
428  bool IsLayerEnabled( PCB_LAYER_ID aLayer ) const
429  {
430  return m_designSettings.IsLayerEnabled( aLayer );
431  }
432 
440  bool IsLayerVisible( PCB_LAYER_ID aLayer ) const
441  {
442  return m_designSettings.IsLayerVisible( aLayer );
443  }
444 
451  LSET GetVisibleLayers() const;
452 
459  void SetVisibleLayers( LSET aLayerMask );
460 
461  // these 2 functions are not tidy at this time, since there are PCB_LAYER_IDs that
462  // are not stored in the bitmap.
463 
471  int GetVisibleElements() const;
472 
480  void SetVisibleElements( int aMask );
481 
487  void SetVisibleAlls();
488 
497  bool IsElementVisible( GAL_LAYER_ID LAYER_aPCB ) const;
498 
506  void SetElementVisibility( GAL_LAYER_ID LAYER_aPCB, bool aNewState );
507 
515  bool IsModuleLayerVisible( PCB_LAYER_ID layer );
516 
522  COLOR4D GetVisibleElementColor( GAL_LAYER_ID LAYER_aPCB );
523 
524  void SetVisibleElementColor( GAL_LAYER_ID LAYER_aPCB, COLOR4D aColor );
525 
531  {
532  // remove const-ness with cast.
533  return (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  const ZONE_SETTINGS& GetZoneSettings() const { return m_zoneSettings; }
555  void SetZoneSettings( const ZONE_SETTINGS& aSettings ) { m_zoneSettings = aSettings; }
556 
561  COLORS_DESIGN_SETTINGS* GetColorsSettings() const { return m_colorsSettings; }
562 
567  void SetColorsSettings( COLORS_DESIGN_SETTINGS* aColorsSettings )
568  {
569  m_colorsSettings = aColorsSettings;
570  }
571 
584  bool GetBoardPolygonOutlines( SHAPE_POLY_SET& aOutlines,
585  wxString* aErrorText = NULL );
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 
686  void SetLayerColor( PCB_LAYER_ID aLayer, COLOR4D aColor );
687 
692  COLOR4D GetLayerColor( PCB_LAYER_ID aLayer ) const;
693 
695  int GetNumSegmTrack() const;
696 
698  int GetNumSegmZone() const;
699 
704  unsigned GetRatsnestsCount() const
705  {
706  return m_FullRatsnest.size();
707  }
708 
713  unsigned GetNodesCount() const;
714 
721  void SetNodeCount( unsigned aCount ) { m_nodeCount = aCount; }
722 
727  unsigned GetUnconnectedNetCount() const { return m_unconnectedNetCount; }
728 
735  void SetUnconnectedNetCount( unsigned aCount ) { m_unconnectedNetCount = aCount; }
736 
741  unsigned GetPadCount() const
742  {
743  return m_NetInfo.GetPadCount();
744  }
745 
750  D_PAD* GetPad( unsigned aIndex ) const
751  {
752  return m_NetInfo.GetPad( aIndex );
753  }
754 
762  const D_PADS& GetPads() { return m_NetInfo.m_PadsFullList; }
763 
765  {
766  m_NetInfo.buildListOfNets();
767  }
768 
775  NETINFO_ITEM* FindNet( int aNetcode ) const;
776 
783  NETINFO_ITEM* FindNet( const wxString& aNetname ) const;
784 
786  {
787  return m_NetInfo;
788  }
789 
790 #ifndef SWIG
791 
796  {
797  return m_NetInfo.begin();
798  }
799 
805  {
806  return m_NetInfo.end();
807  }
808 #endif
809 
814  unsigned GetNetCount() const
815  {
816  return m_NetInfo.GetNetCount();
817  }
818 
825  EDA_RECT ComputeBoundingBox( bool aBoardEdgesOnly = false ) const;
826 
827  const EDA_RECT GetBoundingBox() const override
828  {
829  return ComputeBoundingBox( false );
830  }
831 
840  {
841  return ComputeBoundingBox( true );
842  }
843 
844  void GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) override;
845 
854  void Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC,
855  GR_DRAWMODE aDrawMode, const wxPoint& aOffset = ZeroOffset ) override;
856 
866  void DrawHighLight( EDA_DRAW_PANEL* aDrawPanel, wxDC* aDC, int aNetCode );
867 
881  SEARCH_RESULT Visit( INSPECTOR inspector, void* testData, const KICAD_T scanTypes[] ) override;
882 
892  MODULE* FindModuleByReference( const wxString& aReference ) const;
893 
903  MODULE* FindModule( const wxString& aRefOrTimeStamp, bool aSearchByTimeStamp = false ) const;
904 
935  void ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets,
936  std::vector<MODULE*>* aNewFootprints, REPORTER* aReporter = NULL );
937 
945  int SortedNetnamesList( wxArrayString& aNames, bool aSortbyPadsCount );
946 
954  void SynchronizeNetsAndNetClasses();
955 
956  /***************************************************************************/
957 
958  wxString GetClass() const override
959  {
960  return wxT( "BOARD" );
961  }
962 
963 #if defined(DEBUG)
964  void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
965 #endif
966 
967 
968  /*************************/
969  /* Copper Areas handling */
970  /*************************/
971 
983  ZONE_CONTAINER* HitTestForAnyFilledArea( const wxPoint& aRefPos,
984  PCB_LAYER_ID aStartLayer,
985  PCB_LAYER_ID aEndLayer,
986  int aNetCode );
987 
992  void RedrawAreasOutlines( EDA_DRAW_PANEL* aPanel,
993  wxDC* aDC,
994  GR_DRAWMODE aDrawMode,
995  PCB_LAYER_ID aLayer );
996 
1001  void RedrawFilledAreas( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDrawMode,
1002  PCB_LAYER_ID aLayer );
1003 
1014  int SetAreasNetCodesFromNetNames( void );
1015 
1022  ZONE_CONTAINER* GetArea( int index ) const
1023  {
1024  if( (unsigned) index < m_ZoneDescriptorList.size() )
1025  return m_ZoneDescriptorList[index];
1026 
1027  return NULL;
1028  }
1029 
1036  int GetAreaIndex( const ZONE_CONTAINER* aArea ) const
1037  {
1038  for( int ii = 0; ii < GetAreaCount(); ii++ ) // Search for aArea in list
1039  {
1040  if( aArea == GetArea( ii ) ) // Found !
1041  return ii;
1042  }
1043 
1044  return -1;
1045  }
1046 
1051  int GetAreaCount() const
1052  {
1053  return (int) m_ZoneDescriptorList.size();
1054  }
1055 
1056  /* Functions used in test, merge and cut outlines */
1057 
1069  ZONE_CONTAINER* AddArea( PICKED_ITEMS_LIST* aNewZonesList, int aNetcode,
1070  PCB_LAYER_ID aLayer, wxPoint aStartPointPosition, int aHatch );
1071 
1077  ZONE_CONTAINER* InsertArea( int netcode, int iarea, PCB_LAYER_ID layer, int x, int y, int hatch );
1078 
1088  bool NormalizeAreaPolygon( PICKED_ITEMS_LIST* aNewZonesList, ZONE_CONTAINER* aCurrArea );
1089 
1100  bool OnAreaPolygonModified( PICKED_ITEMS_LIST* aModifiedZonesList,
1101  ZONE_CONTAINER* modified_area );
1102 
1113  bool CombineAllAreasInNet( PICKED_ITEMS_LIST* aDeletedList,
1114  int aNetCode,
1115  bool aUseLocalFlags );
1116 
1124  void RemoveArea( PICKED_ITEMS_LIST* aDeletedList, ZONE_CONTAINER* area_to_remove );
1125 
1131  bool TestAreaIntersections( ZONE_CONTAINER* area_to_test );
1132 
1141  bool TestAreaIntersection( ZONE_CONTAINER* area_ref, ZONE_CONTAINER* area_to_test );
1142 
1154  bool CombineAreas( PICKED_ITEMS_LIST* aDeletedList,
1155  ZONE_CONTAINER* area_ref,
1156  ZONE_CONTAINER* area_to_combine );
1157 
1169  int Test_Drc_Areas_Outlines_To_Areas_Outlines( ZONE_CONTAINER* aArea_To_Examine,
1170  bool aCreate_Markers );
1171 
1172  /****** function relative to ratsnest calculations: */
1173 
1179  void Test_Connections_To_Copper_Areas( int aNetcode = -1 );
1180 
1193  VIA* GetViaByPosition( const wxPoint& aPosition, PCB_LAYER_ID aLayer = PCB_LAYER_ID( -1 ) ) const;
1194 
1203  D_PAD* GetPad( const wxPoint& aPosition, LSET aLayerMask );
1204  D_PAD* GetPad( const wxPoint& aPosition )
1205  {
1206  return GetPad( aPosition, LSET().set() );
1207  }
1208 
1217  D_PAD* GetPad( TRACK* aTrace, ENDPOINT_T aEndPoint );
1218 
1229  D_PAD* GetPadFast( const wxPoint& aPosition, LSET aLayerMask );
1230 
1246  D_PAD* GetPad( std::vector<D_PAD*>& aPadList, const wxPoint& aPosition, LSET aLayerMask );
1247 
1254  void PadDelete( D_PAD* aPad );
1255 
1268  void GetSortedPadListByXthenYCoord( std::vector<D_PAD*>& aVector, int aNetCode = -1 );
1269 
1283  TRACK* GetVisibleTrack( TRACK* aStartingTrace, const wxPoint& aPosition, LSET aLayerSet ) const;
1284 
1309  TRACK* MarkTrace( TRACK* aTrace, int* aCount, double* aTraceLength,
1310  double* aInPackageLength, bool aReorder );
1311 
1319  TRACKS TracksInNet( int aNetCode );
1320 
1338  TRACKS TracksInNetBetweenPoints( const wxPoint& aStartPos, const wxPoint& aGoalPos, int aNetCode );
1339 
1354  MODULE* GetFootprint( const wxPoint& aPosition, PCB_LAYER_ID aActiveLayer,
1355  bool aVisibleOnly, bool aIgnoreLocked = false );
1356 
1370  BOARD_CONNECTED_ITEM* GetLockPoint( const wxPoint& aPosition, LSET aLayerMask );
1371 
1389  TRACK* CreateLockPoint( wxPoint& aPosition, TRACK* aSegment, PICKED_ITEMS_LIST* aList );
1390 };
1391 
1392 #endif // CLASS_BOARD_H_
std::vector< RATSNEST_ITEM > m_LocalRatsnest
Ratsnest list relative to a given footprint (used while moving a footprint).
Definition: class_board.h:251
void SetColorsSettings(COLORS_DESIGN_SETTINGS *aColorsSettings)
Function SetColorsSettings.
Definition: class_board.h:567
KICAD_T Type() const
Function Type()
Definition: base_struct.h:198
Wrapper class, so you can iterate through NETINFO_ITEM*s, not std::pair
void SetFileFormatVersionAtLoad(int aVersion)
Definition: class_board.h:271
D_PAD * GetPad(const wxPoint &aPosition)
Definition: class_board.h:1204
void BuildListOfNets()
Definition: class_board.h:764
const EDA_RECT GetBoundingBox() const override
Function GetBoundingBox returns the orthogonal, bounding box of this object for display purposes...
Definition: class_board.h:827
Class ZONE_CONTAINER handles a list of polygons defining a copper zone.
Definition: class_zone.h:78
NETINFO_LIST::iterator BeginNets() const
Function BeginNets.
Definition: class_board.h:795
void SetZoneSettings(const ZONE_SETTINGS &aSettings)
Definition: class_board.h:555
MARKER_PCB * GetMARKER(int index) const
Function GetMARKER returns the MARKER at a given index.
Definition: class_board.h:310
void SetElementVisibility(GAL_LAYER_ID aElement, bool aNewState)
Function SetElementVisibility changes the visibility of an element category.
Definition: pcbframe.cpp:936
static bool ClassOf(const EDA_ITEM *aItem)
Definition: class_board.h:230
const ZONE_SETTINGS & GetZoneSettings() const
Definition: class_board.h:554
Definition: typeinfo.h:97
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:338
unsigned GetUnconnectedNetCount() const
Function GetUnconnectedNetCount.
Definition: class_board.h:727
void SetLayerColor(COLOR4D aColor, SCH_LAYER_ID aLayer)
Definition: eeschema.cpp:173
BOARD(const BOARD &aOther)
Definition: class_board.h:217
wxString m_name
The name of the layer, there should be no spaces in this name.
Definition: class_board.h:108
const D_PADS & GetPads()
Function GetPads returns a reference to a list of all the pads.
Definition: class_board.h:762
const wxPoint & GetGridOrigin() const
Definition: class_board.h:339
Class RN_DATA.
wxString m_fileName
the board filename
Definition: class_board.h:172
Class BOARD_ITEM is a base class for any item which can be embedded within the BOARD container class...
void SetTitleBlock(const TITLE_BLOCK &aTitleBlock)
Definition: class_board.h:552
void SetUnconnectedNetCount(unsigned aCount)
Function SetUnconnectedNetCount sets the number of unconnected nets in the current rats nest to aCoun...
Definition: class_board.h:735
PAGE_INFO m_paper
Definition: class_board.h:194
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:428
void SetPageSettings(const PAGE_INFO &aPageSettings)
Definition: class_board.h:546
LAYER_T m_type
The type of the layer.
Definition: class_board.h:110
COLORS_DESIGN_SETTINGS * m_colorsSettings
Definition: class_board.h:193
bool IsLayerEnabled(PCB_LAYER_ID aLayerId) const
Function IsLayerEnabled tests whether a given layer is enabled.
void ResetHighLight()
Function ResetHighLight Reset all high light data to the init state.
Definition: class_board.h:345
ZONE_CONTAINER * m_CurrentZoneContour
zone contour currently in progress
Definition: class_board.h:254
unsigned GetNetCount() const
Function GetNetCount.
GAL_LAYER_ID
GAL layers are "virtual" layers, i.e.
void HighLightOFF()
Function HighLightOFF Disable highlight.
Definition: class_board.h:376
LAYER()
Definition: class_board.h:84
DLIST< SEGZONE > m_Zone
Definition: class_board.h:245
int m_unconnectedNetCount
Number of unconnected nets in the current rats nest.
Definition: class_board.h:202
BOARD & operator=(const BOARD &aOther)
Definition: class_board.h:223
HIGH_LIGHT_INFO m_highLight
Definition: class_board.h:183
NETINFO_LIST m_NetInfo
net info list (name, design constraints ..
Definition: class_board.h:188
bool IsLayerVisible(PCB_LAYER_ID aLayerId) const
Function IsLayerVisible tests whether a given layer is visible.
Class 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:184
NETINFO_LIST::iterator EndNets() const
Function EndNets.
Definition: class_board.h:804
COLOR4D GetLayerColor(SCH_LAYER_ID aLayer)
Definition: eeschema.cpp:166
Class TITLE_BLOCK holds the information shown in the lower right corner of a plot, printout, or editing view.
Class BOARD_CONNECTED_ITEM is a base class derived from BOARD_ITEM for items that can be connected an...
PCB_PLOT_PARAMS m_plotOptions
Definition: class_board.h:196
void SetVisibleAlls()
Function SetVisibleAlls Set the status of all visible element categories and layers to VISIBLE...
Definition: pcbframe.cpp:944
void SetAuxOrigin(const wxPoint &aPoint)
Function SetAuxOrigin sets the origin point used for plotting.
Definition: class_board.h:331
KICAD_T
Enum KICAD_T is the set of class identification values, stored in EDA_ITEM::m_StructType.
Definition: typeinfo.h:90
ENDPOINT_T
Flag used in locate routines (from which endpoint work)
Definition: pcbnew.h:54
static const char * ShowType(LAYER_T aType)
Function ShowType converts a LAYER_T enum to a const char*.
const EDA_RECT GetBoardEdgesBoundingBox() const
Function GetBoardEdgesBoundingBox Returns the board bounding box calculated using exclusively the boa...
Definition: class_board.h:839
const INSPECTOR_FUNC & INSPECTOR
Definition: base_struct.h:104
std::vector< RATSNEST_ITEM > m_FullRatsnest
Ratsnest list for the BOARD.
Definition: class_board.h:248
ZONE_SETTINGS m_zoneSettings
Definition: class_board.h:192
bool IsElementVisible(GAL_LAYER_ID aElement) const
Function IsElementVisible tests whether a given element category is visible.
Definition: pcbframe.cpp:930
PCB_LAYER_ID
A quick note on layer IDs:
Class LSET is a set of PCB_LAYER_IDs.
unsigned GetRatsnestsCount() const
Function GetNumRatsnests.
Definition: class_board.h:704
Class NETLIST stores all of information read from a netlist along with the flags used to update the N...
Definition: pcb_netlist.h:205
static const wxChar * Name(PCB_LAYER_ID aLayerId)
Function Name returns the fixed name association with aLayerId.
Definition: lset.cpp:73
Class NETINFO_LIST is a container class for NETINFO_ITEM elements, which are the nets.
const wxString & GetFileName() const
Definition: class_board.h:237
GR_DRAWMODE
Drawmode. Compositing mode plus a flag or two.
Definition: gr_basic.h:41
Class SHAPE_POLY_SET.
Class PAGE_INFO describes the page size and margins of a paper page on which to eventually print or p...
bool IsEmpty() const
Definition: class_board.h:263
LAYER_T
Enum LAYER_T gives the allowed types of layers, same as Specctra DSN spec.
Definition: class_board.h:68
D_PAD * GetPad(unsigned aIdx) const
Function GetPad.
COLORS_DESIGN_SETTINGS * GetColorsSettings() const
Function GetColorSettings.
Definition: class_board.h:561
TITLE_BLOCK m_titles
text in lower right of screen and plots
Definition: class_board.h:195
const PCB_PLOT_PARAMS & GetPlotOptions() const
Definition: class_board.h:548
bool m_visible
Definition: class_board.h:112
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Function GetDesignSettings.
Definition: class_board.h:530
#define DECL_VEC_FOR_SWIG(TypeName, MemberType)
Declare a std::vector but no swig template.
Definition: macros.h:146
DLIST< BOARD_ITEM > m_Drawings
Definition: class_board.h:242
void SetDesignSettings(const BOARD_DESIGN_SETTINGS &aDesignSettings)
Function SetDesignSettings.
Definition: class_board.h:540
void SetPosition(wxString aStr, wxString aDefaultMeasurementUnit, int *aX, int *aY, wxString aActualConversion)
int GetAreaCount() const
Function GetAreaCount.
Definition: class_board.h:1051
MARKERS m_markers
MARKER_PCBs for clearance problems, owned by pointer.
Definition: class_board.h:175
void SetFileName(const wxString &aFileName)
Definition: class_board.h:235
void SetPlotOptions(const PCB_PLOT_PARAMS &aOptions)
Definition: class_board.h:549
Class 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.
Class PCB_PLOT_PARAMS handles plot parameters and options when plotting/printing a board...
D_PAD * GetPad(unsigned aIndex) const
Function GetPad.
Definition: class_board.h:750
NETINFO_LIST & GetNetInfo()
Definition: class_board.h:785
unsigned GetPadCount() const
Function GetPadCount.
Definition: class_board.h:741
const PAGE_INFO & GetPageSettings() const
Definition: class_board.h:545
RN_DATA * GetRatsnest() const
Function GetRatsnest() returns list of missing connections between components/tracks.
Definition: class_board.h:287
Pad object description.
unsigned GetPadCount() const
Function GetPadCount.
int GetFileFormatVersionAtLoad() const
Definition: class_board.h:272
void HighLightON()
Function HighLightON Enable highlight.
Definition: class_board.h:383
Class ZONE_SETTINGS handles zones parameters.
const wxPoint & GetAuxOrigin() const
Definition: class_board.h:332
void SetHighLightNet(int aNetCode)
Function SetHighLightNet.
Definition: class_board.h:361
void clear()
Definition: class_board.h:89
Class NETINFO_ITEM handles the data for a net.
iterator begin() const
TITLE_BLOCK & GetTitleBlock()
Definition: class_board.h:551
ZONE_CONTAINER * GetArea(int index) const
Function GetArea returns the Area (Zone Container) at a given index.
Definition: class_board.h:1022
Board layer functions and definitions.
int m_fileFormatVersionAtLoad
the version loaded from the file
Definition: class_board.h:186
iterator end() const
Class LAYER holds information pertinent to a layer of a BOARD.
Definition: class_board.h:82
Class BOARD holds information pertinent to a Pcbnew printed circuit board.
Definition: class_board.h:166
Class ZONE_SETTINGS used to handle zones parameters in dialogs.
DLIST< MODULE > m_Modules
Definition: class_board.h:243
ZONE_CONTAINERS m_ZoneDescriptorList
edge zone descriptors, owned by pointer.
Definition: class_board.h:178
Class EDA_RECT handles the component boundary box.
Class EDA_ITEM is a base class for most all the KiCad significant classes, used in schematics and boa...
Definition: base_struct.h:151
The common library.
wxString GetClass() const override
Function GetClass returns the class name.
Definition: class_board.h:958
Class COLORS_DESIGN_SETTINGS is a list of color settings for designs in Eeschema, Pcbnew and GerbView...
unsigned GetCount() const
Function GetCount returns the number of elements in the list.
Definition: dlist.h:126
bool IsHighLightNetON() const
Function IsHighLightNetON.
Definition: class_board.h:370
RN_DATA * m_ratsnest
Definition: class_board.h:189
int GetHighLightNetCode() const
Function GetHighLightNetCode.
Definition: class_board.h:355
DLIST< TRACK > m_Track
Definition: class_board.h:244
BOARD_DESIGN_SETTINGS m_designSettings
Definition: class_board.h:191
void SetNodeCount(unsigned aCount)
Function SetNodeCount set the number of nodes of the current net to aCount.
Definition: class_board.h:721
Abstract interface for BOARD_ITEMs capable of storing other items inside.
int m_number
Definition: class_board.h:114
Class EDA_MSG_ITEM is used EDA_MSG_PANEL as the item type for displaying messages.
Definition: msgpanel.h:53
SEARCH_RESULT
Definition: base_struct.h:68
int m_nodeCount
Number of pads connected to the current net.
Definition: class_board.h:199
Handle colors used to draw all items or layers.
int GetAreaIndex(const ZONE_CONTAINER *aArea) const
Function GetAreaIndex returns the Area Index for the given Zone Container.
Definition: class_board.h:1036
wxPoint m_AuxOrigin
origin for plot exports
class PCB_BASE_FRAME basic PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer...
void buildListOfNets()
Function buildListOfNets builds or rebuilds the list of NETINFO_ITEMs The list is sorted by names...
int GetMARKERCount() const
Function GetMARKERCount.
Definition: class_board.h:322
unsigned GetNetCount() const
Function GetNetCount.
Definition: class_board.h:814
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
D_PADS m_PadsFullList
contains all pads, sorted by pad's netname.
Class BOARD_DESIGN_SETTINGS contains design settings for a BOARD object.
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:440
int m_Status_Pcb
Flags used in ratsnest calculation and update.
Definition: class_board.h:240
Class COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:39