KiCad PCB EDA Suite
Loading...
Searching...
No Matches
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, [email protected]
5 * Copyright (C) 1992-2023 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
29#include <common.h> // Needed for stl hash extensions
30#include <convert_shape_list_to_polygon.h> // for OUTLINE_ERROR_HANDLER
31#include <hash.h>
32#include <layer_ids.h>
33#include <netinfo.h>
34#include <pcb_item_containers.h>
35#include <pcb_plot_params.h>
36#include <title_block.h>
37#include <tools/pcb_selection.h>
38#include <mutex>
39#include <list>
40
43class BOARD_COMMIT;
44class DRC_RTREE;
45class PCB_BASE_FRAME;
46class PCB_EDIT_FRAME;
48class BOARD;
49class FOOTPRINT;
50class ZONE;
51class PCB_TRACK;
52class PAD;
53class PCB_GROUP;
54class PCB_MARKER;
55class MSG_PANEL_ITEM;
56class NETLIST;
57class REPORTER;
58class SHAPE_POLY_SET;
60class COMPONENT;
61class PROJECT;
63struct ISOLATED_ISLANDS;
64
65// The default value for m_outlinesChainingEpsilon to convert a board outlines to polygons
66// It is the max dist between 2 end points to see them connected
67#define DEFAULT_CHAINING_EPSILON_MM 0.01
68
69// Forward declare endpoint from class_track.h
70enum ENDPOINT_T : int;
71
72
74{
77
78 bool operator==(const PTR_PTR_CACHE_KEY& other) const
79 {
80 return A == other.A && B == other.B;
81 }
82};
83
85{
88
89 bool operator==(const PTR_LAYER_CACHE_KEY& other) const
90 {
91 return A == other.A && Layer == other.Layer;
92 }
93};
94
96{
100
101 bool operator==(const PTR_PTR_LAYER_CACHE_KEY& other) const
102 {
103 return A == other.A && B == other.B && Layer == other.Layer;
104 }
105};
106
107namespace std
108{
109 template <>
110 struct hash<PTR_PTR_CACHE_KEY>
111 {
112 std::size_t operator()( const PTR_PTR_CACHE_KEY& k ) const
113 {
114 std::size_t seed = 0xa82de1c0;
115 hash_combine( seed, k.A, k.B );
116 return seed;
117 }
118 };
119
120 template <>
122 {
123 std::size_t operator()( const PTR_LAYER_CACHE_KEY& k ) const
124 {
125 std::size_t seed = 0xa82de1c0;
126 hash_combine( seed, k.A, k.Layer );
127 return seed;
128 }
129 };
130
131 template <>
133 {
134 std::size_t operator()( const PTR_PTR_LAYER_CACHE_KEY& k ) const
135 {
136 std::size_t seed = 0xa82de1c0;
137 hash_combine( seed, k.A, k.B, k.Layer );
138 return seed;
139 }
140 };
141}
142
143
148{
155
156
160struct LAYER
161{
163 {
164 clear();
165 }
166
167 void clear()
168 {
170 m_visible = true;
171 m_number = 0;
172 m_name.clear();
173 m_userName.clear();
174 }
175
176 /*
177 LAYER( const wxString& aName = wxEmptyString,
178 LAYER_T aType = LT_SIGNAL, bool aVisible = true, int aNumber = -1 ) :
179 m_name( aName ),
180 m_type( aType ),
181 m_visible( aVisible ),
182 m_number( aNumber )
183 {
184 }
185 */
186
187 wxString m_name;
188 wxString m_userName;
192
199 static const char* ShowType( LAYER_T aType );
200
208 static LAYER_T ParseType( const char* aType );
209};
210
211
212// Helper class to handle high light nets
214{
215protected:
216 std::set<int> m_netCodes; // net(s) selected for highlight (-1 when no net selected )
217 bool m_highLightOn; // highlight active
218
219 void Clear()
220 {
221 m_netCodes.clear();
222 m_highLightOn = false;
223 }
224
226 {
227 Clear();
228 }
229
230private:
231 friend class BOARD;
232};
233
239class BOARD;
240
242{
243public:
244 virtual ~BOARD_LISTENER() { }
245 virtual void OnBoardItemAdded( BOARD& aBoard, BOARD_ITEM* aBoardItem ) { }
246 virtual void OnBoardItemsAdded( BOARD& aBoard, std::vector<BOARD_ITEM*>& aBoardItem ) { }
247 virtual void OnBoardItemRemoved( BOARD& aBoard, BOARD_ITEM* aBoardItem ) { }
248 virtual void OnBoardItemsRemoved( BOARD& aBoard, std::vector<BOARD_ITEM*>& aBoardItem ) { }
249 virtual void OnBoardNetSettingsChanged( BOARD& aBoard ) { }
250 virtual void OnBoardItemChanged( BOARD& aBoard, BOARD_ITEM* aBoardItem ) { }
251 virtual void OnBoardItemsChanged( BOARD& aBoard, std::vector<BOARD_ITEM*>& aBoardItem ) { }
252 virtual void OnBoardHighlightNetChanged( BOARD& aBoard ) { }
253};
254
255
259enum class BOARD_USE
260{
261 NORMAL, // A normal board
262 FPHOLDER // A board that holds a single footprint
263};
264
265
270{
271public:
272 static inline bool ClassOf( const EDA_ITEM* aItem )
273 {
274 return aItem && PCB_T == aItem->Type();
275 }
276
282 void SetBoardUse( BOARD_USE aUse ) { m_boardUse = aUse; }
283
289 BOARD_USE GetBoardUse() const { return m_boardUse; }
290
291 void IncrementTimeStamp();
292
293 int GetTimeStamp() const { return m_timeStamp; }
294
300 bool IsFootprintHolder() const
301 {
302 return m_boardUse == BOARD_USE::FPHOLDER;
303 }
304
305 void SetFileName( const wxString& aFileName ) { m_fileName = aFileName; }
306
307 const wxString &GetFileName() const { return m_fileName; }
308
309 TRACKS& Tracks() { return m_tracks; }
310 const TRACKS& Tracks() const { return m_tracks; }
311
312 FOOTPRINTS& Footprints() { return m_footprints; }
313 const FOOTPRINTS& Footprints() const { return m_footprints; }
314
315 DRAWINGS& Drawings() { return m_drawings; }
316 const DRAWINGS& Drawings() const { return m_drawings; }
317
318 ZONES& Zones() { return m_zones; }
319 const ZONES& Zones() const { return m_zones; }
320
321 MARKERS& Markers() { return m_markers; }
322 const MARKERS& Markers() const { return m_markers; }
323
324 const std::set<BOARD_ITEM*> GetItemSet();
325
334 GROUPS& Groups() { return m_groups; }
335 const GROUPS& Groups() const { return m_groups; }
336
337 const std::vector<BOARD_CONNECTED_ITEM*> AllConnectedItems();
338
339 const std::map<wxString, wxString>& GetProperties() const { return m_properties; }
340 void SetProperties( const std::map<wxString, wxString>& aProps ) { m_properties = aProps; }
341
342 void GetContextualTextVars( wxArrayString* aVars ) const;
343 bool ResolveTextVar( wxString* token, int aDepth ) const;
344
348
352
355
356 BOARD();
357 ~BOARD();
358
359 VECTOR2I GetPosition() const override;
360 void SetPosition( const VECTOR2I& aPos ) override;
361 const VECTOR2I GetFocusPosition() const override { return GetBoundingBox().GetCenter(); }
362
363 bool IsEmpty() const
364 {
365 return m_drawings.empty() && m_footprints.empty() && m_tracks.empty() && m_zones.empty();
366 }
367
368 void Move( const VECTOR2I& aMoveVector ) override;
369
370 void SetFileFormatVersionAtLoad( int aVersion ) { m_fileFormatVersionAtLoad = aVersion; }
372
373 void SetGenerator( const wxString& aGenerator ) { m_generator = aGenerator; }
374 const wxString& GetGenerator() const { return m_generator; }
375
377 void Add( BOARD_ITEM* aItem, ADD_MODE aMode = ADD_MODE::INSERT,
378 bool aSkipConnectivity = false ) override;
379
381 void Remove( BOARD_ITEM* aBoardItem, REMOVE_MODE aMode = REMOVE_MODE::NORMAL ) override;
382
387 void FinalizeBulkAdd( std::vector<BOARD_ITEM*>& aNewItems );
388
393 void FinalizeBulkRemove( std::vector<BOARD_ITEM*>& aRemovedItems );
394
395 void CacheTriangulation( PROGRESS_REPORTER* aReporter = nullptr,
396 const std::vector<ZONE*>& aZones = {} );
397
406 {
407 return m_footprints.empty() ? nullptr : m_footprints.front();
408 }
409
413 void DeleteAllFootprints();
414
418 BOARD_ITEM* GetItem( const KIID& aID ) const;
419
420 void FillItemMap( std::map<KIID, EDA_ITEM*>& aMap );
421
425 wxString ConvertCrossReferencesToKIIDs( const wxString& aSource ) const;
426 wxString ConvertKIIDsToCrossReferences( const wxString& aSource ) const;
427
432 std::shared_ptr<CONNECTIVITY_DATA> GetConnectivity() const { return m_connectivity; }
433
439 bool BuildConnectivity( PROGRESS_REPORTER* aReporter = nullptr );
440
444 void DeleteMARKERs();
445
446 void DeleteMARKERs( bool aWarningsAndErrors, bool aExclusions );
447
448 PROJECT* GetProject() const { return m_project; }
449
458 void SetProject( PROJECT* aProject, bool aReferenceOnly = false );
459
460 void ClearProject();
461
469 std::vector<PCB_MARKER*> ResolveDRCExclusions( bool aCreateMarkers );
470
475
479 void ResetNetHighLight();
480
484 const std::set<int>& GetHighLightNetCodes() const
485 {
486 return m_highLight.m_netCodes;
487 }
488
495 void SetHighLightNet( int aNetCode, bool aMulti = false );
496
501
509 void HighLightON( bool aValue = true );
510
515 {
516 HighLightON( false );
517 }
518
522 int GetCopperLayerCount() const;
523 void SetCopperLayerCount( int aCount );
524
525 int LayerDepth( PCB_LAYER_ID aStartLayer, PCB_LAYER_ID aEndLayer ) const;
526
532 LSET GetEnabledLayers() const;
533
539 void SetEnabledLayers( LSET aLayerMask );
540
547 bool IsLayerEnabled( PCB_LAYER_ID aLayer ) const;
548
556 bool IsLayerVisible( PCB_LAYER_ID aLayer ) const;
557
563 LSET GetVisibleLayers() const;
564
571 void SetVisibleLayers( LSET aLayerMask );
572
573 // these 2 functions are not tidy at this time, since there are PCB_LAYER_IDs that
574 // are not stored in the bitmap.
575
583
590 void SetVisibleElements( const GAL_SET& aMask );
591
597 void SetVisibleAlls();
598
606 bool IsElementVisible( GAL_LAYER_ID aLayer ) const;
607
615 void SetElementVisibility( GAL_LAYER_ID aLayer, bool aNewState );
616
624 bool IsFootprintLayerVisible( PCB_LAYER_ID aLayer ) const;
625
630
631 const ZONE_SETTINGS& GetZoneSettings() const override;
632
633 void SetZoneSettings( const ZONE_SETTINGS& aSettings ) override;
634
636 void SetTentVias( bool aFlag ) { m_plotOptions.SetPlotViaOnMaskLayer( !aFlag ); }
637
638 const PAGE_INFO& GetPageSettings() const { return m_paper; }
639 void SetPageSettings( const PAGE_INFO& aPageSettings ) { m_paper = aPageSettings; }
640
642 void SetPlotOptions( const PCB_PLOT_PARAMS& aOptions ) { m_plotOptions = aOptions; }
643
645 const TITLE_BLOCK& GetTitleBlock() const { return m_titles; }
646 void SetTitleBlock( const TITLE_BLOCK& aTitleBlock ) { m_titles = aTitleBlock; }
647
648 wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override;
649
651 void SetUserUnits( EDA_UNITS aUnits ) { m_userUnits = aUnits; }
652
657 void UpdateUserUnits( BOARD_ITEM* aItem, KIGFX::VIEW* aView );
658
674 OUTLINE_ERROR_HANDLER* aErrorHandler = nullptr,
675 bool aAllowUseArcsInPolygons = false );
676
686
697 void ConvertBrdLayerToPolygonalContours( PCB_LAYER_ID aLayer, SHAPE_POLY_SET& aOutlines ) const;
698
702 PCB_LAYER_ID GetLayerID( const wxString& aLayerName ) const;
703
710 const wxString GetLayerName( PCB_LAYER_ID aLayer ) const;
711
719 bool SetLayerName( PCB_LAYER_ID aLayer, const wxString& aLayerName );
720
731 static wxString GetStandardLayerName( PCB_LAYER_ID aLayerId )
732 {
733 // a BOARD's standard layer name is the PCB_LAYER_ID fixed name
734 return LayerName( aLayerId );
735 }
736
744 bool SetLayerDescr( PCB_LAYER_ID aIndex, const LAYER& aLayer );
745
752 LAYER_T GetLayerType( PCB_LAYER_ID aLayer ) const;
753
761 bool SetLayerType( PCB_LAYER_ID aLayer, LAYER_T aLayerType );
762
767 unsigned GetNodesCount( int aNet = -1 ) const;
768
777 const std::vector<PAD*> GetPads() const;
778
780 {
782 }
783
790 NETINFO_ITEM* FindNet( int aNetcode ) const;
791
798 NETINFO_ITEM* FindNet( const wxString& aNetname ) const;
799
801 {
802 return m_NetInfo;
803 }
804
806 {
807 return m_NetInfo;
808 }
809
810#ifndef SWIG
815 {
816 return m_NetInfo.begin();
817 }
818
823 {
824 return m_NetInfo.end();
825 }
826#endif
827
831 unsigned GetNetCount() const
832 {
833 return m_NetInfo.GetNetCount();
834 }
835
842 BOX2I ComputeBoundingBox( bool aBoardEdgesOnly = false ) const;
843
844 const BOX2I GetBoundingBox() const override
845 {
846 return ComputeBoundingBox( false );
847 }
848
859 {
860 return ComputeBoundingBox( true );
861 }
862
863 void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList ) override;
864
876 INSPECT_RESULT Visit( INSPECTOR inspector, void* testData,
877 const std::vector<KICAD_T>& scanTypes ) override;
878
887 FOOTPRINT* FindFootprintByReference( const wxString& aReference ) const;
888
895 FOOTPRINT* FindFootprintByPath( const KIID_PATH& aPath ) const;
896
900 std::set<wxString> GetNetClassAssignmentCandidates() const;
901
909 void SynchronizeNetsAndNetClasses( bool aResetTrackAndViaSizes );
910
915
916 wxString GetClass() const override
917 {
918 return wxT( "BOARD" );
919 }
920
921#if defined(DEBUG)
922 void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
923#endif
924
925
926 /*************************/
927 /* Copper Areas handling */
928 /*************************/
929
940
947 ZONE* GetArea( int index ) const
948 {
949 if( (unsigned) index < m_zones.size() )
950 return m_zones[index];
951
952 return nullptr;
953 }
954
958 std::list<ZONE*> GetZoneList( bool aIncludeZonesInFootprints = false ) const;
959
963 int GetAreaCount() const
964 {
965 return static_cast<int>( m_zones.size() );
966 }
967
968 /* Functions used in test, merge and cut outlines */
969
982 ZONE* AddArea( PICKED_ITEMS_LIST* aNewZonesList, int aNetcode, PCB_LAYER_ID aLayer,
983 VECTOR2I aStartPointPosition, ZONE_BORDER_DISPLAY_STYLE aHatch );
984
992 bool TestZoneIntersection( ZONE* aZone1, ZONE* aZone2 );
993
1001 PAD* GetPad( const VECTOR2I& aPosition, LSET aLayerMask ) const;
1002 PAD* GetPad( const VECTOR2I& aPosition ) const
1003 {
1004 return GetPad( aPosition, LSET().set() );
1005 }
1006
1014 PAD* GetPad( const PCB_TRACK* aTrace, ENDPOINT_T aEndPoint ) const;
1015
1025 PAD* GetPadFast( const VECTOR2I& aPosition, LSET aLayerMask ) const;
1026
1041 PAD* GetPad( std::vector<PAD*>& aPadList, const VECTOR2I& aPosition, LSET aLayerMask ) const;
1042
1054 void GetSortedPadListByXthenYCoord( std::vector<PAD*>& aVector, int aNetCode = -1 ) const;
1055
1063 std::tuple<int, double, double> GetTrackLength( const PCB_TRACK& aTrack ) const;
1064
1072 TRACKS TracksInNet( int aNetCode );
1073
1086 FOOTPRINT* GetFootprint( const VECTOR2I& aPosition, PCB_LAYER_ID aActiveLayer,
1087 bool aVisibleOnly, bool aIgnoreLocked = false ) const;
1088
1094 void MapNets( const BOARD* aDestBoard );
1095
1096 void SanitizeNetcodes();
1097
1106 void AddListener( BOARD_LISTENER* aListener );
1107
1112 void RemoveListener( BOARD_LISTENER* aListener );
1113
1117 void RemoveAllListeners();
1118
1123 void OnItemChanged( BOARD_ITEM* aItem );
1124
1129 void OnItemsChanged( std::vector<BOARD_ITEM*>& aItems );
1130
1137 wxString GroupsSanityCheck( bool repair = false );
1138
1144 wxString GroupsSanityCheckInternal( bool repair );
1145
1147 {
1148 bool create : 1;
1149 bool ungroup : 1;
1150 bool removeItems : 1;
1151 };
1152
1158 GroupLegalOpsField GroupLegalOps( const PCB_SELECTION& selection ) const;
1159
1160 bool LegacyTeardrops() const { return m_legacyTeardrops; }
1161 void SetLegacyTeardrops( bool aFlag ) { m_legacyTeardrops = aFlag; }
1162
1163 // --------- Item order comparators ---------
1164
1166 {
1167 bool operator() ( const BOARD_ITEM* aFirst, const BOARD_ITEM* aSecond ) const;
1168 };
1169
1171 {
1172 bool operator()( const BOARD_ITEM* aFirst, const BOARD_ITEM* aSecond ) const;
1173 };
1174
1175 // ------------ Run-time caches -------------
1176 std::mutex m_CachesMutex;
1177 std::unordered_map<PTR_PTR_CACHE_KEY, bool> m_IntersectsCourtyardCache;
1178 std::unordered_map<PTR_PTR_CACHE_KEY, bool> m_IntersectsFCourtyardCache;
1179 std::unordered_map<PTR_PTR_CACHE_KEY, bool> m_IntersectsBCourtyardCache;
1180 std::unordered_map<PTR_PTR_LAYER_CACHE_KEY, bool> m_IntersectsAreaCache;
1181 std::unordered_map<PTR_PTR_LAYER_CACHE_KEY, bool> m_EnclosedByAreaCache;
1182 std::unordered_map< wxString, LSET > m_LayerExpressionCache;
1183 std::unordered_map<ZONE*, std::unique_ptr<DRC_RTREE>> m_CopperZoneRTreeCache;
1184 std::shared_ptr<DRC_RTREE> m_CopperItemRTreeCache;
1185 mutable std::unordered_map<const ZONE*, BOX2I> m_ZoneBBoxCache;
1186
1187 // ------------ DRC caches -------------
1188 std::vector<ZONE*> m_DRCZones;
1189 std::vector<ZONE*> m_DRCCopperZones;
1193 std::map<ZONE*, std::map<PCB_LAYER_ID, ISOLATED_ISLANDS>> m_ZoneIsolatedIslandsMap;
1194
1195private:
1196 // The default copy constructor & operator= are inadequate,
1197 // either write one or do not use it at all
1198 BOARD( const BOARD& aOther ) = delete;
1199
1200 BOARD& operator=( const BOARD& aOther ) = delete;
1201
1202 template <typename Func, typename... Args>
1203 void InvokeListeners( Func&& aFunc, Args&&... args )
1204 {
1205 for( auto&& l : m_listeners )
1206 ( l->*aFunc )( std::forward<Args>( args )... );
1207 }
1208
1209 friend class PCB_EDIT_FRAME;
1210
1211
1214
1217 int m_timeStamp; // actually a modification counter
1218
1219 wxString m_fileName;
1220 MARKERS m_markers;
1221 DRAWINGS m_drawings;
1222 FOOTPRINTS m_footprints;
1223 TRACKS m_tracks;
1224 GROUPS m_groups;
1226
1228
1229 HIGH_LIGHT_INFO m_highLight; // current high light data
1230 HIGH_LIGHT_INFO m_highLightPrevious; // a previously stored high light data
1231
1232 int m_fileFormatVersionAtLoad; // the version loaded from the file
1233 wxString m_generator; // the generator tag from the file
1234
1235 std::map<wxString, wxString> m_properties;
1236 std::shared_ptr<CONNECTIVITY_DATA> m_connectivity;
1237
1239 TITLE_BLOCK m_titles; // text in lower right of screen and plots
1241 PROJECT* m_project; // project this board is a part of
1243
1254 std::unique_ptr<BOARD_DESIGN_SETTINGS> m_designSettings;
1255
1260 bool m_legacyTeardrops = false;
1261
1262 NETINFO_LIST m_NetInfo; // net info list (name, design constraints...
1263
1264 std::vector<BOARD_LISTENER*> m_listeners;
1265};
1266
1267
1268#endif // CLASS_BOARD_H_
BOARD_USE
Flags to specify how the board is being used.
Definition: board.h:260
LAYER_T
The allowed types of layers, same as Specctra DSN spec.
Definition: board.h:148
@ LT_POWER
Definition: board.h:151
@ LT_MIXED
Definition: board.h:152
@ LT_UNDEFINED
Definition: board.h:149
@ LT_JUMPER
Definition: board.h:153
@ LT_SIGNAL
Definition: board.h:150
A base class derived from BOARD_ITEM for items that can be connected and have a net,...
Container for design settings for a BOARD object.
Abstract interface for BOARD_ITEMs capable of storing other items inside.
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Definition: board_item.h:71
wxString GetLayerName() const
Return the name of the PCB layer on which the item resides.
Definition: board_item.cpp:95
virtual void OnBoardNetSettingsChanged(BOARD &aBoard)
Definition: board.h:249
virtual void OnBoardItemsAdded(BOARD &aBoard, std::vector< BOARD_ITEM * > &aBoardItem)
Definition: board.h:246
virtual void OnBoardItemsChanged(BOARD &aBoard, std::vector< BOARD_ITEM * > &aBoardItem)
Definition: board.h:251
virtual void OnBoardItemChanged(BOARD &aBoard, BOARD_ITEM *aBoardItem)
Definition: board.h:250
virtual void OnBoardItemRemoved(BOARD &aBoard, BOARD_ITEM *aBoardItem)
Definition: board.h:247
virtual void OnBoardItemAdded(BOARD &aBoard, BOARD_ITEM *aBoardItem)
Definition: board.h:245
virtual void OnBoardHighlightNetChanged(BOARD &aBoard)
Definition: board.h:252
virtual ~BOARD_LISTENER()
Definition: board.h:244
virtual void OnBoardItemsRemoved(BOARD &aBoard, std::vector< BOARD_ITEM * > &aBoardItem)
Definition: board.h:248
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:270
INSPECT_RESULT Visit(INSPECTOR inspector, void *testData, const std::vector< KICAD_T > &scanTypes) override
May be re-implemented for each derived class in order to handle all the types given by its member dat...
Definition: board.cpp:1407
void GetContextualTextVars(wxArrayString *aVars) const
Definition: board.cpp:355
bool IsFootprintLayerVisible(PCB_LAYER_ID aLayer) const
Expect either of the two layers on which a footprint can reside, and returns whether that layer is vi...
Definition: board.cpp:716
void SetPlotOptions(const PCB_PLOT_PARAMS &aOptions)
Definition: board.h:642
std::unordered_map< PTR_PTR_LAYER_CACHE_KEY, bool > m_EnclosedByAreaCache
Definition: board.h:1181
std::map< ZONE *, std::map< PCB_LAYER_ID, ISOLATED_ISLANDS > > m_ZoneIsolatedIslandsMap
Definition: board.h:1193
void OnItemChanged(BOARD_ITEM *aItem)
Notify the board and its listeners that an item on the board has been modified in some way.
Definition: board.cpp:2127
const NETINFO_LIST & GetNetInfo() const
Definition: board.h:800
bool m_LegacyDesignSettingsLoaded
True if the legacy board design settings were loaded from a file.
Definition: board.h:350
bool IsFootprintHolder() const
Find out if the board is being used to hold a single footprint for editing/viewing.
Definition: board.h:300
LSET GetEnabledLayers() const
A proxy function that calls the corresponding function in m_BoardSettings.
Definition: board.cpp:611
void SetPosition(const VECTOR2I &aPos) override
Definition: board.cpp:418
std::map< wxString, wxString > m_properties
Definition: board.h:1235
int m_fileFormatVersionAtLoad
Definition: board.h:1232
NETINFO_LIST & GetNetInfo()
Definition: board.h:805
LSET GetVisibleLayers() const
A proxy function that calls the correspondent function in m_BoardSettings.
Definition: board.cpp:625
void SetTentVias(bool aFlag)
Definition: board.h:636
std::vector< ZONE * > m_DRCCopperZones
Definition: board.h:1189
bool GetBoardPolygonOutlines(SHAPE_POLY_SET &aOutlines, OUTLINE_ERROR_HANDLER *aErrorHandler=nullptr, bool aAllowUseArcsInPolygons=false)
Extract the board outlines and build a closed polygon from lines, arcs and circle items on edge cut l...
Definition: board.cpp:2027
BOARD_USE GetBoardUse() const
Get what the board use is.
Definition: board.h:289
void Add(BOARD_ITEM *aItem, ADD_MODE aMode=ADD_MODE::INSERT, bool aSkipConnectivity=false) override
Removes an item from the container.
Definition: board.cpp:796
const std::set< int > & GetHighLightNetCodes() const
Definition: board.h:484
bool m_legacyTeardrops
Teardrops in 7.0 were applied as a post-processing step (rather than from pad and via properties).
Definition: board.h:1260
TITLE_BLOCK m_titles
Definition: board.h:1239
GAL_SET m_LegacyVisibleItems
Definition: board.h:347
void SetBoardUse(BOARD_USE aUse)
Set what the board is going to be used for.
Definition: board.h:282
ZONE * GetArea(int index) const
Return the Zone at a given index.
Definition: board.h:947
const BOX2I GetBoardEdgesBoundingBox() const
Return the board bounding box calculated using exclusively the board edges (graphics on Edge....
Definition: board.h:858
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
Definition: board.h:844
void SetZoneSettings(const ZONE_SETTINGS &aSettings) override
Set the zone settings for this container.
Definition: board.cpp:740
void BuildListOfNets()
Definition: board.h:779
PAD * GetPadFast(const VECTOR2I &aPosition, LSET aLayerMask) const
Return pad found at aPosition on aLayerMask using the fast search method.
Definition: board.cpp:1693
LAYER m_layers[PCB_LAYER_ID_COUNT]
Definition: board.h:1227
void SetFileName(const wxString &aFileName)
Definition: board.h:305
static wxString GetStandardLayerName(PCB_LAYER_ID aLayerId)
Return an "English Standard" name of a PCB layer when given aLayerNumber.
Definition: board.h:731
const std::vector< BOARD_CONNECTED_ITEM * > AllConnectedItems()
Definition: board.cpp:2058
bool IsElementVisible(GAL_LAYER_ID aLayer) const
Test whether a given element category is visible.
Definition: board.cpp:677
int m_outlinesChainingEpsilon
the max distance between 2 end point to see them connected when building the board outlines
Definition: board.h:1213
std::set< wxString > GetNetClassAssignmentCandidates() const
Return the set of netname candidates for netclass assignment.
Definition: board.cpp:1578
BOARD_USE m_boardUse
What is this board being used for.
Definition: board.h:1216
PAGE_INFO m_paper
Definition: board.h:1238
const ZONE_SETTINGS & GetZoneSettings() const override
Fetch the zone settings for this container.
Definition: board.cpp:734
void MapNets(const BOARD *aDestBoard)
Map all nets in the given board to nets with the same name (if any) in the destination board.
Definition: board.cpp:2078
void RemoveAllListeners()
Remove all listeners.
Definition: board.cpp:2121
FOOTPRINTS m_footprints
Definition: board.h:1222
std::unique_ptr< BOARD_DESIGN_SETTINGS > m_designSettings
All of the board design settings are stored as a JSON object inside the project file.
Definition: board.h:1254
void SetEnabledLayers(LSET aLayerMask)
A proxy function that calls the correspondent function in m_BoardSettings.
Definition: board.cpp:631
void AddListener(BOARD_LISTENER *aListener)
Add a listener to the board to receive calls whenever something on the board has been modified.
Definition: board.cpp:2102
const PAGE_INFO & GetPageSettings() const
Definition: board.h:638
void UpdateUserUnits(BOARD_ITEM *aItem, KIGFX::VIEW *aView)
Update any references within aItem (or its descendants) to the user units.
Definition: board.cpp:1002
void SetProperties(const std::map< wxString, wxString > &aProps)
Definition: board.h:340
BOARD(const BOARD &aOther)=delete
GAL_SET GetVisibleElements() const
Return a set of all the element categories that are visible.
Definition: board.cpp:671
ZONES & Zones()
Definition: board.h:318
void SetHighLightNet(int aNetCode, bool aMulti=false)
Select the netcode to be highlighted.
Definition: board.cpp:2148
HIGH_LIGHT_INFO m_highLight
Definition: board.h:1229
bool SetLayerDescr(PCB_LAYER_ID aIndex, const LAYER &aLayer)
Return the type of the copper layer given by aLayer.
Definition: board.cpp:466
NETINFO_ITEM * FindNet(int aNetcode) const
Search for a net with the given netcode.
Definition: board.cpp:1533
EDA_UNITS m_userUnits
Definition: board.h:1242
BOARD_ITEM * GetItem(const KIID &aID) const
Definition: board.cpp:1069
const ZONES & Zones() const
Definition: board.h:319
void InvokeListeners(Func &&aFunc, Args &&... args)
Definition: board.h:1203
void SanitizeNetcodes()
Definition: board.cpp:2092
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider) const override
Return a user-visible description string of this item.
Definition: board.cpp:996
ZONE * AddArea(PICKED_ITEMS_LIST *aNewZonesList, int aNetcode, PCB_LAYER_ID aLayer, VECTOR2I aStartPointPosition, ZONE_BORDER_DISPLAY_STYLE aHatch)
Add an empty copper area to board areas list.
Definition: board.cpp:2002
const GROUPS & Groups() const
Definition: board.h:335
~BOARD()
Definition: board.cpp:127
const std::set< BOARD_ITEM * > GetItemSet()
Definition: board.cpp:2408
bool BuildConnectivity(PROGRESS_REPORTER *aReporter=nullptr)
Build or rebuild the board connectivity database for the board, especially the list of connected item...
Definition: board.cpp:168
bool IsLayerEnabled(PCB_LAYER_ID aLayer) const
A proxy function that calls the correspondent function in m_BoardSettings tests whether a given layer...
Definition: board.cpp:637
LAYER_T GetLayerType(PCB_LAYER_ID aLayer) const
Return the type of the copper layer given by aLayer.
Definition: board.cpp:532
DRAWINGS m_drawings
Definition: board.h:1221
int SetAreasNetCodesFromNetNames()
Set the .m_NetCode member of all copper areas, according to the area Net Name The SetNetCodesFromNetN...
Definition: board.cpp:1629
void SynchronizeNetsAndNetClasses(bool aResetTrackAndViaSizes)
Copy NETCLASS info to each NET, based on NET membership in a NETCLASS.
Definition: board.cpp:1601
EDA_UNITS GetUserUnits()
Definition: board.h:650
void ResetNetHighLight()
Reset all high light data to the init state.
Definition: board.cpp:2139
PCB_PLOT_PARAMS m_plotOptions
Definition: board.h:1240
bool SetLayerName(PCB_LAYER_ID aLayer, const wxString &aLayerName)
Changes the name of the layer given by aLayer.
Definition: board.cpp:514
std::list< ZONE * > GetZoneList(bool aIncludeZonesInFootprints=false) const
Definition: board.cpp:1982
void ConvertBrdLayerToPolygonalContours(PCB_LAYER_ID aLayer, SHAPE_POLY_SET &aOutlines) const
Build a set of polygons which are the outlines of copper items (pads, tracks, vias,...
Definition: board.cpp:2328
bool ResolveTextVar(wxString *token, int aDepth) const
Definition: board.cpp:373
const MARKERS & Markers() const
Definition: board.h:322
FOOTPRINT * GetFirstFootprint() const
Get the first footprint on the board or nullptr.
Definition: board.h:405
const std::vector< PAD * > GetPads() const
Return a reference to a list of all the pads.
Definition: board.cpp:2044
void Move(const VECTOR2I &aMoveVector) override
Move this object.
Definition: board.cpp:424
TITLE_BLOCK & GetTitleBlock()
Definition: board.h:644
BOX2I ComputeBoundingBox(bool aBoardEdgesOnly=false) const
Calculate the bounding box containing all board items (or board edge segments).
Definition: board.cpp:1303
ZONES m_zones
Definition: board.h:1225
PAD * GetPad(const VECTOR2I &aPosition) const
Definition: board.h:1002
FOOTPRINTS & Footprints()
Definition: board.h:312
PCB_LAYER_ID GetLayerID(const wxString &aLayerName) const
Return the ID of a layer.
Definition: board.cpp:478
HIGH_LIGHT_INFO m_highLightPrevious
Definition: board.h:1230
const VECTOR2I GetFocusPosition() const override
Similar to GetPosition, but allows items to return their visual center rather than their anchor.
Definition: board.h:361
void HighLightOFF()
Disable net highlight.
Definition: board.h:514
NETINFO_LIST m_NetInfo
Definition: board.h:1262
LSET m_LegacyVisibleLayers
Visibility settings stored in board prior to 6.0, only used for loading legacy files.
Definition: board.h:346
void SetVisibleAlls()
Change the bit-mask of visible element categories and layers.
Definition: board.cpp:660
void SetOutlinesChainingEpsilon(int aValue)
Definition: board.h:685
NETINFO_LIST::iterator EndNets() const
Definition: board.h:822
GroupLegalOpsField GroupLegalOps(const PCB_SELECTION &selection) const
Check which selection tool group operations are legal given the selection.
Definition: board.cpp:2250
int GetCopperLayerCount() const
Definition: board.cpp:587
int m_timeStamp
Definition: board.h:1217
std::vector< BOARD_LISTENER * > m_listeners
Definition: board.h:1264
const std::map< wxString, wxString > & GetProperties() const
Definition: board.h:339
std::unordered_map< PTR_PTR_CACHE_KEY, bool > m_IntersectsCourtyardCache
Definition: board.h:1177
void IncrementTimeStamp()
Definition: board.cpp:237
std::unordered_map< PTR_PTR_CACHE_KEY, bool > m_IntersectsFCourtyardCache
Definition: board.h:1178
const FOOTPRINTS & Footprints() const
Definition: board.h:313
std::shared_ptr< CONNECTIVITY_DATA > m_connectivity
Definition: board.h:1236
const TRACKS & Tracks() const
Definition: board.h:310
int m_DRCMaxPhysicalClearance
Definition: board.h:1191
GROUPS & Groups()
The groups must maintain the following invariants.
Definition: board.h:334
FOOTPRINT * FindFootprintByPath(const KIID_PATH &aPath) const
Search for a FOOTPRINT within this board with the given path.
Definition: board.cpp:1566
void FinalizeBulkRemove(std::vector< BOARD_ITEM * > &aRemovedItems)
Must be used if Remove() is used using a BULK_x REMOVE_MODE to generate a change event for listeners.
Definition: board.cpp:899
void SetPageSettings(const PAGE_INFO &aPageSettings)
Definition: board.h:639
bool GetTentVias() const
Definition: board.h:635
std::unordered_map< wxString, LSET > m_LayerExpressionCache
Definition: board.h:1182
wxString GroupsSanityCheckInternal(bool repair)
Definition: board.cpp:2184
wxString ConvertCrossReferencesToKIIDs(const wxString &aSource) const
Convert cross-references back and forth between ${refDes:field} and ${kiid:field}.
Definition: board.cpp:1184
TRACKS & Tracks()
Definition: board.h:309
wxString GetClass() const override
Return the class name.
Definition: board.h:916
void SetVisibleLayers(LSET aLayerMask)
A proxy function that calls the correspondent function in m_BoardSettings changes the bit-mask of vis...
Definition: board.cpp:643
NETINFO_LIST::iterator BeginNets() const
Definition: board.h:814
bool m_LegacyNetclassesLoaded
True if netclasses were loaded from the file.
Definition: board.h:354
void SetCopperLayerCount(int aCount)
Definition: board.cpp:593
std::unordered_map< const ZONE *, BOX2I > m_ZoneBBoxCache
Definition: board.h:1185
MARKERS & Markers()
Definition: board.h:321
wxString m_generator
Definition: board.h:1233
std::unordered_map< PTR_PTR_CACHE_KEY, bool > m_IntersectsBCourtyardCache
Definition: board.h:1179
TRACKS TracksInNet(int aNetCode)
Collect all the TRACKs and VIAs that are members of a net given by aNetCode.
Definition: board.cpp:444
void SetProject(PROJECT *aProject, bool aReferenceOnly=false)
Link a board to a given project.
Definition: board.cpp:178
PROJECT * m_project
Definition: board.h:1241
FOOTPRINT * GetFootprint(const VECTOR2I &aPosition, PCB_LAYER_ID aActiveLayer, bool aVisibleOnly, bool aIgnoreLocked=false) const
Get a footprint by its bounding rectangle at aPosition on aLayer.
Definition: board.cpp:1918
const wxString & GetFileName() const
Definition: board.h:307
std::vector< PCB_MARKER * > ResolveDRCExclusions(bool aCreateMarkers)
Rebuild DRC markers from the serialized data in BOARD_DESIGN_SETTINGS.
Definition: board.cpp:306
ZONE * m_SolderMask
Definition: board.h:1192
DRAWINGS & Drawings()
Definition: board.h:315
FOOTPRINT * FindFootprintByReference(const wxString &aReference) const
Search for a FOOTPRINT within this board with the given reference designator.
Definition: board.cpp:1554
unsigned GetNodesCount(int aNet=-1) const
Definition: board.cpp:1286
bool IsHighLightNetON() const
Definition: board.h:500
void FillItemMap(std::map< KIID, EDA_ITEM * > &aMap)
Definition: board.cpp:1148
int GetFileFormatVersionAtLoad() const
Definition: board.h:371
void SetElementVisibility(GAL_LAYER_ID aLayer, bool aNewState)
Change the visibility of an element category.
Definition: board.cpp:683
std::shared_ptr< DRC_RTREE > m_CopperItemRTreeCache
Definition: board.h:1184
bool SetLayerType(PCB_LAYER_ID aLayer, LAYER_T aLayerType)
Change the type of the layer given by aLayer.
Definition: board.cpp:544
const PCB_PLOT_PARAMS & GetPlotOptions() const
Definition: board.h:641
BOARD & operator=(const BOARD &aOther)=delete
wxString m_fileName
Definition: board.h:1219
const wxString & GetGenerator() const
Adds an item to the container.
Definition: board.h:374
int GetAreaCount() const
Definition: board.h:963
void SetLegacyTeardrops(bool aFlag)
Definition: board.h:1161
int GetOutlinesChainingEpsilon()
Definition: board.h:684
void GetSortedPadListByXthenYCoord(std::vector< PAD * > &aVector, int aNetCode=-1) const
First empties then fills the vector with all pads and sorts them by increasing x coordinate,...
Definition: board.cpp:1820
bool IsLayerVisible(PCB_LAYER_ID aLayer) const
A proxy function that calls the correspondent function in m_BoardSettings tests whether a given layer...
Definition: board.cpp:617
int m_DRCMaxClearance
Definition: board.h:1190
void ClearProject()
Definition: board.cpp:217
std::unordered_map< ZONE *, std::unique_ptr< DRC_RTREE > > m_CopperZoneRTreeCache
Definition: board.h:1183
void FinalizeBulkAdd(std::vector< BOARD_ITEM * > &aNewItems)
Must be used if Add() is used using a BULK_x ADD_MODE to generate a change event for listeners.
Definition: board.cpp:893
int LayerDepth(PCB_LAYER_ID aStartLayer, PCB_LAYER_ID aEndLayer) const
Definition: board.cpp:599
void DeleteAllFootprints()
Remove all footprints from the deque and free the memory associated with them.
Definition: board.cpp:1060
PROJECT * GetProject() const
Definition: board.h:448
bool IsEmpty() const
Definition: board.h:363
bool LegacyTeardrops() const
Definition: board.h:1160
std::tuple< int, double, double > GetTrackLength(const PCB_TRACK &aTrack) const
Return data on the length and number of track segments connected to a given track.
Definition: board.cpp:1835
void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) override
Populate aList of MSG_PANEL_ITEM objects with it's internal state for display purposes.
Definition: board.cpp:1369
const TITLE_BLOCK & GetTitleBlock() const
Definition: board.h:645
wxString GroupsSanityCheck(bool repair=false)
Consistency check of internal m_groups structure.
Definition: board.cpp:2171
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Definition: board.cpp:728
std::vector< ZONE * > m_DRCZones
Definition: board.h:1188
PAD * GetPad(const VECTOR2I &aPosition, LSET aLayerMask) const
Find a pad aPosition on aLayer.
Definition: board.cpp:1663
void SetGenerator(const wxString &aGenerator)
Definition: board.h:373
BOARD()
Definition: board.cpp:70
void UpdateRatsnestExclusions()
Update the visibility flags on the current unconnected ratsnest lines.
Definition: board.cpp:275
wxString ConvertKIIDsToCrossReferences(const wxString &aSource) const
Definition: board.cpp:1238
void SynchronizeProperties()
Copy the current project's text variables into the boards property cache.
Definition: board.cpp:1592
void RemoveListener(BOARD_LISTENER *aListener)
Remove the specified listener.
Definition: board.cpp:2109
unsigned GetNetCount() const
Definition: board.h:831
void DeleteMARKERs()
Delete all MARKERS from the board.
Definition: board.cpp:1028
void Remove(BOARD_ITEM *aBoardItem, REMOVE_MODE aMode=REMOVE_MODE::NORMAL) override
Removes an item from the container.
Definition: board.cpp:905
GROUPS m_groups
Definition: board.h:1224
MARKERS m_markers
Definition: board.h:1220
std::unordered_map< PTR_PTR_LAYER_CACHE_KEY, bool > m_IntersectsAreaCache
Definition: board.h:1180
void HighLightON(bool aValue=true)
Enable or disable net highlighting.
Definition: board.cpp:2161
void SetTitleBlock(const TITLE_BLOCK &aTitleBlock)
Definition: board.h:646
bool TestZoneIntersection(ZONE *aZone1, ZONE *aZone2)
Test for intersection of 2 copper areas.
TRACKS m_tracks
Definition: board.h:1223
bool m_LegacyCopperEdgeClearanceLoaded
Definition: board.h:351
int GetTimeStamp() const
Definition: board.h:293
std::mutex m_CachesMutex
Definition: board.h:1176
void OnItemsChanged(std::vector< BOARD_ITEM * > &aItems)
Notify the board and its listeners that an item on the board has been modified in some way.
Definition: board.cpp:2133
std::shared_ptr< CONNECTIVITY_DATA > GetConnectivity() const
Return a list of missing connections between components/tracks.
Definition: board.h:432
VECTOR2I GetPosition() const override
Definition: board.cpp:412
void CacheTriangulation(PROGRESS_REPORTER *aReporter=nullptr, const std::vector< ZONE * > &aZones={})
Definition: board.cpp:746
static bool ClassOf(const EDA_ITEM *aItem)
Definition: board.h:272
void SetUserUnits(EDA_UNITS aUnits)
Definition: board.h:651
void SetVisibleElements(const GAL_SET &aMask)
A proxy function that calls the correspondent function in m_BoardSettings.
Definition: board.cpp:650
const DRAWINGS & Drawings() const
Definition: board.h:316
void SetFileFormatVersionAtLoad(int aVersion)
Definition: board.h:370
const Vec GetCenter() const
Definition: box2.h:195
Store all of the related footprint information found in a netlist.
Definition: pcb_netlist.h:85
Implement an R-tree for fast spatial and layer indexing of connectable items.
Definition: drc_rtree.h:48
The base class for create windows for drawing purpose.
A base class for most all the KiCad significant classes used in schematics and boards.
Definition: eda_item.h:85
KICAD_T Type() const
Returns the type of object.
Definition: eda_item.h:97
Helper for storing and iterating over GAL_LAYER_IDs.
Definition: layer_ids.h:299
void Clear()
Definition: board.h:219
HIGH_LIGHT_INFO()
Definition: board.h:225
std::set< int > m_netCodes
Definition: board.h:216
bool m_highLightOn
Definition: board.h:217
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
Definition: view.h:69
Definition: kiid.h:48
LSET is a set of PCB_LAYER_IDs.
Definition: layer_ids.h:536
EDA_MSG_PANEL items for displaying messages.
Definition: msgpanel.h:54
Handle the data for a net.
Definition: netinfo.h:67
Wrapper class, so you can iterate through NETINFO_ITEM*s, not std::pair<int/wxString,...
Definition: netinfo.h:413
Container for NETINFO_ITEM elements, which are the nets.
Definition: netinfo.h:338
iterator begin() const
Definition: netinfo.h:458
unsigned GetNetCount() const
Definition: netinfo.h:361
iterator end() const
Definition: netinfo.h:463
void buildListOfNets()
Rebuild the list of NETINFO_ITEMs.
Store information read from a netlist along with the flags used to update the NETLIST in the BOARD.
Definition: pcb_netlist.h:213
Definition: pad.h:59
Describe the page size and margins of a paper page on which to eventually print or plot.
Definition: page_info.h:54
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
The main frame for Pcbnew.
A set of BOARD_ITEMs (i.e., without duplicates).
Definition: pcb_group.h:51
Parameters and options when plotting/printing a board.
void SetPlotViaOnMaskLayer(bool aFlag)
bool GetPlotViaOnMaskLayer() const
A holder to handle information on schematic or board items.
A progress reporter interface for use in multi-threaded environments.
Container for project specific data.
Definition: project.h:64
A pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:71
Represent a set of closed polygons.
Hold the information shown in the lower right corner of a plot, printout, or editing view.
Definition: title_block.h:41
ZONE_SETTINGS handles zones parameters.
Definition: zone_settings.h:70
Handle a list of polygons defining a copper zone.
Definition: zone.h:72
The common library.
const std::function< void(const wxString &msg, BOARD_ITEM *itemA, BOARD_ITEM *itemB, const VECTOR2I &pt)> OUTLINE_ERROR_HANDLER
std::vector< ZONE * > ZONES
Definition: eagle_plugin.h:44
INSPECT_RESULT
Definition: eda_item.h:42
const INSPECTOR_FUNC & INSPECTOR
Definition: eda_item.h:78
EDA_UNITS
Definition: eda_units.h:43
static void hash_combine(std::size_t &seed)
This is a dummy function to take the final case of hash_combine below.
Definition: hash.h:34
wxString LayerName(int aLayer)
Returns the default display name for a given layer.
Definition: layer_id.cpp:30
GAL_LAYER_ID
GAL layers are "virtual" layers, i.e.
Definition: layer_ids.h:190
PCB_LAYER_ID
A quick note on layer IDs:
Definition: layer_ids.h:59
@ PCB_LAYER_ID_COUNT
Definition: layer_ids.h:137
STL namespace.
ENDPOINT_T
Definition: pcb_track.h:57
bool operator()(const BOARD_ITEM *aFirst, const BOARD_ITEM *aSecond) const
Definition: board.cpp:2295
bool operator()(const BOARD_ITEM *aFirst, const BOARD_ITEM *aSecond) const
Definition: board.cpp:2274
A struct recording the isolated and single-pad islands within a zone.
Definition: zone.h:59
Container to hold information pertinent to a layer of a BOARD.
Definition: board.h:161
static LAYER_T ParseType(const char *aType)
Convert a string to a LAYER_T.
Definition: board.cpp:572
void clear()
Definition: board.h:167
LAYER_T m_type
The type of the layer.
Definition: board.h:189
static const char * ShowType(LAYER_T aType)
Convert a LAYER_T enum to a string representation of the layer type.
Definition: board.cpp:559
LAYER()
Definition: board.h:162
wxString m_name
The canonical name of the layer.
Definition: board.h:187
wxString m_userName
The user defined name of the layer.
Definition: board.h:188
bool m_visible
Definition: board.h:190
int m_number
The layer ID.
Definition: board.h:191
BOARD_ITEM * A
Definition: board.h:86
bool operator==(const PTR_LAYER_CACHE_KEY &other) const
Definition: board.h:89
PCB_LAYER_ID Layer
Definition: board.h:87
BOARD_ITEM * A
Definition: board.h:75
BOARD_ITEM * B
Definition: board.h:76
bool operator==(const PTR_PTR_CACHE_KEY &other) const
Definition: board.h:78
bool operator==(const PTR_PTR_LAYER_CACHE_KEY &other) const
Definition: board.h:101
BOARD_ITEM * B
Definition: board.h:98
BOARD_ITEM * A
Definition: board.h:97
PCB_LAYER_ID Layer
Definition: board.h:99
std::size_t operator()(const PTR_LAYER_CACHE_KEY &k) const
Definition: board.h:123
std::size_t operator()(const PTR_PTR_CACHE_KEY &k) const
Definition: board.h:112
std::size_t operator()(const PTR_PTR_LAYER_CACHE_KEY &k) const
Definition: board.h:134
@ PCB_T
Definition: typeinfo.h:82
ZONE_BORDER_DISPLAY_STYLE
Zone border styles.
Definition: zone_settings.h:49