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 #include <eda_rect.h>
48 
49 #include <memory>
50 
51 using std::unique_ptr;
52 
53 class PCB_BASE_FRAME;
54 class PCB_EDIT_FRAME;
55 class PICKED_ITEMS_LIST;
56 class BOARD;
57 class ZONE_CONTAINER;
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 class COMPONENT;
67 
72 enum LAYER_T
73 {
79 };
80 
81 
86 struct LAYER
87 {
89  {
90  clear();
91  }
92 
93  void clear()
94  {
95  m_type = LT_SIGNAL;
96  m_visible = true;
97  m_number = 0;
98  m_name.clear();
99  }
100 
101  /*
102  LAYER( const wxString& aName = wxEmptyString,
103  LAYER_T aType = LT_SIGNAL, bool aVisible = true, int aNumber = -1 ) :
104  m_name( aName ),
105  m_type( aType ),
106  m_visible( aVisible ),
107  m_number( aNumber )
108  {
109  }
110  */
111 
112  wxString m_name;
113 
115 
116  bool m_visible;
117 
118  int m_number;
119 
126  static const char* ShowType( LAYER_T aType );
127 
135  static LAYER_T ParseType( const char* aType );
136 };
137 
138 
139 // Helper class to handle high light nets
141 {
142  friend class BOARD;
143 
144 protected:
145  int m_netCode; // net selected for highlight (-1 when no net selected )
146  bool m_highLightOn; // highlight active
147 
148  void Clear()
149  {
150  m_netCode = -1;
151  m_highLightOn = false;
152  }
153 
155  {
156  Clear();
157  }
158 };
159 
160 
161 DECL_VEC_FOR_SWIG(MARKERS, MARKER_PCB*)
162 DECL_VEC_FOR_SWIG(ZONE_CONTAINERS, ZONE_CONTAINER*)
163 DECL_VEC_FOR_SWIG(TRACKS, TRACK*)
164 
165 
166 
171 {
172  friend class PCB_EDIT_FRAME;
173 
174 private:
176  wxString m_fileName;
177 
179  MARKERS m_markers;
180 
182  ZONE_CONTAINERS m_ZoneDescriptorList;
183 
185 
186  // if true m_highLight_NetCode is used
187  HIGH_LIGHT_INFO m_highLight; // current high light data
188  HIGH_LIGHT_INFO m_highLightPrevious; // a previously stored high light data
189 
191 
192  std::shared_ptr<CONNECTIVITY_DATA> m_connectivity;
193 
201 
212  void chainMarkedSegments( TRACK* aTrackList, wxPoint aPosition,
213  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 
243 private:
244  DLIST<BOARD_ITEM> m_Drawings; // linked list of lines & texts
245 
246 public:
247 
248  DLIST<MODULE> m_Modules; // linked list of MODULEs
249  DLIST<TRACK> m_Track; // linked list of TRACKs and VIAs
250 
254  ZONE_CONTAINERS& Zones() { return m_ZoneDescriptorList; }
255  const std::vector<BOARD_CONNECTED_ITEM*> AllConnectedItems();
256 
257  // will be deprecated as soon as append board functionality is fixed
258  DLIST<BOARD_ITEM>& DrawingsList() { return m_Drawings; }
259 
262 
263  BOARD();
264  ~BOARD();
265 
266  const wxPoint GetPosition() const override;
267  void SetPosition( const wxPoint& aPos ) override;
268 
269  bool IsEmpty() const
270  {
271  return m_Drawings.GetCount() == 0 && m_Modules.GetCount() == 0 && m_Track.GetCount() == 0;
272  }
273 
274  void Move( const wxPoint& aMoveVector ) override;
275 
276  void SetFileFormatVersionAtLoad( int aVersion ) { m_fileFormatVersionAtLoad = aVersion; }
277  int GetFileFormatVersionAtLoad() const { return m_fileFormatVersionAtLoad; }
278 
279  void Add( BOARD_ITEM* aItem, ADD_MODE aMode = ADD_INSERT ) override;
280 
281  void Remove( BOARD_ITEM* aBoardItem ) override;
282 
283  BOARD_ITEM* GetItem( void* aWeakReference );
284 
285  BOARD_ITEM* Duplicate( const BOARD_ITEM* aItem, bool aAddToBoard = false );
286 
292  std::shared_ptr<CONNECTIVITY_DATA> GetConnectivity() const
293  {
294  return m_connectivity;
295  }
296 
302  void BuildConnectivity();
303 
304 
309  void DeleteMARKERs();
310 
315  void DeleteZONEOutlines();
316 
323  MARKER_PCB* GetMARKER( int index ) const
324  {
325  if( (unsigned) index < m_markers.size() )
326  return m_markers[index];
327 
328  return NULL;
329  }
330 
335  int GetMARKERCount() const
336  {
337  return (int) m_markers.size();
338  }
339 
344  void SetAuxOrigin( const wxPoint& aPoint ) { m_designSettings.m_AuxOrigin = aPoint; }
345  const wxPoint& GetAuxOrigin() const { return m_designSettings.m_AuxOrigin; }
346 
351  void SetGridOrigin( const wxPoint& aPoint ) { m_designSettings.m_GridOrigin = aPoint; }
352  const wxPoint& GetGridOrigin() const { return m_designSettings.m_GridOrigin; }
353 
359  {
360  m_highLight.Clear();
361  m_highLightPrevious.Clear();
362  }
363 
368  int GetHighLightNetCode() const { return m_highLight.m_netCode; }
369 
374  void SetHighLightNet( int aNetCode)
375  {
376  m_highLight.m_netCode = aNetCode;
377  }
378 
383  bool IsHighLightNetON() const { return m_highLight.m_highLightOn; }
384 
389  void HighLightOFF() { m_highLight.m_highLightOn = false; }
390 
396  void HighLightON() { m_highLight.m_highLightOn = true; }
397 
402  void PushHighLight();
403 
408  void PopHighLight();
409 
414  int GetCopperLayerCount() const;
415 
416  void SetCopperLayerCount( int aCount );
417 
424  LSET GetEnabledLayers() const;
425 
432  void SetEnabledLayers( LSET aLayerMask );
433 
441  bool IsLayerEnabled( PCB_LAYER_ID aLayer ) const
442  {
443  return m_designSettings.IsLayerEnabled( aLayer );
444  }
445 
453  bool IsLayerVisible( PCB_LAYER_ID aLayer ) const
454  {
455  return m_designSettings.IsLayerVisible( aLayer );
456  }
457 
464  LSET GetVisibleLayers() const;
465 
472  void SetVisibleLayers( LSET aLayerMask );
473 
474  // these 2 functions are not tidy at this time, since there are PCB_LAYER_IDs that
475  // are not stored in the bitmap.
476 
484  int GetVisibleElements() const;
485 
493  void SetVisibleElements( int aMask );
494 
500  void SetVisibleAlls();
501 
510  bool IsElementVisible( GAL_LAYER_ID aLayer ) const;
511 
519  void SetElementVisibility( GAL_LAYER_ID aLayer, bool aNewState );
520 
528  bool IsModuleLayerVisible( PCB_LAYER_ID aLayer );
529 
535  {
536  // remove const-ness with cast.
537  return (BOARD_DESIGN_SETTINGS&) m_designSettings;
538  }
539 
544  void SetDesignSettings( const BOARD_DESIGN_SETTINGS& aDesignSettings )
545  {
546  m_designSettings = aDesignSettings;
547  }
548 
549  const PAGE_INFO& GetPageSettings() const { return m_paper; }
550  void SetPageSettings( const PAGE_INFO& aPageSettings ) { m_paper = aPageSettings; }
551 
552  const PCB_PLOT_PARAMS& GetPlotOptions() const { return m_plotOptions; }
553  void SetPlotOptions( const PCB_PLOT_PARAMS& aOptions ) { m_plotOptions = aOptions; }
554 
555  TITLE_BLOCK& GetTitleBlock() { return m_titles; }
556  void SetTitleBlock( const TITLE_BLOCK& aTitleBlock ) { m_titles = aTitleBlock; }
557 
558  const ZONE_SETTINGS& GetZoneSettings() const { return m_zoneSettings; }
559  void SetZoneSettings( const ZONE_SETTINGS& aSettings ) { m_zoneSettings = aSettings; }
560 
561  wxString GetSelectMenuText( EDA_UNITS_T aUnits ) const override;
562 
567  const COLORS_DESIGN_SETTINGS& Colors() const { return *m_colorsSettings; }
568 
573  void SetColorsSettings( COLORS_DESIGN_SETTINGS* aColorsSettings )
574  {
575  m_colorsSettings = aColorsSettings;
576  }
592  bool GetBoardPolygonOutlines( SHAPE_POLY_SET& aOutlines,
593  wxString* aErrorText = nullptr, wxPoint* aErrorLocation = nullptr );
594 
606  void ConvertBrdLayerToPolygonalContours( PCB_LAYER_ID aLayer, SHAPE_POLY_SET& aOutlines );
607 
618  const PCB_LAYER_ID GetLayerID( const wxString& aLayerName ) const;
619 
630  const wxString GetLayerName( PCB_LAYER_ID aLayer ) const;
631 
641  bool SetLayerName( PCB_LAYER_ID aLayer, const wxString& aLayerName );
642 
654  static wxString GetStandardLayerName( PCB_LAYER_ID aLayerId )
655  {
656  // a BOARD's standard layer name is the PCB_LAYER_ID fixed name
657  return LSET::Name( aLayerId );
658  }
659 
668  bool SetLayerDescr( PCB_LAYER_ID aIndex, const LAYER& aLayer );
669 
678  LAYER_T GetLayerType( PCB_LAYER_ID aLayer ) const;
679 
688  bool SetLayerType( PCB_LAYER_ID aLayer, LAYER_T aLayerType );
689 
691  int GetNumSegmTrack() const;
692 
698  unsigned GetNodesCount( int aNet = -1 );
699 
704  unsigned GetUnconnectedNetCount() const;
705 
710  unsigned GetPadCount();
711 
716  D_PAD* GetPad( unsigned aIndex ) const;
717 
725  const std::vector<D_PAD*> GetPads();
726 
728  {
729  m_NetInfo.buildListOfNets();
730  }
731 
738  NETINFO_ITEM* FindNet( int aNetcode ) const;
739 
746  NETINFO_ITEM* FindNet( const wxString& aNetname ) const;
747 
749  {
750  return m_NetInfo;
751  }
752 
753 #ifndef SWIG
754 
759  {
760  return m_NetInfo.begin();
761  }
762 
768  {
769  return m_NetInfo.end();
770  }
771 #endif
772 
777  unsigned GetNetCount() const
778  {
779  return m_NetInfo.GetNetCount();
780  }
781 
788  EDA_RECT ComputeBoundingBox( bool aBoardEdgesOnly = false ) const;
789 
790  const EDA_RECT GetBoundingBox() const override
791  {
792  return ComputeBoundingBox( false );
793  }
794 
803  {
804  return ComputeBoundingBox( true );
805  }
806 
807  void GetMsgPanelInfo( EDA_UNITS_T aUnits, std::vector< MSG_PANEL_ITEM >& aList ) override;
808 
817  void Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC,
818  GR_DRAWMODE aDrawMode, const wxPoint& aOffset = ZeroOffset ) override;
819 
829  void DrawHighLight( EDA_DRAW_PANEL* aDrawPanel, wxDC* aDC, int aNetCode );
830 
844  SEARCH_RESULT Visit( INSPECTOR inspector, void* testData, const KICAD_T scanTypes[] ) override;
845 
855  MODULE* FindModuleByReference( const wxString& aReference ) const;
856 
866  MODULE* FindModule( const wxString& aRefOrTimeStamp, bool aSearchByTimeStamp = false ) const;
867 
875  int SortedNetnamesList( wxArrayString& aNames, bool aSortbyPadsCount );
876 
884  void SynchronizeNetsAndNetClasses();
885 
886  /***************************************************************************/
887 
888  wxString GetClass() const override
889  {
890  return wxT( "BOARD" );
891  }
892 
893 #if defined(DEBUG)
894  void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
895 #endif
896 
897 
898  /*************************/
899  /* Copper Areas handling */
900  /*************************/
901 
913  ZONE_CONTAINER* HitTestForAnyFilledArea( const wxPoint& aRefPos,
914  PCB_LAYER_ID aStartLayer,
915  PCB_LAYER_ID aEndLayer,
916  int aNetCode );
917 
922  void RedrawAreasOutlines( EDA_DRAW_PANEL* aPanel,
923  wxDC* aDC,
924  GR_DRAWMODE aDrawMode,
925  PCB_LAYER_ID aLayer );
926 
931  void RedrawFilledAreas( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDrawMode,
932  PCB_LAYER_ID aLayer );
933 
944  int SetAreasNetCodesFromNetNames( void );
945 
952  ZONE_CONTAINER* GetArea( int index ) const
953  {
954  if( (unsigned) index < m_ZoneDescriptorList.size() )
955  return m_ZoneDescriptorList[index];
956 
957  return NULL;
958  }
959 
966  int GetAreaIndex( const ZONE_CONTAINER* aArea ) const
967  {
968  for( int ii = 0; ii < GetAreaCount(); ii++ ) // Search for aArea in list
969  {
970  if( aArea == GetArea( ii ) ) // Found !
971  return ii;
972  }
973 
974  return -1;
975  }
976 
981  int GetAreaCount() const
982  {
983  return (int) m_ZoneDescriptorList.size();
984  }
985 
986  /* Functions used in test, merge and cut outlines */
987 
999  ZONE_CONTAINER* AddArea( PICKED_ITEMS_LIST* aNewZonesList, int aNetcode,
1000  PCB_LAYER_ID aLayer, wxPoint aStartPointPosition, int aHatch );
1001 
1012  ZONE_CONTAINER* InsertArea( int aNetcode, int aAreaIdx, PCB_LAYER_ID aLayer,
1013  int aCornerX, int aCornerY, int aHatch );
1014 
1024  bool NormalizeAreaPolygon( PICKED_ITEMS_LIST* aNewZonesList, ZONE_CONTAINER* aCurrArea );
1025 
1036  bool OnAreaPolygonModified( PICKED_ITEMS_LIST* aModifiedZonesList,
1037  ZONE_CONTAINER* modified_area );
1038 
1049  bool CombineAllAreasInNet( PICKED_ITEMS_LIST* aDeletedList,
1050  int aNetCode,
1051  bool aUseLocalFlags );
1052 
1060  void RemoveArea( PICKED_ITEMS_LIST* aDeletedList, ZONE_CONTAINER* area_to_remove );
1061 
1067  bool TestAreaIntersections( ZONE_CONTAINER* area_to_test );
1068 
1077  bool TestAreaIntersection( ZONE_CONTAINER* area_ref, ZONE_CONTAINER* area_to_test );
1078 
1090  bool CombineAreas( PICKED_ITEMS_LIST* aDeletedList,
1091  ZONE_CONTAINER* area_ref,
1092  ZONE_CONTAINER* area_to_combine );
1093 
1106  VIA* GetViaByPosition( const wxPoint& aPosition,
1107  PCB_LAYER_ID aLayer = PCB_LAYER_ID( -1 ) ) const;
1108 
1117  std::list<TRACK*> GetTracksByPosition( const wxPoint& aPosition, PCB_LAYER_ID aLayer = PCB_LAYER_ID( -1 ) ) const;
1118 
1127  D_PAD* GetPad( const wxPoint& aPosition, LSET aLayerMask );
1128  D_PAD* GetPad( const wxPoint& aPosition )
1129  {
1130  return GetPad( aPosition, LSET().set() );
1131  }
1132 
1141  D_PAD* GetPad( TRACK* aTrace, ENDPOINT_T aEndPoint );
1142 
1153  D_PAD* GetPadFast( const wxPoint& aPosition, LSET aLayerMask );
1154 
1170  D_PAD* GetPad( std::vector<D_PAD*>& aPadList, const wxPoint& aPosition, LSET aLayerMask );
1171 
1178  void PadDelete( D_PAD* aPad );
1179 
1192  void GetSortedPadListByXthenYCoord( std::vector<D_PAD*>& aVector, int aNetCode = -1 );
1193 
1207  TRACK* GetVisibleTrack( TRACK* aStartingTrace, const wxPoint& aPosition, LSET aLayerSet ) const;
1208 
1235  TRACK* MarkTrace( TRACK* aTrackList, TRACK* aTrace, int* aCount, double* aTraceLength,
1236  double* aInPackageLength, bool aReorder );
1237 
1245  TRACKS TracksInNet( int aNetCode );
1246 
1264  TRACKS TracksInNetBetweenPoints( const wxPoint& aStartPos, const wxPoint& aGoalPos, int aNetCode );
1265 
1280  MODULE* GetFootprint( const wxPoint& aPosition, PCB_LAYER_ID aActiveLayer,
1281  bool aVisibleOnly, bool aIgnoreLocked = false );
1282 
1296  BOARD_CONNECTED_ITEM* GetLockPoint( const wxPoint& aPosition, LSET aLayerMask );
1297 
1315  TRACK* CreateLockPoint( wxPoint& aPosition, TRACK* aSegment, PICKED_ITEMS_LIST* aList );
1316 
1321  void ClearAllNetCodes();
1322 
1323  void SanitizeNetcodes();
1324 };
1325 
1326 #endif // CLASS_BOARD_H_
void SetColorsSettings(COLORS_DESIGN_SETTINGS *aColorsSettings)
Function SetColorsSettings.
Definition: class_board.h:573
iterator end() const
Definition: netinfo.h:533
Wrapper class, so you can iterate through NETINFO_ITEM*s, not std::pair<int/wxString,...
Definition: netinfo.h:482
void SetFileFormatVersionAtLoad(int aVersion)
Definition: class_board.h:276
D_PAD * GetPad(const wxPoint &aPosition)
Definition: class_board.h:1128
void BuildListOfNets()
Definition: class_board.h:727
const EDA_RECT GetBoundingBox() const override
Function GetBoundingBox returns the orthogonal, bounding box of this object for display purposes.
Definition: class_board.h:790
Class ZONE_CONTAINER handles a list of polygons defining a copper zone.
Definition: class_zone.h:59
void SetZoneSettings(const ZONE_SETTINGS &aSettings)
Definition: class_board.h:559
const PAGE_INFO & GetPageSettings() const
Definition: class_board.h:549
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:230
const PCB_PLOT_PARAMS & GetPlotOptions() const
Definition: class_board.h:552
Definition: typeinfo.h:85
int GetMARKERCount() const
Function GetMARKERCount.
Definition: class_board.h:335
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:351
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:112
wxString m_fileName
the board filename
Definition: class_board.h:176
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,...
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:556
PAGE_INFO m_paper
Definition: class_board.h:197
const EDA_RECT GetBoardEdgesBoundingBox() const
Function GetBoardEdgesBoundingBox Returns the board bounding box calculated using exclusively the boa...
Definition: class_board.h:802
DLIST< BOARD_ITEM > & DrawingsList()
Definition: class_board.h:258
bool IsHighLightNetON() const
Function IsHighLightNetON.
Definition: class_board.h:383
void SetPageSettings(const PAGE_INFO &aPageSettings)
Definition: class_board.h:550
LAYER_T m_type
The type of the layer.
Definition: class_board.h:114
unsigned GetCount() const
Function GetCount returns the number of elements in the list.
Definition: dlist.h:126
COLORS_DESIGN_SETTINGS * m_colorsSettings
Definition: class_board.h:196
void ResetHighLight()
Function ResetHighLight Reset all high light data to the init state.
Definition: class_board.h:358
NETINFO_LIST::iterator EndNets() const
Function EndNets.
Definition: class_board.h:767
ZONE_CONTAINER * m_CurrentZoneContour
zone contour currently in progress
Definition: class_board.h:261
GAL_LAYER_ID
GAL layers are "virtual" layers, i.e.
void HighLightOFF()
Function HighLightOFF Disable highlight.
Definition: class_board.h:389
LAYER()
Definition: class_board.h:88
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:534
BOARD & operator=(const BOARD &aOther)
Definition: class_board.h:223
HIGH_LIGHT_INFO m_highLight
Definition: class_board.h:187
NETINFO_LIST m_NetInfo
net info list (name, design constraints ..
Definition: class_board.h:200
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:188
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:441
const wxString & GetFileName() const
Definition: class_board.h:237
Class TITLE_BLOCK holds the information shown in the lower right corner of a plot,...
Definition: title_block.h:40
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:199
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:344
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:758
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:102
ZONE_SETTINGS m_zoneSettings
Definition: class_board.h:195
PCB_LAYER_ID
A quick note on layer IDs:
int GetAreaCount() const
Function GetAreaCount.
Definition: class_board.h:981
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:252
unsigned GetNetCount() const
Function GetNetCount.
Definition: class_board.h:777
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:411
GR_DRAWMODE
Drawmode. Compositing mode plus a flag or two.
Definition: gr_basic.h:37
Class SHAPE_POLY_SET.
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
iterator begin() const
Definition: netinfo.h:528
LAYER_T
Enum LAYER_T gives the allowed types of layers, same as Specctra DSN spec.
Definition: class_board.h:72
std::shared_ptr< CONNECTIVITY_DATA > GetConnectivity() const
Function GetConnectivity() returns list of missing connections between components/tracks.
Definition: class_board.h:292
TITLE_BLOCK m_titles
text in lower right of screen and plots
Definition: class_board.h:198
bool m_visible
Definition: class_board.h:116
ENDPOINT_T
Definition: class_track.h:50
#define DECL_VEC_FOR_SWIG(TypeName, MemberType)
Declare a std::vector but no swig template.
Definition: macros.h:157
DLIST< BOARD_ITEM > m_Drawings
Definition: class_board.h:244
void SetDesignSettings(const BOARD_DESIGN_SETTINGS &aDesignSettings)
Function SetDesignSettings.
Definition: class_board.h:544
MARKERS m_markers
MARKER_PCBs for clearance problems, owned by pointer.
Definition: class_board.h:179
void SetFileName(const wxString &aFileName)
Definition: class_board.h:235
const wxPoint & GetAuxOrigin() const
Definition: class_board.h:345
void SetPlotOptions(const PCB_PLOT_PARAMS &aOptions)
Definition: class_board.h:553
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:748
const wxPoint & GetGridOrigin() const
Definition: class_board.h:352
Pad object description.
int GetFileFormatVersionAtLoad() const
Definition: class_board.h:277
void HighLightON()
Function HighLightON Enable highlight.
Definition: class_board.h:396
Class COMPONENT is used to store components and all of their related information found in a netlist.
Definition: pcb_netlist.h:83
Class ZONE_SETTINGS handles zones parameters.
Definition: zone_settings.h:49
MARKER_PCB * GetMARKER(int index) const
Function GetMARKER returns the MARKER at a given index.
Definition: class_board.h:323
int GetHighLightNetCode() const
Function GetHighLightNetCode.
Definition: class_board.h:368
void SetHighLightNet(int aNetCode)
Function SetHighLightNet.
Definition: class_board.h:374
void clear()
Definition: class_board.h:93
const COLORS_DESIGN_SETTINGS & Colors() const
Function GetColorSettings.
Definition: class_board.h:567
Class 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:453
ZONE_CONTAINERS & Zones()
Definition: class_board.h:254
TITLE_BLOCK & GetTitleBlock()
Definition: class_board.h:555
Board layer functions and definitions.
int m_fileFormatVersionAtLoad
the version loaded from the file
Definition: class_board.h:190
Class LAYER holds information pertinent to a layer of a BOARD.
Definition: class_board.h:86
Class BOARD holds information pertinent to a Pcbnew printed circuit board.
Definition: class_board.h:170
DLIST< MODULE > m_Modules
Definition: class_board.h:248
ZONE_CONTAINERS m_ZoneDescriptorList
edge zone descriptors, owned by pointer.
Definition: class_board.h:182
std::shared_ptr< CONNECTIVITY_DATA > m_connectivity
Definition: class_board.h:192
Class EDA_RECT handles the component boundary box.
Definition: eda_rect.h:44
Class PCB_EDIT_FRAME is the main frame for Pcbnew.
const ZONE_SETTINGS & GetZoneSettings() const
Definition: class_board.h:558
Class EDA_ITEM is a base class for most all the KiCad significant classes, used in schematics and boa...
Definition: base_struct.h:157
The common library.
wxString GetClass() const override
Function GetClass returns the class name.
Definition: class_board.h:888
Class COLORS_DESIGN_SETTINGS is a list of color settings for designs in Pcbnew.
unsigned GetNetCount() const
Function GetNetCount.
Definition: netinfo.h:438
DLIST_ITERATOR_WRAPPER< TRACK > Tracks()
Definition: class_board.h:251
DLIST< TRACK > m_Track
Definition: class_board.h:249
BOARD_DESIGN_SETTINGS m_designSettings
Definition: class_board.h:194
ZONE_CONTAINER * GetArea(int index) const
Function GetArea returns the Area (Zone Container) at a given index.
Definition: class_board.h:952
Abstract interface for BOARD_ITEMs capable of storing other items inside.
int m_number
Definition: class_board.h:118
Class 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:966
bool IsElementVisible(GAL_LAYER_ID aElement) const
Function IsElementVisible tests whether a given element category is visible.
SEARCH_RESULT
Definition: base_struct.h:66
bool IsEmpty() const
Definition: class_board.h:269
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:157
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:253
KICAD_T Type() const
Function Type()
Definition: base_struct.h:204
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:654
Class BOARD_DESIGN_SETTINGS contains design settings for a BOARD object.
int m_Status_Pcb
Flags used in ratsnest calculation and update.
Definition: class_board.h:240