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 
30 #ifndef CLASS_BOARD_H_
31 #define CLASS_BOARD_H_
32 
33 
34 #include <dlist.h>
35 #include <core/iterators.h>
36 
37 #include <common.h> // PAGE_INFO
39 #include <netinfo.h>
40 #include <class_pad.h>
41 #include <colors_design_settings.h>
42 #include <board_design_settings.h>
43 #include <title_block.h>
44 #include <zone_settings.h>
45 #include <pcb_plot_params.h>
46 #include <board_item_container.h>
47 
48 #include <memory>
49 
50 using std::unique_ptr;
51 
52 class PCB_BASE_FRAME;
53 class PCB_EDIT_FRAME;
54 class PICKED_ITEMS_LIST;
55 class BOARD;
56 class ZONE_CONTAINER;
57 class SEGZONE;
58 class TRACK;
59 class D_PAD;
60 class MARKER_PCB;
61 class MSG_PANEL_ITEM;
62 class NETLIST;
63 class REPORTER;
64 class SHAPE_POLY_SET;
65 class CONNECTIVITY_DATA;
66 
71 enum LAYER_T
72 {
78 };
79 
80 
85 struct LAYER
86 {
88  {
89  clear();
90  }
91 
92  void clear()
93  {
94  m_type = LT_SIGNAL;
95  m_visible = true;
96  m_number = 0;
97  m_name.clear();
98  }
99 
100  /*
101  LAYER( const wxString& aName = wxEmptyString,
102  LAYER_T aType = LT_SIGNAL, bool aVisible = true, int aNumber = -1 ) :
103  m_name( aName ),
104  m_type( aType ),
105  m_visible( aVisible ),
106  m_number( aNumber )
107  {
108  }
109  */
110 
111  wxString m_name;
112 
114 
115  bool m_visible;
116 
117  int m_number;
118 
125  static const char* ShowType( LAYER_T aType );
126 
134  static LAYER_T ParseType( const char* aType );
135 };
136 
137 
138 // Helper class to handle high light nets
140 {
141  friend class BOARD;
142 
143 protected:
144  int m_netCode; // net selected for highlight (-1 when no net selected )
145  bool m_highLightOn; // highlight active
146 
147  void Clear()
148  {
149  m_netCode = -1;
150  m_highLightOn = false;
151  }
152 
154  {
155  Clear();
156  }
157 };
158 
159 
160 DECL_VEC_FOR_SWIG(MARKERS, MARKER_PCB*)
161 DECL_VEC_FOR_SWIG(ZONE_CONTAINERS, ZONE_CONTAINER*)
162 DECL_VEC_FOR_SWIG(TRACKS, TRACK*)
163 
164 
165 
170 {
171  friend class PCB_EDIT_FRAME;
172 
173 private:
175  wxString m_fileName;
176 
178  MARKERS m_markers;
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 
200 
211  void chainMarkedSegments( TRACK* aTrackList, wxPoint aPosition,
212  const LSET& aLayerSet, TRACKS* aList );
213 
214  // The default copy constructor & operator= are inadequate,
215  // either write one or do not use it at all
216  BOARD( const BOARD& aOther ) :
217  BOARD_ITEM_CONTAINER( aOther ), m_NetInfo( this )
218  {
219  assert( false );
220  }
221 
222  BOARD& operator=( const BOARD& aOther )
223  {
224  assert( false );
225  return *this; // just to mute warning
226  }
227 
228 public:
229  static inline bool ClassOf( const EDA_ITEM* aItem )
230  {
231  return aItem && PCB_T == aItem->Type();
232  }
233 
234  void SetFileName( const wxString& aFileName ) { m_fileName = aFileName; }
235 
236  const wxString &GetFileName() const { return m_fileName; }
237 
240 
241 
242 private:
243  DLIST<BOARD_ITEM> m_Drawings; // linked list of lines & texts
244 
245 public:
246 
247  DLIST<MODULE> m_Modules; // linked list of MODULEs
248  DLIST<TRACK> m_Track; // linked list of TRACKs and VIAs
249  DLIST<SEGZONE> m_SegZoneDeprecated; // linked list of SEGZONEs, for really very old boards
250  // should be removed one day
251 
255  ZONE_CONTAINERS& Zones() { return m_ZoneDescriptorList; }
256 
257 
258  // will be deprecated as soon as append board functionality is fixed
259  DLIST<BOARD_ITEM>& DrawingsList() { return m_Drawings; }
260 
263 
264  BOARD();
265  ~BOARD();
266 
267  virtual const wxPoint GetPosition() const override;
268 
269  virtual void SetPosition( const wxPoint& aPos ) override;
270 
271  bool IsEmpty() const
272  {
273  return m_Drawings.GetCount() == 0 && m_Modules.GetCount() == 0 &&
274  m_Track.GetCount() == 0 && m_SegZoneDeprecated.GetCount() == 0;
275  }
276 
277  void Move( const wxPoint& aMoveVector ) override;
278 
279  void SetFileFormatVersionAtLoad( int aVersion ) { m_fileFormatVersionAtLoad = aVersion; }
280  int GetFileFormatVersionAtLoad() const { return m_fileFormatVersionAtLoad; }
281 
282  void Add( BOARD_ITEM* aItem, ADD_MODE aMode = ADD_INSERT ) override;
283 
284  void Remove( BOARD_ITEM* aBoardItem ) override;
285 
286  BOARD_ITEM* GetItem( void* aWeakReference, bool includeDrawings = true );
287 
288  BOARD_ITEM* Duplicate( const BOARD_ITEM* aItem, bool aAddToBoard = false );
289 
295  std::shared_ptr<CONNECTIVITY_DATA> GetConnectivity() const
296  {
297  return m_connectivity;
298  }
299 
305  void BuildConnectivity();
306 
307 
312  void DeleteMARKERs();
313 
318  void DeleteZONEOutlines();
319 
326  MARKER_PCB* GetMARKER( int index ) const
327  {
328  if( (unsigned) index < m_markers.size() )
329  return m_markers[index];
330 
331  return NULL;
332  }
333 
338  int GetMARKERCount() const
339  {
340  return (int) m_markers.size();
341  }
342 
347  void SetAuxOrigin( const wxPoint& aPoint ) { m_designSettings.m_AuxOrigin = aPoint; }
348  const wxPoint& GetAuxOrigin() const { return m_designSettings.m_AuxOrigin; }
349 
354  void SetGridOrigin( const wxPoint& aPoint ) { m_designSettings.m_GridOrigin = aPoint; }
355  const wxPoint& GetGridOrigin() const { return m_designSettings.m_GridOrigin; }
356 
362  {
363  m_highLight.Clear();
364  m_highLightPrevious.Clear();
365  }
366 
371  int GetHighLightNetCode() const { return m_highLight.m_netCode; }
372 
377  void SetHighLightNet( int aNetCode)
378  {
379  m_highLight.m_netCode = aNetCode;
380  }
381 
386  bool IsHighLightNetON() const { return m_highLight.m_highLightOn; }
387 
392  void HighLightOFF() { m_highLight.m_highLightOn = false; }
393 
399  void HighLightON() { m_highLight.m_highLightOn = true; }
400 
405  void PushHighLight();
406 
411  void PopHighLight();
412 
417  int GetCopperLayerCount() const;
418 
419  void SetCopperLayerCount( int aCount );
420 
427  LSET GetEnabledLayers() const;
428 
435  void SetEnabledLayers( LSET aLayerMask );
436 
444  bool IsLayerEnabled( PCB_LAYER_ID aLayer ) const
445  {
446  return m_designSettings.IsLayerEnabled( aLayer );
447  }
448 
456  bool IsLayerVisible( PCB_LAYER_ID aLayer ) const
457  {
458  return m_designSettings.IsLayerVisible( aLayer );
459  }
460 
467  LSET GetVisibleLayers() const;
468 
475  void SetVisibleLayers( LSET aLayerMask );
476 
477  // these 2 functions are not tidy at this time, since there are PCB_LAYER_IDs that
478  // are not stored in the bitmap.
479 
487  int GetVisibleElements() const;
488 
496  void SetVisibleElements( int aMask );
497 
503  void SetVisibleAlls();
504 
513  bool IsElementVisible( GAL_LAYER_ID aLayer ) const;
514 
522  void SetElementVisibility( GAL_LAYER_ID aLayer, bool aNewState );
523 
531  bool IsModuleLayerVisible( PCB_LAYER_ID aLayer );
532 
538  {
539  // remove const-ness with cast.
540  return (BOARD_DESIGN_SETTINGS&) m_designSettings;
541  }
542 
547  void SetDesignSettings( const BOARD_DESIGN_SETTINGS& aDesignSettings )
548  {
549  m_designSettings = aDesignSettings;
550  }
551 
552  const PAGE_INFO& GetPageSettings() const { return m_paper; }
553  void SetPageSettings( const PAGE_INFO& aPageSettings ) { m_paper = aPageSettings; }
554 
555  const PCB_PLOT_PARAMS& GetPlotOptions() const { return m_plotOptions; }
556  void SetPlotOptions( const PCB_PLOT_PARAMS& aOptions ) { m_plotOptions = aOptions; }
557 
558  TITLE_BLOCK& GetTitleBlock() { return m_titles; }
559  void SetTitleBlock( const TITLE_BLOCK& aTitleBlock ) { m_titles = aTitleBlock; }
560 
561  const ZONE_SETTINGS& GetZoneSettings() const { return m_zoneSettings; }
562  void SetZoneSettings( const ZONE_SETTINGS& aSettings ) { m_zoneSettings = aSettings; }
563 
568  const COLORS_DESIGN_SETTINGS& Colors() const { return *m_colorsSettings; }
569 
574  void SetColorsSettings( COLORS_DESIGN_SETTINGS* aColorsSettings )
575  {
576  m_colorsSettings = aColorsSettings;
577  }
590  bool GetBoardPolygonOutlines( SHAPE_POLY_SET& aOutlines,
591  wxString* aErrorText = NULL );
592 
604  void ConvertBrdLayerToPolygonalContours( PCB_LAYER_ID aLayer, SHAPE_POLY_SET& aOutlines );
605 
616  const PCB_LAYER_ID GetLayerID( const wxString& aLayerName ) const;
617 
628  const wxString GetLayerName( PCB_LAYER_ID aLayer ) const;
629 
639  bool SetLayerName( PCB_LAYER_ID aLayer, const wxString& aLayerName );
640 
652  static wxString GetStandardLayerName( PCB_LAYER_ID aLayerId )
653  {
654  // a BOARD's standard layer name is the PCB_LAYER_ID fixed name
655  return LSET::Name( aLayerId );
656  }
657 
666  bool SetLayerDescr( PCB_LAYER_ID aIndex, const LAYER& aLayer );
667 
676  LAYER_T GetLayerType( PCB_LAYER_ID aLayer ) const;
677 
686  bool SetLayerType( PCB_LAYER_ID aLayer, LAYER_T aLayerType );
687 
689  int GetNumSegmTrack() const;
690 
692  int GetNumSegmZone() const;
693 
699  unsigned GetNodesCount( int aNet = -1 );
700 
705  unsigned GetUnconnectedNetCount() const;
706 
711  unsigned GetPadCount();
712 
717  D_PAD* GetPad( unsigned aIndex ) const;
718 
726  const std::vector<D_PAD*> GetPads();
727 
729  {
730  m_NetInfo.buildListOfNets();
731  }
732 
739  NETINFO_ITEM* FindNet( int aNetcode ) const;
740 
747  NETINFO_ITEM* FindNet( const wxString& aNetname ) const;
748 
750  {
751  return m_NetInfo;
752  }
753 
754 #ifndef SWIG
755 
760  {
761  return m_NetInfo.begin();
762  }
763 
769  {
770  return m_NetInfo.end();
771  }
772 #endif
773 
778  unsigned GetNetCount() const
779  {
780  return m_NetInfo.GetNetCount();
781  }
782 
789  EDA_RECT ComputeBoundingBox( bool aBoardEdgesOnly = false ) const;
790 
791  const EDA_RECT GetBoundingBox() const override
792  {
793  return ComputeBoundingBox( false );
794  }
795 
804  {
805  return ComputeBoundingBox( true );
806  }
807 
808  void GetMsgPanelInfo( EDA_UNITS_T aUnits, std::vector< MSG_PANEL_ITEM >& aList ) override;
809 
818  void Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC,
819  GR_DRAWMODE aDrawMode, const wxPoint& aOffset = ZeroOffset ) override;
820 
830  void DrawHighLight( EDA_DRAW_PANEL* aDrawPanel, wxDC* aDC, int aNetCode );
831 
845  SEARCH_RESULT Visit( INSPECTOR inspector, void* testData, const KICAD_T scanTypes[] ) override;
846 
856  MODULE* FindModuleByReference( const wxString& aReference ) const;
857 
867  MODULE* FindModule( const wxString& aRefOrTimeStamp, bool aSearchByTimeStamp = false ) const;
868 
901  void ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets,
902  std::vector<MODULE*>* aNewFootprints, REPORTER* aReporter = NULL );
903 
911  int SortedNetnamesList( wxArrayString& aNames, bool aSortbyPadsCount );
912 
920  void SynchronizeNetsAndNetClasses();
921 
922  /***************************************************************************/
923 
924  wxString GetClass() const override
925  {
926  return wxT( "BOARD" );
927  }
928 
929 #if defined(DEBUG)
930  void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
931 #endif
932 
933 
934  /*************************/
935  /* Copper Areas handling */
936  /*************************/
937 
949  ZONE_CONTAINER* HitTestForAnyFilledArea( const wxPoint& aRefPos,
950  PCB_LAYER_ID aStartLayer,
951  PCB_LAYER_ID aEndLayer,
952  int aNetCode );
953 
958  void RedrawAreasOutlines( EDA_DRAW_PANEL* aPanel,
959  wxDC* aDC,
960  GR_DRAWMODE aDrawMode,
961  PCB_LAYER_ID aLayer );
962 
967  void RedrawFilledAreas( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDrawMode,
968  PCB_LAYER_ID aLayer );
969 
980  int SetAreasNetCodesFromNetNames( void );
981 
988  ZONE_CONTAINER* GetArea( int index ) const
989  {
990  if( (unsigned) index < m_ZoneDescriptorList.size() )
991  return m_ZoneDescriptorList[index];
992 
993  return NULL;
994  }
995 
1002  int GetAreaIndex( const ZONE_CONTAINER* aArea ) const
1003  {
1004  for( int ii = 0; ii < GetAreaCount(); ii++ ) // Search for aArea in list
1005  {
1006  if( aArea == GetArea( ii ) ) // Found !
1007  return ii;
1008  }
1009 
1010  return -1;
1011  }
1012 
1017  int GetAreaCount() const
1018  {
1019  return (int) m_ZoneDescriptorList.size();
1020  }
1021 
1022  /* Functions used in test, merge and cut outlines */
1023 
1035  ZONE_CONTAINER* AddArea( PICKED_ITEMS_LIST* aNewZonesList, int aNetcode,
1036  PCB_LAYER_ID aLayer, wxPoint aStartPointPosition, int aHatch );
1037 
1048  ZONE_CONTAINER* InsertArea( int aNetcode, int aAreaIdx, PCB_LAYER_ID aLayer,
1049  int aCornerX, int aCornerY, int aHatch );
1050 
1060  bool NormalizeAreaPolygon( PICKED_ITEMS_LIST* aNewZonesList, ZONE_CONTAINER* aCurrArea );
1061 
1072  bool OnAreaPolygonModified( PICKED_ITEMS_LIST* aModifiedZonesList,
1073  ZONE_CONTAINER* modified_area );
1074 
1085  bool CombineAllAreasInNet( PICKED_ITEMS_LIST* aDeletedList,
1086  int aNetCode,
1087  bool aUseLocalFlags );
1088 
1096  void RemoveArea( PICKED_ITEMS_LIST* aDeletedList, ZONE_CONTAINER* area_to_remove );
1097 
1103  bool TestAreaIntersections( ZONE_CONTAINER* area_to_test );
1104 
1113  bool TestAreaIntersection( ZONE_CONTAINER* area_ref, ZONE_CONTAINER* area_to_test );
1114 
1126  bool CombineAreas( PICKED_ITEMS_LIST* aDeletedList,
1127  ZONE_CONTAINER* area_ref,
1128  ZONE_CONTAINER* area_to_combine );
1129 
1142  VIA* GetViaByPosition( const wxPoint& aPosition,
1143  PCB_LAYER_ID aLayer = PCB_LAYER_ID( -1 ) ) const;
1144 
1153  std::list<TRACK*> GetTracksByPosition( const wxPoint& aPosition, PCB_LAYER_ID aLayer = PCB_LAYER_ID( -1 ) ) const;
1154 
1163  D_PAD* GetPad( const wxPoint& aPosition, LSET aLayerMask );
1164  D_PAD* GetPad( const wxPoint& aPosition )
1165  {
1166  return GetPad( aPosition, LSET().set() );
1167  }
1168 
1177  D_PAD* GetPad( TRACK* aTrace, ENDPOINT_T aEndPoint );
1178 
1189  D_PAD* GetPadFast( const wxPoint& aPosition, LSET aLayerMask );
1190 
1206  D_PAD* GetPad( std::vector<D_PAD*>& aPadList, const wxPoint& aPosition, LSET aLayerMask );
1207 
1214  void PadDelete( D_PAD* aPad );
1215 
1228  void GetSortedPadListByXthenYCoord( std::vector<D_PAD*>& aVector, int aNetCode = -1 );
1229 
1243  TRACK* GetVisibleTrack( TRACK* aStartingTrace, const wxPoint& aPosition, LSET aLayerSet ) const;
1244 
1271  TRACK* MarkTrace( TRACK* aTrackList, TRACK* aTrace, int* aCount, double* aTraceLength,
1272  double* aInPackageLength, bool aReorder );
1273 
1281  TRACKS TracksInNet( int aNetCode );
1282 
1300  TRACKS TracksInNetBetweenPoints( const wxPoint& aStartPos, const wxPoint& aGoalPos, int aNetCode );
1301 
1316  MODULE* GetFootprint( const wxPoint& aPosition, PCB_LAYER_ID aActiveLayer,
1317  bool aVisibleOnly, bool aIgnoreLocked = false );
1318 
1332  BOARD_CONNECTED_ITEM* GetLockPoint( const wxPoint& aPosition, LSET aLayerMask );
1333 
1351  TRACK* CreateLockPoint( wxPoint& aPosition, TRACK* aSegment, PICKED_ITEMS_LIST* aList );
1352 
1357  void ClearAllNetCodes();
1358 };
1359 
1360 #endif // CLASS_BOARD_H_
void SetColorsSettings(COLORS_DESIGN_SETTINGS *aColorsSettings)
Function SetColorsSettings.
Definition: class_board.h:574
KICAD_T Type() const
Function Type()
Definition: base_struct.h:198
Wrapper class, so you can iterate through NETINFO_ITEM*s, not std::pair<int/wxString, NETINFO_ITEM*>
Definition: netinfo.h:478
void SetFileFormatVersionAtLoad(int aVersion)
Definition: class_board.h:279
D_PAD * GetPad(const wxPoint &aPosition)
Definition: class_board.h:1164
void BuildListOfNets()
Definition: class_board.h:728
const EDA_RECT GetBoundingBox() const override
Function GetBoundingBox returns the orthogonal, bounding box of this object for display purposes...
Definition: class_board.h:791
Class ZONE_CONTAINER handles a list of polygons defining a copper zone.
Definition: class_zone.h:60
NETINFO_LIST::iterator BeginNets() const
Function BeginNets.
Definition: class_board.h:759
void SetZoneSettings(const ZONE_SETTINGS &aSettings)
Definition: class_board.h:562
MARKER_PCB * GetMARKER(int index) const
Function GetMARKER returns the MARKER at a given index.
Definition: class_board.h:326
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:229
const ZONE_SETTINGS & GetZoneSettings() const
Definition: class_board.h:561
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:354
BOARD(const BOARD &aOther)
Definition: class_board.h:216
wxString m_name
The name of the layer, there should be no spaces in this name.
Definition: class_board.h:111
const wxPoint & GetGridOrigin() const
Definition: class_board.h:355
wxString m_fileName
the board filename
Definition: class_board.h:175
Handle colors used to draw all items or layers.
void SetPosition(wxString aStr, const wxString &aDefaultMeasurementUnit, int *aX, int *aY, const wxString &aActualConversion)
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:559
PAGE_INFO m_paper
Definition: class_board.h:196
DLIST< BOARD_ITEM > & DrawingsList()
Definition: class_board.h:259
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:444
void SetPageSettings(const PAGE_INFO &aPageSettings)
Definition: class_board.h:553
LAYER_T m_type
The type of the layer.
Definition: class_board.h:113
COLORS_DESIGN_SETTINGS * m_colorsSettings
Definition: class_board.h:195
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:361
ZONE_CONTAINER * m_CurrentZoneContour
zone contour currently in progress
Definition: class_board.h:262
unsigned GetNetCount() const
Function GetNetCount.
Definition: netinfo.h:434
GAL_LAYER_ID
GAL layers are "virtual" layers, i.e.
void HighLightOFF()
Function HighLightOFF Disable highlight.
Definition: class_board.h:392
LAYER()
Definition: class_board.h:87
BOARD & operator=(const BOARD &aOther)
Definition: class_board.h:222
HIGH_LIGHT_INFO m_highLight
Definition: class_board.h:186
NETINFO_LIST m_NetInfo
net info list (name, design constraints ..
Definition: class_board.h:199
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:187
NETINFO_LIST::iterator EndNets() const
Function EndNets.
Definition: class_board.h:768
Class TITLE_BLOCK holds the information shown in the lower right corner of a plot, printout, or editing view.
Definition: title_block.h:39
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:198
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:347
KICAD_T
Enum KICAD_T is the set of class identification values, stored in EDA_ITEM::m_StructType.
Definition: typeinfo.h:78
ENDPOINT_T
Flag used in locate routines (from which endpoint work)
Definition: pcbnew.h:58
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:803
const INSPECTOR_FUNC & INSPECTOR
Definition: base_struct.h:102
ZONE_SETTINGS m_zoneSettings
Definition: class_board.h:194
bool IsElementVisible(GAL_LAYER_ID aElement) const
Function IsElementVisible tests whether a given element category is visible.
PCB_LAYER_ID
A quick note on layer IDs:
Class LSET is a set of PCB_LAYER_IDs.
Class NETLIST stores all of information read from a netlist along with the flags used to update the N...
Definition: pcb_netlist.h:214
DLIST_ITERATOR_WRAPPER< MODULE > Modules()
Definition: class_board.h:253
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.
Definition: netinfo.h:407
const wxString & GetFileName() const
Definition: class_board.h:236
GR_DRAWMODE
Drawmode. Compositing mode plus a flag or two.
Definition: gr_basic.h:37
Class SHAPE_POLY_SET.
const COLORS_DESIGN_SETTINGS & Colors() const
Function GetColorSettings.
Definition: class_board.h:568
Class PAGE_INFO describes the page size and margins of a paper page on which to eventually print or p...
Definition: page_info.h:54
bool IsEmpty() const
Definition: class_board.h:271
DLIST< SEGZONE > m_SegZoneDeprecated
Definition: class_board.h:249
LAYER_T
Enum LAYER_T gives the allowed types of layers, same as Specctra DSN spec.
Definition: class_board.h:71
TITLE_BLOCK m_titles
text in lower right of screen and plots
Definition: class_board.h:197
const PCB_PLOT_PARAMS & GetPlotOptions() const
Definition: class_board.h:555
bool m_visible
Definition: class_board.h:115
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Function GetDesignSettings.
Definition: class_board.h:537
#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:243
void SetDesignSettings(const BOARD_DESIGN_SETTINGS &aDesignSettings)
Function SetDesignSettings.
Definition: class_board.h:547
int GetAreaCount() const
Function GetAreaCount.
Definition: class_board.h:1017
MARKERS m_markers
MARKER_PCBs for clearance problems, owned by pointer.
Definition: class_board.h:178
void SetFileName(const wxString &aFileName)
Definition: class_board.h:234
void SetPlotOptions(const PCB_PLOT_PARAMS &aOptions)
Definition: class_board.h:556
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...
NETINFO_LIST & GetNetInfo()
Definition: class_board.h:749
const PAGE_INFO & GetPageSettings() const
Definition: class_board.h:552
Pad object description.
int GetFileFormatVersionAtLoad() const
Definition: class_board.h:280
void HighLightON()
Function HighLightON Enable highlight.
Definition: class_board.h:399
Class ZONE_SETTINGS handles zones parameters.
Definition: zone_settings.h:50
const wxPoint & GetAuxOrigin() const
Definition: class_board.h:348
void SetHighLightNet(int aNetCode)
Function SetHighLightNet.
Definition: class_board.h:377
void clear()
Definition: class_board.h:92
Class NETINFO_ITEM handles the data for a net.
Definition: netinfo.h:69
iterator begin() const
Definition: netinfo.h:524
ZONE_CONTAINERS & Zones()
Definition: class_board.h:255
TITLE_BLOCK & GetTitleBlock()
Definition: class_board.h:558
ZONE_CONTAINER * GetArea(int index) const
Function GetArea returns the Area (Zone Container) at a given index.
Definition: class_board.h:988
Board layer functions and definitions.
int m_fileFormatVersionAtLoad
the version loaded from the file
Definition: class_board.h:189
iterator end() const
Definition: netinfo.h:529
Class LAYER holds information pertinent to a layer of a BOARD.
Definition: class_board.h:85
Class BOARD holds information pertinent to a Pcbnew printed circuit board.
Definition: class_board.h:169
DLIST< MODULE > m_Modules
Definition: class_board.h:247
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
Class EDA_RECT handles the component boundary box.
Definition: eda_rect.h:44
Class PCB_EDIT_FRAME is the main frame for Pcbnew.
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:924
Class COLORS_DESIGN_SETTINGS is a list of color settings for designs in Pcbnew.
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:386
DLIST_ITERATOR_WRAPPER< TRACK > Tracks()
Definition: class_board.h:252
int GetHighLightNetCode() const
Function GetHighLightNetCode.
Definition: class_board.h:371
DLIST< TRACK > m_Track
Definition: class_board.h:248
BOARD_DESIGN_SETTINGS m_designSettings
Definition: class_board.h:193
Abstract interface for BOARD_ITEMs capable of storing other items inside.
int m_number
Definition: class_board.h:117
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:66
int GetAreaIndex(const ZONE_CONTAINER *aArea) const
Function GetAreaIndex returns the Area Index for the given Zone Container.
Definition: class_board.h:1002
std::shared_ptr< CONNECTIVITY_DATA > GetConnectivity() const
Function GetConnectivity() returns list of missing connections between components/tracks.
Definition: class_board.h:295
wxPoint m_AuxOrigin
origin for plot exports
class PCB_BASE_FRAME basic PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer...
EDA_UNITS_T
Definition: common.h:159
void buildListOfNets()
Function buildListOfNets builds or rebuilds the list of NETINFO_ITEMs The list is sorted by names...
DLIST_ITERATOR_WRAPPER< BOARD_ITEM > Drawings()
Definition: class_board.h:254
int GetMARKERCount() const
Function GetMARKERCount.
Definition: class_board.h:338
unsigned GetNetCount() const
Function GetNetCount.
Definition: class_board.h:778
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:652
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:456
int m_Status_Pcb
Flags used in ratsnest calculation and update.
Definition: class_board.h:239