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 <shared_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_GENERATOR;
55class PCB_MARKER;
56class MSG_PANEL_ITEM;
57class NETLIST;
58class REPORTER;
59class SHAPE_POLY_SET;
61class COMPONENT;
62class PROJECT;
64struct ISOLATED_ISLANDS;
65
66// The default value for m_outlinesChainingEpsilon to convert a board outlines to polygons
67// It is the max dist between 2 end points to see them connected
68#define DEFAULT_CHAINING_EPSILON_MM 0.01
69
70// Forward declare endpoint from class_track.h
71enum ENDPOINT_T : int;
72
73
75{
78
79 bool operator==(const PTR_PTR_CACHE_KEY& other) const
80 {
81 return A == other.A && B == other.B;
82 }
83};
84
86{
89
90 bool operator==(const PTR_LAYER_CACHE_KEY& other) const
91 {
92 return A == other.A && Layer == other.Layer;
93 }
94};
95
97{
101
102 bool operator==(const PTR_PTR_LAYER_CACHE_KEY& other) const
103 {
104 return A == other.A && B == other.B && Layer == other.Layer;
105 }
106};
107
108namespace std
109{
110 template <>
111 struct hash<PTR_PTR_CACHE_KEY>
112 {
113 std::size_t operator()( const PTR_PTR_CACHE_KEY& k ) const
114 {
115 std::size_t seed = 0xa82de1c0;
116 hash_combine( seed, k.A, k.B );
117 return seed;
118 }
119 };
120
121 template <>
123 {
124 std::size_t operator()( const PTR_LAYER_CACHE_KEY& k ) const
125 {
126 std::size_t seed = 0xa82de1c0;
127 hash_combine( seed, k.A, k.Layer );
128 return seed;
129 }
130 };
131
132 template <>
134 {
135 std::size_t operator()( const PTR_PTR_LAYER_CACHE_KEY& k ) const
136 {
137 std::size_t seed = 0xa82de1c0;
138 hash_combine( seed, k.A, k.B, k.Layer );
139 return seed;
140 }
141 };
142}
143
144
149{
156
157
161struct LAYER
162{
164 {
165 clear();
166 }
167
168 void clear()
169 {
171 m_visible = true;
172 m_number = 0;
173 m_name.clear();
174 m_userName.clear();
175 }
176
177 /*
178 LAYER( const wxString& aName = wxEmptyString,
179 LAYER_T aType = LT_SIGNAL, bool aVisible = true, int aNumber = -1 ) :
180 m_name( aName ),
181 m_type( aType ),
182 m_visible( aVisible ),
183 m_number( aNumber )
184 {
185 }
186 */
187
188 wxString m_name;
189 wxString m_userName;
193
200 static const char* ShowType( LAYER_T aType );
201
209 static LAYER_T ParseType( const char* aType );
210};
211
212
213// Helper class to handle high light nets
215{
216protected:
217 std::set<int> m_netCodes; // net(s) selected for highlight (-1 when no net selected )
218 bool m_highLightOn; // highlight active
219
220 void Clear()
221 {
222 m_netCodes.clear();
223 m_highLightOn = false;
224 }
225
227 {
228 Clear();
229 }
230
231private:
232 friend class BOARD;
233};
234
240class BOARD;
241
243{
244public:
245 virtual ~BOARD_LISTENER() { }
246 virtual void OnBoardItemAdded( BOARD& aBoard, BOARD_ITEM* aBoardItem ) { }
247 virtual void OnBoardItemsAdded( BOARD& aBoard, std::vector<BOARD_ITEM*>& aBoardItem ) { }
248 virtual void OnBoardItemRemoved( BOARD& aBoard, BOARD_ITEM* aBoardItem ) { }
249 virtual void OnBoardItemsRemoved( BOARD& aBoard, std::vector<BOARD_ITEM*>& aBoardItem ) { }
250 virtual void OnBoardNetSettingsChanged( BOARD& aBoard ) { }
251 virtual void OnBoardItemChanged( BOARD& aBoard, BOARD_ITEM* aBoardItem ) { }
252 virtual void OnBoardItemsChanged( BOARD& aBoard, std::vector<BOARD_ITEM*>& aBoardItem ) { }
253 virtual void OnBoardHighlightNetChanged( BOARD& aBoard ) { }
254 virtual void OnBoardRatsnestChanged( BOARD& aBoard ) { }
255};
256
260typedef std::set<BOARD_ITEM*, CompareByUuid> BOARD_ITEM_SET;
261
265enum class BOARD_USE
266{
267 NORMAL, // A normal board
268 FPHOLDER // A board that holds a single footprint
269};
270
271
276{
277public:
278 static inline bool ClassOf( const EDA_ITEM* aItem )
279 {
280 return aItem && PCB_T == aItem->Type();
281 }
282
288 void SetBoardUse( BOARD_USE aUse ) { m_boardUse = aUse; }
289
295 BOARD_USE GetBoardUse() const { return m_boardUse; }
296
297 void IncrementTimeStamp();
298
299 int GetTimeStamp() const { return m_timeStamp; }
300
306 bool IsFootprintHolder() const
307 {
308 return m_boardUse == BOARD_USE::FPHOLDER;
309 }
310
311 void SetFileName( const wxString& aFileName ) { m_fileName = aFileName; }
312
313 const wxString &GetFileName() const { return m_fileName; }
314
315 TRACKS& Tracks() { return m_tracks; }
316 const TRACKS& Tracks() const { return m_tracks; }
317
318 FOOTPRINTS& Footprints() { return m_footprints; }
319 const FOOTPRINTS& Footprints() const { return m_footprints; }
320
321 DRAWINGS& Drawings() { return m_drawings; }
322 const DRAWINGS& Drawings() const { return m_drawings; }
323
324 ZONES& Zones() { return m_zones; }
325 const ZONES& Zones() const { return m_zones; }
326
327 GENERATORS& Generators() { return m_generators; }
328 const GENERATORS& Generators() const { return m_generators; }
329
330 MARKERS& Markers() { return m_markers; }
331 const MARKERS& Markers() const { return m_markers; }
332
334
343 GROUPS& Groups() { return m_groups; }
344 const GROUPS& Groups() const { return m_groups; }
345
346 const std::vector<BOARD_CONNECTED_ITEM*> AllConnectedItems();
347
348 const std::map<wxString, wxString>& GetProperties() const { return m_properties; }
349 void SetProperties( const std::map<wxString, wxString>& aProps ) { m_properties = aProps; }
350
351 void GetContextualTextVars( wxArrayString* aVars ) const;
352 bool ResolveTextVar( wxString* token, int aDepth ) const;
353
357
361
364
365 BOARD();
366 ~BOARD();
367
368 VECTOR2I GetPosition() const override;
369 void SetPosition( const VECTOR2I& aPos ) override;
370 const VECTOR2I GetFocusPosition() const override { return GetBoundingBox().GetCenter(); }
371
372 bool IsEmpty() const
373 {
374 return m_drawings.empty() && m_footprints.empty() && m_tracks.empty() && m_zones.empty();
375 }
376
377 void Move( const VECTOR2I& aMoveVector ) override;
378
379 void SetFileFormatVersionAtLoad( int aVersion ) { m_fileFormatVersionAtLoad = aVersion; }
381
382 void SetGenerator( const wxString& aGenerator ) { m_generator = aGenerator; }
383 const wxString& GetGenerator() const { return m_generator; }
384
386 void Add( BOARD_ITEM* aItem, ADD_MODE aMode = ADD_MODE::INSERT,
387 bool aSkipConnectivity = false ) override;
388
390 void Remove( BOARD_ITEM* aBoardItem, REMOVE_MODE aMode = REMOVE_MODE::NORMAL ) override;
391
396 void FinalizeBulkAdd( std::vector<BOARD_ITEM*>& aNewItems );
397
402 void FinalizeBulkRemove( std::vector<BOARD_ITEM*>& aRemovedItems );
403
404 void CacheTriangulation( PROGRESS_REPORTER* aReporter = nullptr,
405 const std::vector<ZONE*>& aZones = {} );
406
415 {
416 return m_footprints.empty() ? nullptr : m_footprints.front();
417 }
418
422 void DeleteAllFootprints();
423
427 BOARD_ITEM* GetItem( const KIID& aID ) const;
428
429 void FillItemMap( std::map<KIID, EDA_ITEM*>& aMap );
430
434 wxString ConvertCrossReferencesToKIIDs( const wxString& aSource ) const;
435 wxString ConvertKIIDsToCrossReferences( const wxString& aSource ) const;
436
441 std::shared_ptr<CONNECTIVITY_DATA> GetConnectivity() const { return m_connectivity; }
442
448 bool BuildConnectivity( PROGRESS_REPORTER* aReporter = nullptr );
449
453 void DeleteMARKERs();
454
455 void DeleteMARKERs( bool aWarningsAndErrors, bool aExclusions );
456
457 PROJECT* GetProject() const { return m_project; }
458
467 void SetProject( PROJECT* aProject, bool aReferenceOnly = false );
468
469 void ClearProject();
470
478 std::vector<PCB_MARKER*> ResolveDRCExclusions( bool aCreateMarkers );
479
483 void RecordDRCExclusions();
484
489
493 void ResetNetHighLight();
494
498 const std::set<int>& GetHighLightNetCodes() const
499 {
500 return m_highLight.m_netCodes;
501 }
502
509 void SetHighLightNet( int aNetCode, bool aMulti = false );
510
515
523 void HighLightON( bool aValue = true );
524
529 {
530 HighLightON( false );
531 }
532
536 int GetCopperLayerCount() const;
537 void SetCopperLayerCount( int aCount );
538
539 int LayerDepth( PCB_LAYER_ID aStartLayer, PCB_LAYER_ID aEndLayer ) const;
540
546 LSET GetEnabledLayers() const;
547
553 void SetEnabledLayers( LSET aLayerMask );
554
561 bool IsLayerEnabled( PCB_LAYER_ID aLayer ) const;
562
570 bool IsLayerVisible( PCB_LAYER_ID aLayer ) const;
571
577 LSET GetVisibleLayers() const;
578
585 void SetVisibleLayers( LSET aLayerMask );
586
587 // these 2 functions are not tidy at this time, since there are PCB_LAYER_IDs that
588 // are not stored in the bitmap.
589
597
604 void SetVisibleElements( const GAL_SET& aMask );
605
611 void SetVisibleAlls();
612
620 bool IsElementVisible( GAL_LAYER_ID aLayer ) const;
621
629 void SetElementVisibility( GAL_LAYER_ID aLayer, bool aNewState );
630
638 bool IsFootprintLayerVisible( PCB_LAYER_ID aLayer ) const;
639
644
645 // Tented vias are vias covered by solder mask. So because the solder mask is a negative
646 // layer, tented vias are NOT plotted on solder mask layers
648 void SetTentVias( bool aFlag ) { m_plotOptions.SetPlotViaOnMaskLayer( !aFlag ); }
649
650 const PAGE_INFO& GetPageSettings() const { return m_paper; }
651 void SetPageSettings( const PAGE_INFO& aPageSettings ) { m_paper = aPageSettings; }
652
654 void SetPlotOptions( const PCB_PLOT_PARAMS& aOptions ) { m_plotOptions = aOptions; }
655
657 const TITLE_BLOCK& GetTitleBlock() const { return m_titles; }
658 void SetTitleBlock( const TITLE_BLOCK& aTitleBlock ) { m_titles = aTitleBlock; }
659
660 wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override;
661
663 void SetUserUnits( EDA_UNITS aUnits ) { m_userUnits = aUnits; }
664
669 void UpdateUserUnits( BOARD_ITEM* aItem, KIGFX::VIEW* aView );
670
689 OUTLINE_ERROR_HANDLER* aErrorHandler = nullptr,
690 bool aAllowUseArcsInPolygons = false,
691 bool aIncludeNPTHAsOutlines = false );
692
702
713 void ConvertBrdLayerToPolygonalContours( PCB_LAYER_ID aLayer, SHAPE_POLY_SET& aOutlines ) const;
714
718 PCB_LAYER_ID GetLayerID( const wxString& aLayerName ) const;
719
726 const wxString GetLayerName( PCB_LAYER_ID aLayer ) const;
727
735 bool SetLayerName( PCB_LAYER_ID aLayer, const wxString& aLayerName );
736
747 static wxString GetStandardLayerName( PCB_LAYER_ID aLayerId )
748 {
749 // a BOARD's standard layer name is the PCB_LAYER_ID fixed name
750 return LayerName( aLayerId );
751 }
752
760 bool SetLayerDescr( PCB_LAYER_ID aIndex, const LAYER& aLayer );
761
768 LAYER_T GetLayerType( PCB_LAYER_ID aLayer ) const;
769
777 bool SetLayerType( PCB_LAYER_ID aLayer, LAYER_T aLayerType );
778
783 unsigned GetNodesCount( int aNet = -1 ) const;
784
793 const std::vector<PAD*> GetPads() const;
794
796 {
798 }
799
806 NETINFO_ITEM* FindNet( int aNetcode ) const;
807
814 NETINFO_ITEM* FindNet( const wxString& aNetname ) const;
815
825 int MatchDpSuffix( const wxString& aNetName, wxString& aComplementNet );
826
830 NETINFO_ITEM* DpCoupledNet( const NETINFO_ITEM* aNet );
831
833 {
834 return m_NetInfo;
835 }
836
838 {
839 m_NetInfo.RemoveUnusedNets( aCommit );
840 }
841
842#ifndef SWIG
847 {
848 return m_NetInfo.begin();
849 }
850
855 {
856 return m_NetInfo.end();
857 }
858#endif
859
863 unsigned GetNetCount() const
864 {
865 return m_NetInfo.GetNetCount();
866 }
867
874 BOX2I ComputeBoundingBox( bool aBoardEdgesOnly = false ) const;
875
876 const BOX2I GetBoundingBox() const override
877 {
878 return ComputeBoundingBox( false );
879 }
880
891 {
892 return ComputeBoundingBox( true );
893 }
894
895 void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList ) override;
896
908 INSPECT_RESULT Visit( INSPECTOR inspector, void* testData,
909 const std::vector<KICAD_T>& scanTypes ) override;
910
919 FOOTPRINT* FindFootprintByReference( const wxString& aReference ) const;
920
927 FOOTPRINT* FindFootprintByPath( const KIID_PATH& aPath ) const;
928
932 std::set<wxString> GetNetClassAssignmentCandidates() const;
933
941 void SynchronizeNetsAndNetClasses( bool aResetTrackAndViaSizes );
942
947
951 double Similarity( const BOARD_ITEM& aOther ) const override
952 {
953 return 1.0;
954 }
955
956 bool operator==( const BOARD_ITEM& aOther ) const override;
957
958 wxString GetClass() const override
959 {
960 return wxT( "BOARD" );
961 }
962
963#if defined(DEBUG)
964 void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
965#endif
966
967
968 /*************************/
969 /* Copper Areas handling */
970 /*************************/
971
982
989 ZONE* GetArea( int index ) const
990 {
991 if( (unsigned) index < m_zones.size() )
992 return m_zones[index];
993
994 return nullptr;
995 }
996
1000 std::list<ZONE*> GetZoneList( bool aIncludeZonesInFootprints = false ) const;
1001
1005 int GetAreaCount() const
1006 {
1007 return static_cast<int>( m_zones.size() );
1008 }
1009
1010 /* Functions used in test, merge and cut outlines */
1011
1024 ZONE* AddArea( PICKED_ITEMS_LIST* aNewZonesList, int aNetcode, PCB_LAYER_ID aLayer,
1025 VECTOR2I aStartPointPosition, ZONE_BORDER_DISPLAY_STYLE aHatch );
1026
1034 bool TestZoneIntersection( ZONE* aZone1, ZONE* aZone2 );
1035
1043 PAD* GetPad( const VECTOR2I& aPosition, LSET aLayerMask ) const;
1044 PAD* GetPad( const VECTOR2I& aPosition ) const
1045 {
1046 return GetPad( aPosition, LSET().set() );
1047 }
1048
1056 PAD* GetPad( const PCB_TRACK* aTrace, ENDPOINT_T aEndPoint ) const;
1057
1067 PAD* GetPadFast( const VECTOR2I& aPosition, LSET aLayerMask ) const;
1068
1083 PAD* GetPad( std::vector<PAD*>& aPadList, const VECTOR2I& aPosition, LSET aLayerMask ) const;
1084
1096 void GetSortedPadListByXthenYCoord( std::vector<PAD*>& aVector, int aNetCode = -1 ) const;
1097
1105 std::tuple<int, double, double> GetTrackLength( const PCB_TRACK& aTrack ) const;
1106
1114 TRACKS TracksInNet( int aNetCode );
1115
1128 FOOTPRINT* GetFootprint( const VECTOR2I& aPosition, PCB_LAYER_ID aActiveLayer,
1129 bool aVisibleOnly, bool aIgnoreLocked = false ) const;
1130
1137 {
1138 return m_maxClearanceValue;
1139 };
1140
1146 void MapNets( const BOARD* aDestBoard );
1147
1148 void SanitizeNetcodes();
1149
1158 void AddListener( BOARD_LISTENER* aListener );
1159
1164 void RemoveListener( BOARD_LISTENER* aListener );
1165
1169 void RemoveAllListeners();
1170
1175 void OnItemChanged( BOARD_ITEM* aItem );
1176
1181 void OnItemsChanged( std::vector<BOARD_ITEM*>& aItems );
1182
1186 void OnRatsnestChanged();
1187
1194 wxString GroupsSanityCheck( bool repair = false );
1195
1201 wxString GroupsSanityCheckInternal( bool repair );
1202
1204 {
1205 bool create : 1;
1206 bool ungroup : 1;
1207 bool removeItems : 1;
1208 };
1209
1215 GroupLegalOpsField GroupLegalOps( const PCB_SELECTION& selection ) const;
1216
1217 bool LegacyTeardrops() const { return m_legacyTeardrops; }
1218 void SetLegacyTeardrops( bool aFlag ) { m_legacyTeardrops = aFlag; }
1219
1220 // --------- Item order comparators ---------
1221
1223 {
1224 bool operator() ( const BOARD_ITEM* aFirst, const BOARD_ITEM* aSecond ) const;
1225 };
1226
1228 {
1229 bool operator()( const BOARD_ITEM* aFirst, const BOARD_ITEM* aSecond ) const;
1230 };
1231
1232 // ------------ Run-time caches -------------
1233 mutable std::shared_mutex m_CachesMutex;
1234 std::unordered_map<PTR_PTR_CACHE_KEY, bool> m_IntersectsCourtyardCache;
1235 std::unordered_map<PTR_PTR_CACHE_KEY, bool> m_IntersectsFCourtyardCache;
1236 std::unordered_map<PTR_PTR_CACHE_KEY, bool> m_IntersectsBCourtyardCache;
1237 std::unordered_map<PTR_PTR_LAYER_CACHE_KEY, bool> m_IntersectsAreaCache;
1238 std::unordered_map<PTR_PTR_LAYER_CACHE_KEY, bool> m_EnclosedByAreaCache;
1239 std::unordered_map< wxString, LSET > m_LayerExpressionCache;
1240 std::unordered_map<ZONE*, std::unique_ptr<DRC_RTREE>> m_CopperZoneRTreeCache;
1241 std::shared_ptr<DRC_RTREE> m_CopperItemRTreeCache;
1242 mutable std::unordered_map<const ZONE*, BOX2I> m_ZoneBBoxCache;
1243
1244 // ------------ DRC caches -------------
1245 std::vector<ZONE*> m_DRCZones;
1246 std::vector<ZONE*> m_DRCCopperZones;
1249 ZONE* m_SolderMaskBridges; // A container to build bridges on solder mask layers
1250 std::map<ZONE*, std::map<PCB_LAYER_ID, ISOLATED_ISLANDS>> m_ZoneIsolatedIslandsMap;
1251
1252private:
1253 // The default copy constructor & operator= are inadequate,
1254 // either write one or do not use it at all
1255 BOARD( const BOARD& aOther ) = delete;
1256
1257 BOARD& operator=( const BOARD& aOther ) = delete;
1258
1259 template <typename Func, typename... Args>
1260 void InvokeListeners( Func&& aFunc, Args&&... args )
1261 {
1262 for( auto&& l : m_listeners )
1263 ( l->*aFunc )( std::forward<Args>( args )... );
1264 }
1265
1266
1268
1269 friend class PCB_EDIT_FRAME;
1270
1271
1274
1277 int m_timeStamp; // actually a modification counter
1278
1279 wxString m_fileName;
1280 MARKERS m_markers;
1281 DRAWINGS m_drawings;
1282 FOOTPRINTS m_footprints;
1283 TRACKS m_tracks;
1284 GROUPS m_groups;
1286 GENERATORS m_generators;
1287
1289
1290 HIGH_LIGHT_INFO m_highLight; // current high light data
1291 HIGH_LIGHT_INFO m_highLightPrevious; // a previously stored high light data
1292
1293 int m_fileFormatVersionAtLoad; // the version loaded from the file
1294 wxString m_generator; // the generator tag from the file
1295
1296 std::map<wxString, wxString> m_properties;
1297 std::shared_ptr<CONNECTIVITY_DATA> m_connectivity;
1298
1300 TITLE_BLOCK m_titles; // text in lower right of screen and plots
1302 PROJECT* m_project; // project this board is a part of
1304
1315 std::unique_ptr<BOARD_DESIGN_SETTINGS> m_designSettings;
1316
1321 bool m_legacyTeardrops = false;
1322
1324 int m_maxClearanceValue; // cached value
1325
1326 NETINFO_LIST m_NetInfo; // net info list (name, design constraints...
1327
1328 std::vector<BOARD_LISTENER*> m_listeners;
1329};
1330
1331
1332#endif // CLASS_BOARD_H_
BOARD_USE
Flags to specify how the board is being used.
Definition: board.h:266
LAYER_T
The allowed types of layers, same as Specctra DSN spec.
Definition: board.h:149
@ LT_POWER
Definition: board.h:152
@ LT_MIXED
Definition: board.h:153
@ LT_UNDEFINED
Definition: board.h:150
@ LT_JUMPER
Definition: board.h:154
@ LT_SIGNAL
Definition: board.h:151
std::set< BOARD_ITEM *, CompareByUuid > BOARD_ITEM_SET
Set of BOARD_ITEMs ordered by UUID.
Definition: board.h:260
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:77
wxString GetLayerName() const
Return the name of the PCB layer on which the item resides.
Definition: board_item.cpp:103
virtual void OnBoardNetSettingsChanged(BOARD &aBoard)
Definition: board.h:250
virtual void OnBoardItemsAdded(BOARD &aBoard, std::vector< BOARD_ITEM * > &aBoardItem)
Definition: board.h:247
virtual void OnBoardRatsnestChanged(BOARD &aBoard)
Definition: board.h:254
virtual void OnBoardItemsChanged(BOARD &aBoard, std::vector< BOARD_ITEM * > &aBoardItem)
Definition: board.h:252
virtual void OnBoardItemChanged(BOARD &aBoard, BOARD_ITEM *aBoardItem)
Definition: board.h:251
virtual void OnBoardItemRemoved(BOARD &aBoard, BOARD_ITEM *aBoardItem)
Definition: board.h:248
virtual void OnBoardItemAdded(BOARD &aBoard, BOARD_ITEM *aBoardItem)
Definition: board.h:246
virtual void OnBoardHighlightNetChanged(BOARD &aBoard)
Definition: board.h:253
virtual ~BOARD_LISTENER()
Definition: board.h:245
virtual void OnBoardItemsRemoved(BOARD &aBoard, std::vector< BOARD_ITEM * > &aBoardItem)
Definition: board.h:249
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:276
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:1531
ZONE * m_SolderMaskBridges
Definition: board.h:1249
void GetContextualTextVars(wxArrayString *aVars) const
Definition: board.cpp:409
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:794
void SetPlotOptions(const PCB_PLOT_PARAMS &aOptions)
Definition: board.h:654
std::unordered_map< PTR_PTR_LAYER_CACHE_KEY, bool > m_EnclosedByAreaCache
Definition: board.h:1238
std::map< ZONE *, std::map< PCB_LAYER_ID, ISOLATED_ISLANDS > > m_ZoneIsolatedIslandsMap
Definition: board.h:1250
GENERATORS m_generators
Definition: board.h:1286
bool GetBoardPolygonOutlines(SHAPE_POLY_SET &aOutlines, OUTLINE_ERROR_HANDLER *aErrorHandler=nullptr, bool aAllowUseArcsInPolygons=false, bool aIncludeNPTHAsOutlines=false)
Extract the board outlines and build a closed polygon from lines, arcs and circle items on edge cut l...
Definition: board.cpp:2239
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:2378
const NETINFO_LIST & GetNetInfo() const
Definition: board.h:832
bool m_LegacyDesignSettingsLoaded
True if the legacy board design settings were loaded from a file.
Definition: board.h:359
bool IsFootprintHolder() const
Find out if the board is being used to hold a single footprint for editing/viewing.
Definition: board.h:306
LSET GetEnabledLayers() const
A proxy function that calls the corresponding function in m_BoardSettings.
Definition: board.cpp:689
void SetPosition(const VECTOR2I &aPos) override
Definition: board.cpp:496
std::map< wxString, wxString > m_properties
Definition: board.h:1296
int m_fileFormatVersionAtLoad
Definition: board.h:1293
NETINFO_ITEM * DpCoupledNet(const NETINFO_ITEM *aNet)
Definition: board.cpp:1751
LSET GetVisibleLayers() const
A proxy function that calls the correspondent function in m_BoardSettings.
Definition: board.cpp:703
void SetTentVias(bool aFlag)
Definition: board.h:648
std::vector< ZONE * > m_DRCCopperZones
Definition: board.h:1246
BOARD_USE GetBoardUse() const
Get what the board use is.
Definition: board.h:295
void Add(BOARD_ITEM *aItem, ADD_MODE aMode=ADD_MODE::INSERT, bool aSkipConnectivity=false) override
Removes an item from the container.
Definition: board.cpp:891
const std::set< int > & GetHighLightNetCodes() const
Definition: board.h:498
bool m_legacyTeardrops
Teardrops in 7.0 were applied as a post-processing step (rather than from pad and via properties).
Definition: board.h:1321
TITLE_BLOCK m_titles
Definition: board.h:1300
GAL_SET m_LegacyVisibleItems
Definition: board.h:356
void SetBoardUse(BOARD_USE aUse)
Set what the board is going to be used for.
Definition: board.h:288
ZONE * GetArea(int index) const
Return the Zone at a given index.
Definition: board.h:989
const BOX2I GetBoardEdgesBoundingBox() const
Return the board bounding box calculated using exclusively the board edges (graphics on Edge....
Definition: board.h:890
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
Definition: board.h:876
void BuildListOfNets()
Definition: board.h:795
PAD * GetPadFast(const VECTOR2I &aPosition, LSET aLayerMask) const
Return pad found at aPosition on aLayerMask using the fast search method.
Definition: board.cpp:1905
LAYER m_layers[PCB_LAYER_ID_COUNT]
Definition: board.h:1288
const GENERATORS & Generators() const
Definition: board.h:328
void SetFileName(const wxString &aFileName)
Definition: board.h:311
static wxString GetStandardLayerName(PCB_LAYER_ID aLayerId)
Return an "English Standard" name of a PCB layer when given aLayerNumber.
Definition: board.h:747
const std::vector< BOARD_CONNECTED_ITEM * > AllConnectedItems()
Definition: board.cpp:2303
bool IsElementVisible(GAL_LAYER_ID aLayer) const
Test whether a given element category is visible.
Definition: board.cpp:755
int m_outlinesChainingEpsilon
the max distance between 2 end point to see them connected when building the board outlines
Definition: board.h:1273
std::set< wxString > GetNetClassAssignmentCandidates() const
Return the set of netname candidates for netclass assignment.
Definition: board.cpp:1790
BOARD_USE m_boardUse
What is this board being used for.
Definition: board.h:1276
PAGE_INFO m_paper
Definition: board.h:1299
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:2329
void RemoveAllListeners()
Remove all listeners.
Definition: board.cpp:2372
FOOTPRINTS m_footprints
Definition: board.h:1282
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:1315
void SetEnabledLayers(LSET aLayerMask)
A proxy function that calls the correspondent function in m_BoardSettings.
Definition: board.cpp:709
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:2353
const PAGE_INFO & GetPageSettings() const
Definition: board.h:650
void UpdateUserUnits(BOARD_ITEM *aItem, KIGFX::VIEW *aView)
Update any references within aItem (or its descendants) to the user units.
Definition: board.cpp:1095
void SetProperties(const std::map< wxString, wxString > &aProps)
Definition: board.h:349
BOARD(const BOARD &aOther)=delete
GAL_SET GetVisibleElements() const
Return a set of all the element categories that are visible.
Definition: board.cpp:749
ZONES & Zones()
Definition: board.h:324
void SetHighLightNet(int aNetCode, bool aMulti=false)
Select the netcode to be highlighted.
Definition: board.cpp:2405
HIGH_LIGHT_INFO m_highLight
Definition: board.h:1290
bool SetLayerDescr(PCB_LAYER_ID aIndex, const LAYER &aLayer)
Return the type of the copper layer given by aLayer.
Definition: board.cpp:544
NETINFO_ITEM * FindNet(int aNetcode) const
Search for a net with the given netcode.
Definition: board.cpp:1680
EDA_UNITS m_userUnits
Definition: board.h:1303
BOARD_ITEM * GetItem(const KIID &aID) const
Definition: board.cpp:1166
const ZONES & Zones() const
Definition: board.h:325
void InvokeListeners(Func &&aFunc, Args &&... args)
Definition: board.h:1260
void SanitizeNetcodes()
Definition: board.cpp:2343
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider) const override
Return a user-visible description string of this item.
Definition: board.cpp:1089
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:2214
const GROUPS & Groups() const
Definition: board.h:344
~BOARD()
Definition: board.cpp:135
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:189
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:715
LAYER_T GetLayerType(PCB_LAYER_ID aLayer) const
Return the type of the copper layer given by aLayer.
Definition: board.cpp:610
void RecordDRCExclusions()
Scan existing markers and record data from any that are Excluded.
Definition: board.cpp:329
DRAWINGS m_drawings
Definition: board.h:1281
int SetAreasNetCodesFromNetNames()
Set the .m_NetCode member of all copper areas, according to the area Net Name The SetNetCodesFromNetN...
Definition: board.cpp:1841
void SynchronizeNetsAndNetClasses(bool aResetTrackAndViaSizes)
Copy NETCLASS info to each NET, based on NET membership in a NETCLASS.
Definition: board.cpp:1813
EDA_UNITS GetUserUnits()
Definition: board.h:662
void ResetNetHighLight()
Reset all high light data to the init state.
Definition: board.cpp:2396
PCB_PLOT_PARAMS m_plotOptions
Definition: board.h:1301
bool SetLayerName(PCB_LAYER_ID aLayer, const wxString &aLayerName)
Changes the name of the layer given by aLayer.
Definition: board.cpp:592
GENERATORS & Generators()
Definition: board.h:327
std::list< ZONE * > GetZoneList(bool aIncludeZonesInFootprints=false) const
Definition: board.cpp:2194
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:2598
bool ResolveTextVar(wxString *token, int aDepth) const
Definition: board.cpp:433
const MARKERS & Markers() const
Definition: board.h:331
FOOTPRINT * GetFirstFootprint() const
Get the first footprint on the board or nullptr.
Definition: board.h:414
const std::vector< PAD * > GetPads() const
Return a reference to a list of all the pads.
Definition: board.cpp:2289
void Move(const VECTOR2I &aMoveVector) override
Move this object.
Definition: board.cpp:502
TITLE_BLOCK & GetTitleBlock()
Definition: board.h:656
BOX2I ComputeBoundingBox(bool aBoardEdgesOnly=false) const
Calculate the bounding box containing all board items (or board edge segments).
Definition: board.cpp:1425
int GetMaxClearanceValue() const
Returns the maximum clearance value for any object on the board.
Definition: board.h:1136
ZONES m_zones
Definition: board.h:1285
PAD * GetPad(const VECTOR2I &aPosition) const
Definition: board.h:1044
FOOTPRINTS & Footprints()
Definition: board.h:318
PCB_LAYER_ID GetLayerID(const wxString &aLayerName) const
Return the ID of a layer.
Definition: board.cpp:556
HIGH_LIGHT_INFO m_highLightPrevious
Definition: board.h:1291
const VECTOR2I GetFocusPosition() const override
Similar to GetPosition, but allows items to return their visual center rather than their anchor.
Definition: board.h:370
void HighLightOFF()
Disable net highlight.
Definition: board.h:528
NETINFO_LIST m_NetInfo
Definition: board.h:1326
LSET m_LegacyVisibleLayers
Visibility settings stored in board prior to 6.0, only used for loading legacy files.
Definition: board.h:355
void SetVisibleAlls()
Change the bit-mask of visible element categories and layers.
Definition: board.cpp:738
void SetOutlinesChainingEpsilon(int aValue)
Definition: board.h:701
NETINFO_LIST::iterator EndNets() const
Definition: board.h:854
GroupLegalOpsField GroupLegalOps(const PCB_SELECTION &selection) const
Check which selection tool group operations are legal given the selection.
Definition: board.cpp:2510
int GetCopperLayerCount() const
Definition: board.cpp:665
int m_timeStamp
Definition: board.h:1277
std::vector< BOARD_LISTENER * > m_listeners
Definition: board.h:1328
const std::map< wxString, wxString > & GetProperties() const
Definition: board.h:348
std::unordered_map< PTR_PTR_CACHE_KEY, bool > m_IntersectsCourtyardCache
Definition: board.h:1234
void IncrementTimeStamp()
Definition: board.cpp:258
int MatchDpSuffix(const wxString &aNetName, wxString &aComplementNet)
Fetch the coupled netname for a given net.
Definition: board.cpp:1701
std::unordered_map< PTR_PTR_CACHE_KEY, bool > m_IntersectsFCourtyardCache
Definition: board.h:1235
void RemoveUnusedNets(BOARD_COMMIT *aCommit)
Definition: board.h:837
const FOOTPRINTS & Footprints() const
Definition: board.h:319
std::shared_ptr< CONNECTIVITY_DATA > m_connectivity
Definition: board.h:1297
const BOARD_ITEM_SET GetItemSet()
Definition: board.cpp:2699
const TRACKS & Tracks() const
Definition: board.h:316
int m_DRCMaxPhysicalClearance
Definition: board.h:1248
GROUPS & Groups()
The groups must maintain the following invariants.
Definition: board.h:343
FOOTPRINT * FindFootprintByPath(const KIID_PATH &aPath) const
Search for a FOOTPRINT within this board with the given path.
Definition: board.cpp:1778
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:1001
void SetPageSettings(const PAGE_INFO &aPageSettings)
Definition: board.h:651
bool GetTentVias() const
Definition: board.h:647
std::unordered_map< wxString, LSET > m_LayerExpressionCache
Definition: board.h:1239
wxString GroupsSanityCheckInternal(bool repair)
Definition: board.cpp:2441
void OnRatsnestChanged()
Notify the board and its listeners that the ratsnest has been recomputed.
Definition: board.cpp:2390
wxString ConvertCrossReferencesToKIIDs(const wxString &aSource) const
Convert cross-references back and forth between ${refDes:field} and ${kiid:field}.
Definition: board.cpp:1306
TRACKS & Tracks()
Definition: board.h:315
wxString GetClass() const override
Return the class name.
Definition: board.h:958
void SetVisibleLayers(LSET aLayerMask)
A proxy function that calls the correspondent function in m_BoardSettings changes the bit-mask of vis...
Definition: board.cpp:721
NETINFO_LIST::iterator BeginNets() const
Definition: board.h:846
bool m_LegacyNetclassesLoaded
True if netclasses were loaded from the file.
Definition: board.h:363
void SetCopperLayerCount(int aCount)
Definition: board.cpp:671
std::unordered_map< const ZONE *, BOX2I > m_ZoneBBoxCache
Definition: board.h:1242
MARKERS & Markers()
Definition: board.h:330
wxString m_generator
Definition: board.h:1294
std::unordered_map< PTR_PTR_CACHE_KEY, bool > m_IntersectsBCourtyardCache
Definition: board.h:1236
TRACKS TracksInNet(int aNetCode)
Collect all the TRACKs and VIAs that are members of a net given by aNetCode.
Definition: board.cpp:522
void SetProject(PROJECT *aProject, bool aReferenceOnly=false)
Link a board to a given project.
Definition: board.cpp:199
PROJECT * m_project
Definition: board.h:1302
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:2130
const wxString & GetFileName() const
Definition: board.h:313
bool operator==(const BOARD_ITEM &aOther) const override
Definition: board.cpp:2714
bool m_skipMaxClearanceCacheUpdate
Definition: board.h:1323
std::vector< PCB_MARKER * > ResolveDRCExclusions(bool aCreateMarkers)
Rebuild DRC markers from the serialized data in BOARD_DESIGN_SETTINGS.
Definition: board.cpp:346
DRAWINGS & Drawings()
Definition: board.h:321
FOOTPRINT * FindFootprintByReference(const wxString &aReference) const
Search for a FOOTPRINT within this board with the given reference designator.
Definition: board.cpp:1766
unsigned GetNodesCount(int aNet=-1) const
Definition: board.cpp:1408
bool IsHighLightNetON() const
Definition: board.h:514
void FillItemMap(std::map< KIID, EDA_ITEM * > &aMap)
Definition: board.cpp:1267
int GetFileFormatVersionAtLoad() const
Definition: board.h:380
void SetElementVisibility(GAL_LAYER_ID aLayer, bool aNewState)
Change the visibility of an element category.
Definition: board.cpp:761
std::shared_ptr< DRC_RTREE > m_CopperItemRTreeCache
Definition: board.h:1241
bool SetLayerType(PCB_LAYER_ID aLayer, LAYER_T aLayerType)
Change the type of the layer given by aLayer.
Definition: board.cpp:622
const PCB_PLOT_PARAMS & GetPlotOptions() const
Definition: board.h:653
BOARD & operator=(const BOARD &aOther)=delete
wxString m_fileName
Definition: board.h:1279
const wxString & GetGenerator() const
Adds an item to the container.
Definition: board.h:383
int GetAreaCount() const
Definition: board.h:1005
void SetLegacyTeardrops(bool aFlag)
Definition: board.h:1218
int GetOutlinesChainingEpsilon()
Definition: board.h:700
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:2032
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:695
int m_DRCMaxClearance
Definition: board.h:1247
void ClearProject()
Definition: board.cpp:238
std::unordered_map< ZONE *, std::unique_ptr< DRC_RTREE > > m_CopperZoneRTreeCache
Definition: board.h:1240
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:995
int LayerDepth(PCB_LAYER_ID aStartLayer, PCB_LAYER_ID aEndLayer) const
Definition: board.cpp:677
void DeleteAllFootprints()
Remove all footprints from the deque and free the memory associated with them.
Definition: board.cpp:1153
PROJECT * GetProject() const
Definition: board.h:457
bool IsEmpty() const
Definition: board.h:372
bool LegacyTeardrops() const
Definition: board.h:1217
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:2047
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:1493
const TITLE_BLOCK & GetTitleBlock() const
Definition: board.h:657
void UpdateMaxClearanceCache()
Definition: board.cpp:812
wxString GroupsSanityCheck(bool repair=false)
Consistency check of internal m_groups structure.
Definition: board.cpp:2428
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Definition: board.cpp:806
std::vector< ZONE * > m_DRCZones
Definition: board.h:1245
PAD * GetPad(const VECTOR2I &aPosition, LSET aLayerMask) const
Find a pad aPosition on aLayer.
Definition: board.cpp:1875
void SetGenerator(const wxString &aGenerator)
Definition: board.h:382
BOARD()
Definition: board.cpp:73
void UpdateRatsnestExclusions()
Update the visibility flags on the current unconnected ratsnest lines.
Definition: board.cpp:298
wxString ConvertKIIDsToCrossReferences(const wxString &aSource) const
Definition: board.cpp:1360
void SynchronizeProperties()
Copy the current project's text variables into the boards property cache.
Definition: board.cpp:1804
void RemoveListener(BOARD_LISTENER *aListener)
Remove the specified listener.
Definition: board.cpp:2360
std::shared_mutex m_CachesMutex
Definition: board.h:1233
unsigned GetNetCount() const
Definition: board.h:863
void DeleteMARKERs()
Delete all MARKERS from the board.
Definition: board.cpp:1121
void Remove(BOARD_ITEM *aBoardItem, REMOVE_MODE aMode=REMOVE_MODE::NORMAL) override
Removes an item from the container.
Definition: board.cpp:1007
GROUPS m_groups
Definition: board.h:1284
MARKERS m_markers
Definition: board.h:1280
std::unordered_map< PTR_PTR_LAYER_CACHE_KEY, bool > m_IntersectsAreaCache
Definition: board.h:1237
void HighLightON(bool aValue=true)
Enable or disable net highlighting.
Definition: board.cpp:2418
void SetTitleBlock(const TITLE_BLOCK &aTitleBlock)
Definition: board.h:658
int m_maxClearanceValue
Definition: board.h:1324
bool TestZoneIntersection(ZONE *aZone1, ZONE *aZone2)
Test for intersection of 2 copper areas.
TRACKS m_tracks
Definition: board.h:1283
bool m_LegacyCopperEdgeClearanceLoaded
Definition: board.h:360
int GetTimeStamp() const
Definition: board.h:299
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:2384
std::shared_ptr< CONNECTIVITY_DATA > GetConnectivity() const
Return a list of missing connections between components/tracks.
Definition: board.h:441
VECTOR2I GetPosition() const override
Definition: board.cpp:490
void CacheTriangulation(PROGRESS_REPORTER *aReporter=nullptr, const std::vector< ZONE * > &aZones={})
Definition: board.cpp:841
static bool ClassOf(const EDA_ITEM *aItem)
Definition: board.h:278
void SetUserUnits(EDA_UNITS aUnits)
Definition: board.h:663
void SetVisibleElements(const GAL_SET &aMask)
A proxy function that calls the correspondent function in m_BoardSettings.
Definition: board.cpp:728
double Similarity(const BOARD_ITEM &aOther) const override
Return the Similarity.
Definition: board.h:951
const DRAWINGS & Drawings() const
Definition: board.h:322
void SetFileFormatVersionAtLoad(int aVersion)
Definition: board.h:379
const Vec GetCenter() const
Definition: box2.h:196
Store all of the related footprint information found in a netlist.
Definition: pcb_netlist.h:86
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:306
void Clear()
Definition: board.h:220
HIGH_LIGHT_INFO()
Definition: board.h:226
std::set< int > m_netCodes
Definition: board.h:217
bool m_highLightOn
Definition: board.h:218
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
Definition: view.h:68
Definition: kiid.h:49
LSET is a set of PCB_LAYER_IDs.
Definition: layer_ids.h:573
EDA_MSG_PANEL items for displaying messages.
Definition: msgpanel.h:54
Handle the data for a net.
Definition: netinfo.h:56
Wrapper class, so you can iterate through NETINFO_ITEM*s, not std::pair<int/wxString,...
Definition: netinfo.h:401
Container for NETINFO_ITEM elements, which are the nets.
Definition: netinfo.h:342
void RemoveUnusedNets(BOARD_COMMIT *aCommit)
iterator begin() const
Definition: netinfo.h:446
unsigned GetNetCount() const
Definition: netinfo.h:365
iterator end() const
Definition: netinfo.h:451
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:223
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:59
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:62
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
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
INSPECT_RESULT
Definition: eda_item.h:42
const INSPECTOR_FUNC & INSPECTOR
Definition: eda_item.h:78
EDA_UNITS
Definition: eda_units.h:46
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:193
PCB_LAYER_ID
A quick note on layer IDs:
Definition: layer_ids.h:60
@ PCB_LAYER_ID_COUNT
Definition: layer_ids.h:138
STL namespace.
std::vector< ZONE * > ZONES
Definition: pcb_io_eagle.h:46
ENDPOINT_T
Definition: pcb_track.h:57
bool operator()(const BOARD_ITEM *aFirst, const BOARD_ITEM *aSecond) const
Definition: board.cpp:2558
bool operator()(const BOARD_ITEM *aFirst, const BOARD_ITEM *aSecond) const
Definition: board.cpp:2537
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:162
static LAYER_T ParseType(const char *aType)
Convert a string to a LAYER_T.
Definition: board.cpp:650
void clear()
Definition: board.h:168
LAYER_T m_type
The type of the layer.
Definition: board.h:190
static const char * ShowType(LAYER_T aType)
Convert a LAYER_T enum to a string representation of the layer type.
Definition: board.cpp:637
LAYER()
Definition: board.h:163
wxString m_name
The canonical name of the layer.
Definition: board.h:188
wxString m_userName
The user defined name of the layer.
Definition: board.h:189
bool m_visible
Definition: board.h:191
int m_number
The layer ID.
Definition: board.h:192
BOARD_ITEM * A
Definition: board.h:87
bool operator==(const PTR_LAYER_CACHE_KEY &other) const
Definition: board.h:90
PCB_LAYER_ID Layer
Definition: board.h:88
BOARD_ITEM * A
Definition: board.h:76
BOARD_ITEM * B
Definition: board.h:77
bool operator==(const PTR_PTR_CACHE_KEY &other) const
Definition: board.h:79
bool operator==(const PTR_PTR_LAYER_CACHE_KEY &other) const
Definition: board.h:102
BOARD_ITEM * B
Definition: board.h:99
BOARD_ITEM * A
Definition: board.h:98
PCB_LAYER_ID Layer
Definition: board.h:100
std::size_t operator()(const PTR_LAYER_CACHE_KEY &k) const
Definition: board.h:124
std::size_t operator()(const PTR_PTR_CACHE_KEY &k) const
Definition: board.h:113
std::size_t operator()(const PTR_PTR_LAYER_CACHE_KEY &k) const
Definition: board.h:135
@ PCB_T
Definition: typeinfo.h:82
ZONE_BORDER_DISPLAY_STYLE
Zone border styles.
Definition: zone_settings.h:49