KiCad PCB EDA Suite
Loading...
Searching...
No Matches
footprint.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) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
5 * Copyright (C) 1992-2024 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 FOOTPRINT_H
26#define FOOTPRINT_H
27
28#include <deque>
29
30#include <template_fieldnames.h>
31
33#include <board_item.h>
34#include <collectors.h>
35#include <layer_ids.h> // ALL_LAYERS definition.
36#include <lib_id.h>
37#include <list>
38
39#include <zones.h>
41#include <pcb_item_containers.h>
42#include <pcb_text.h>
43#include <pcb_field.h>
44#include <functional>
45#include <math/vector3.h>
46
47class LINE_READER;
48class EDA_3D_CANVAS;
49class PAD;
50class BOARD;
51class MSG_PANEL_ITEM;
52class SHAPE;
53class REPORTER;
54
55namespace KIGFX {
56class VIEW;
57}
58
60{
62 INCLUDE_NPTH = true
63};
64
71{
73 FP_SMD = 0x0002,
76 FP_BOARD_ONLY = 0x0010, // Footprint has no corresponding symbol
77 FP_JUST_ADDED = 0x0020, // Footprint just added by netlist update
80 FP_DNP = 0x0100
81};
82
84{
85public:
87 // Initialize with sensible values
88 m_Scale { 1, 1, 1 },
89 m_Rotation { 0, 0, 0 },
90 m_Offset { 0, 0, 0 },
91 m_Opacity( 1.0 ),
92 m_Show( true )
93 {
94 }
95
99 double m_Opacity;
100 wxString m_Filename;
101 bool m_Show;
102};
103
104
106{
107public:
108 FOOTPRINT( BOARD* parent );
109
110 FOOTPRINT( const FOOTPRINT& aFootprint );
111
112 // Move constructor and operator needed due to std containers inside the footprint
113 FOOTPRINT( FOOTPRINT&& aFootprint );
114
115 ~FOOTPRINT();
116
117 FOOTPRINT& operator=( const FOOTPRINT& aOther );
118 FOOTPRINT& operator=( FOOTPRINT&& aOther );
119
120 void Serialize( google::protobuf::Any &aContainer ) const override;
121 bool Deserialize( const google::protobuf::Any &aContainer ) override;
122
123 static inline bool ClassOf( const EDA_ITEM* aItem )
124 {
125 return aItem && aItem->Type() == PCB_FOOTPRINT_T;
126 }
127
129 void SetPrivateLayers( LSET aLayers ) { m_privateLayers = aLayers; }
130
132 void Add( BOARD_ITEM* aItem, ADD_MODE aMode = ADD_MODE::INSERT,
133 bool aSkipConnectivity = false ) override;
134
136 void Remove( BOARD_ITEM* aItem, REMOVE_MODE aMode = REMOVE_MODE::NORMAL ) override;
137
145 void ClearAllNets();
146
154 bool FixUuids();
155
166
173
174 // Virtual function
175 const BOX2I GetBoundingBox() const override;
176 const BOX2I GetBoundingBox( bool aIncludeText, bool aIncludeInvisibleText ) const;
177
181 const BOX2I GetLayerBoundingBox( LSET aLayers ) const;
182
183 VECTOR2I GetCenter() const override
184 {
185 return GetBoundingBox( false, false ).GetCenter();
186 }
187
188 PCB_FIELDS& Fields() { return m_fields; }
189 const PCB_FIELDS& Fields() const { return m_fields; }
190
191 PADS& Pads() { return m_pads; }
192 const PADS& Pads() const { return m_pads; }
193
194 DRAWINGS& GraphicalItems() { return m_drawings; }
195 const DRAWINGS& GraphicalItems() const { return m_drawings; }
196
197 ZONES& Zones() { return m_zones; }
198 const ZONES& Zones() const { return m_zones; }
199
200 GROUPS& Groups() { return m_groups; }
201 const GROUPS& Groups() const { return m_groups; }
202
203 bool HasThroughHolePads() const;
204
205 std::vector<FP_3DMODEL>& Models() { return m_3D_Drawings; }
206 const std::vector<FP_3DMODEL>& Models() const { return m_3D_Drawings; }
207
208 void SetPosition( const VECTOR2I& aPos ) override;
209 VECTOR2I GetPosition() const override { return m_pos; }
210
211 void SetOrientation( const EDA_ANGLE& aNewAngle );
213
218 void SetLayerAndFlip( PCB_LAYER_ID aLayer );
219
220 // to make property magic work
221 PCB_LAYER_ID GetLayer() const override { return BOARD_ITEM::GetLayer(); }
222
223 // For property system:
224 void SetOrientationDegrees( double aOrientation )
225 {
226 SetOrientation( EDA_ANGLE( aOrientation, DEGREES_T ) );
227 }
229 {
230 return m_orient.AsDegrees();
231 }
232
233 const LIB_ID& GetFPID() const { return m_fpid; }
234 void SetFPID( const LIB_ID& aFPID )
235 {
236 m_fpid = aFPID;
237 Footprint().SetText( aFPID.Format() );
238 }
239
240 wxString GetFPIDAsString() const { return m_fpid.Format(); }
241 void SetFPIDAsString( const wxString& aFPID ) { m_fpid.Parse( aFPID ); }
242
243 wxString GetLibDescription() const { return m_libDescription; }
244 void SetLibDescription( const wxString& aDesc ) { m_libDescription = aDesc; }
245
246 wxString GetKeywords() const { return m_keywords; }
247 void SetKeywords( const wxString& aKeywords ) { m_keywords = aKeywords; }
248
249 const KIID_PATH& GetPath() const { return m_path; }
250 void SetPath( const KIID_PATH& aPath ) { m_path = aPath; }
251
252 wxString GetSheetname() const { return m_sheetname; }
253 void SetSheetname( const wxString& aSheetname ) { m_sheetname = aSheetname; }
254
255 wxString GetSheetfile() const { return m_sheetfile; }
256 void SetSheetfile( const wxString& aSheetfile ) { m_sheetfile = aSheetfile; }
257
258 wxString GetFilters() const { return m_filters; }
259 void SetFilters( const wxString& aFilters ) { m_filters = aFilters; }
260
261 std::optional<int> GetLocalClearance() const { return m_clearance; }
262 void SetLocalClearance( std::optional<int> aClearance ) { m_clearance = aClearance; }
263
264 std::optional<int> GetLocalSolderMaskMargin() const { return m_solderMaskMargin; }
265 void SetLocalSolderMaskMargin( std::optional<int> aMargin ) { m_solderMaskMargin = aMargin; }
266
267 std::optional<int> GetLocalSolderPasteMargin() const { return m_solderPasteMargin; }
268 void SetLocalSolderPasteMargin( std::optional<int> aMargin ) { m_solderPasteMargin = aMargin; }
269
270 std::optional<double> GetLocalSolderPasteMarginRatio() const { return m_solderPasteMarginRatio; }
271 void SetLocalSolderPasteMarginRatio( std::optional<double> aRatio ) { m_solderPasteMarginRatio = aRatio; }
272
275
276 int GetAttributes() const { return m_attributes; }
277 void SetAttributes( int aAttributes ) { m_attributes = aAttributes; }
278
279 void SetFlag( int aFlag ) { m_arflag = aFlag; }
280 void IncrementFlag() { m_arflag += 1; }
281 int GetFlag() const { return m_arflag; }
282
283 bool IsNetTie() const
284 {
285 for( const wxString& group : m_netTiePadGroups )
286 {
287 if( !group.IsEmpty() )
288 return true;
289 }
290
291 return false;
292 }
293
294 std::optional<int> GetLocalClearance( wxString* aSource ) const
295 {
296 if( m_clearance.has_value() && aSource )
297 *aSource = wxString::Format( _( "footprint %s" ), GetReference() );
298
299 return m_clearance;
300 }
301
308 std::optional<int> GetClearanceOverrides( wxString* aSource ) const
309 {
310 return GetLocalClearance( aSource );
311 }
312
314 {
315 if( m_zoneConnection != ZONE_CONNECTION::INHERITED && aSource )
316 *aSource = wxString::Format( _( "footprint %s" ), GetReference() );
317
318 return m_zoneConnection;
319 }
320
325 const std::vector<wxString>& GetNetTiePadGroups() const { return m_netTiePadGroups; }
326
328 {
329 m_netTiePadGroups.clear();
330 }
331
332 void AddNetTiePadGroup( const wxString& aGroup )
333 {
334 m_netTiePadGroups.emplace_back( aGroup );
335 }
336
341 std::map<wxString, int> MapPadNumbersToNetTieGroups() const;
342
346 std::vector<PAD*> GetNetTiePads( PAD* aPad ) const;
347
353 int GetLikelyAttribute() const;
354
355 void Move( const VECTOR2I& aMoveVector ) override;
356
357 void Rotate( const VECTOR2I& aRotCentre, const EDA_ANGLE& aAngle ) override;
358
359 void Flip( const VECTOR2I& aCentre, bool aFlipLeftRight ) override;
360
372 void MoveAnchorPosition( const VECTOR2I& aMoveVector );
373
377 bool IsFlipped() const { return GetLayer() == B_Cu; }
378
383 PCB_LAYER_ID GetSide() const;
384
388 bool IsOnLayer( PCB_LAYER_ID aLayer ) const override;
389
390// m_footprintStatus bits:
391#define FP_is_LOCKED 0x01
392#define FP_is_PLACED 0x02
393#define FP_to_PLACE 0x04
394#define FP_PADS_are_LOCKED 0x08
395
396
397 bool IsLocked() const override
398 {
399 return ( m_fpStatus & FP_is_LOCKED ) != 0;
400 }
401
407 void SetLocked( bool isLocked ) override
408 {
409 if( isLocked )
411 else
412 m_fpStatus &= ~FP_is_LOCKED;
413 }
414
418 bool IsConflicting() const;
419
420 bool IsPlaced() const { return m_fpStatus & FP_is_PLACED; }
421 void SetIsPlaced( bool isPlaced )
422 {
423 if( isPlaced )
425 else
426 m_fpStatus &= ~FP_is_PLACED;
427 }
428
429 bool NeedsPlaced() const { return m_fpStatus & FP_to_PLACE; }
430 void SetNeedsPlaced( bool needsPlaced )
431 {
432 if( needsPlaced )
434 else
435 m_fpStatus &= ~FP_to_PLACE;
436 }
437
439
450 void CheckFootprintAttributes( const std::function<void( const wxString& )>& aErrorHandler );
451
458 void CheckPads( const std::function<void( const PAD*, int, const wxString& )>& aErrorHandler );
459
465 void CheckShortingPads( const std::function<void( const PAD*,
466 const PAD*,
467 const VECTOR2I& )>& aErrorHandler );
468
475 void CheckNetTies( const std::function<void( const BOARD_ITEM* aItem,
476 const BOARD_ITEM* bItem,
477 const BOARD_ITEM* cItem,
478 const VECTOR2I& )>& aErrorHandler );
479
486 void CheckNetTiePadGroups( const std::function<void( const wxString& )>& aErrorHandler );
487
508 void TransformPadsToPolySet( SHAPE_POLY_SET& aBuffer, PCB_LAYER_ID aLayer, int aClearance,
509 int aMaxError, ERROR_LOC aErrorLoc,
510 bool aSkipNPTHPadsWihNoCopper = false,
511 bool aSkipPlatedPads = false,
512 bool aSkipNonPlatedPads = false ) const;
513
528 void TransformFPShapesToPolySet( SHAPE_POLY_SET& aBuffer, PCB_LAYER_ID aLayer, int aClearance,
529 int aError, ERROR_LOC aErrorLoc,
530 bool aIncludeText = true,
531 bool aIncludeShapes = true,
532 bool aIncludePrivateItems = false ) const;
533
537 void TransformFPTextToPolySet( SHAPE_POLY_SET& aBuffer, PCB_LAYER_ID aLayer, int aClearance,
538 int aError, ERROR_LOC aErrorLoc ) const
539 {
540 TransformFPShapesToPolySet( aBuffer, aLayer, aClearance, aError, aErrorLoc, true, false );
541 }
542
546 void GetContextualTextVars( wxArrayString* aVars ) const;
547
553 bool ResolveTextVar( wxString* token, int aDepth = 0 ) const;
554
556 void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList ) override;
557
558 bool HitTest( const VECTOR2I& aPosition, int aAccuracy = 0 ) const override;
559
569 bool HitTestAccurate( const VECTOR2I& aPosition, int aAccuracy = 0 ) const;
570
571 bool HitTest( const BOX2I& aRect, bool aContained, int aAccuracy = 0 ) const override;
572
581 bool HitTestOnLayer( const VECTOR2I& aPosition, PCB_LAYER_ID aLayer, int aAccuracy = 0 ) const;
582
583 bool HitTestOnLayer( const BOX2I& aRect, bool aContained, PCB_LAYER_ID aLayer, int aAccuracy = 0 ) const;
584
588 const wxString& GetReference() const { return Reference().GetText(); }
589
594 void SetReference( const wxString& aReference ) { Reference().SetText( aReference ); }
595
596 // Property system doesn't like const references
597 wxString GetReferenceAsString() const
598 {
599 return GetReference();
600 }
601
605 void IncrementReference( int aDelta );
606
610 const wxString& GetValue() const { return Value().GetText(); }
611
615 void SetValue( const wxString& aValue ) { Value().SetText( aValue ); }
616
617 // Property system doesn't like const references
618 wxString GetValueAsString() const
619 {
620 return GetValue();
621 }
622
627
629 const PCB_FIELD& Value() const { return *GetField( VALUE_FIELD ); }
630 const PCB_FIELD& Reference() const { return *GetField( REFERENCE_FIELD ); }
631 const PCB_FIELD& Footprint() const { return *GetField( FOOTPRINT_FIELD ); }
632
633 //-----<Fields>-----------------------------------------------------------
634
643 PCB_FIELD* GetField( MANDATORY_FIELD_T aFieldType );
644 const PCB_FIELD* GetField( MANDATORY_FIELD_T aFieldNdx ) const;
645
653 PCB_FIELD* GetFieldById( int aFieldId );
654
662 PCB_FIELD* GetFieldByName( const wxString& aFieldName );
663
664 bool HasFieldByName( const wxString& aFieldName ) const;
665
671 wxString GetFieldText( const wxString& aFieldName ) const;
672
679 void GetFields( std::vector<PCB_FIELD*>& aVector, bool aVisibleOnly );
680
684 PCB_FIELDS GetFields() { return m_fields; }
685 const PCB_FIELDS& GetFields() const { return m_fields; }
686
694 PCB_FIELD* AddField( const PCB_FIELD& aField );
695
701 void RemoveField( const wxString& aFieldName );
702
706 int GetFieldCount() const { return (int) m_fields.size(); }
707
715 void ApplyDefaultSettings( const BOARD& board, bool aStyleFields, bool aStyleText,
716 bool aStyleShapes );
717
718 bool IsBoardOnly() const { return m_attributes & FP_BOARD_ONLY; }
719 void SetBoardOnly( bool aIsBoardOnly = true )
720 {
721 if( aIsBoardOnly )
723 else
724 m_attributes &= ~FP_BOARD_ONLY;
725 }
726
728 void SetExcludedFromPosFiles( bool aExclude = true )
729 {
730 if( aExclude )
732 else
733 m_attributes &= ~FP_EXCLUDE_FROM_POS_FILES;
734 }
735
737 void SetExcludedFromBOM( bool aExclude = true )
738 {
739 if( aExclude )
741 else
742 m_attributes &= ~FP_EXCLUDE_FROM_BOM;
743 }
744
746 void SetAllowMissingCourtyard( bool aAllow = true )
747 {
748 if( aAllow )
750 else
751 m_attributes &= ~FP_ALLOW_MISSING_COURTYARD;
752 }
753
754 bool IsDNP() const { return m_attributes & FP_DNP; }
755 void SetDNP( bool aDNP = true )
756 {
757 if( aDNP )
759 else
760 m_attributes &= ~FP_DNP;
761 }
762
763 void SetFileFormatVersionAtLoad( int aVersion ) { m_fileFormatVersionAtLoad = aVersion; }
765
775 PAD* FindPadByNumber( const wxString& aPadNumber, PAD* aSearchAfterMe = nullptr ) const;
776
784 PAD* GetPad( const VECTOR2I& aPosition, LSET aLayerMask = LSET::AllLayersMask() );
785
793 unsigned GetPadCount( INCLUDE_NPTH_T aIncludeNPTH = INCLUDE_NPTH_T(INCLUDE_NPTH) ) const;
794
805 unsigned GetUniquePadCount( INCLUDE_NPTH_T aIncludeNPTH = INCLUDE_NPTH_T(INCLUDE_NPTH) ) const;
806
810 std::set<wxString>
812
820 wxString GetNextPadNumber( const wxString& aLastPadName ) const;
821
825 void AutoPositionFields();
826
831 wxString GetTypeName() const;
832
833 double GetArea( int aPadding = 0 ) const;
834
835 KIID GetLink() const { return m_link; }
836 void SetLink( const KIID& aLink ) { m_link = aLink; }
837
838 BOARD_ITEM* Duplicate() const override;
839
845 BOARD_ITEM* DuplicateItem( const BOARD_ITEM* aItem, bool aAddToFootprint = false );
846
852 void Add3DModel( FP_3DMODEL* a3DModel );
853
854 INSPECT_RESULT Visit( INSPECTOR inspector, void* testData,
855 const std::vector<KICAD_T>& aScanTypes ) override;
856
857 wxString GetClass() const override
858 {
859 return wxT( "FOOTPRINT" );
860 }
861
862 wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override;
863
864 BITMAPS GetMenuImage() const override;
865
866 EDA_ITEM* Clone() const override;
867
869 void RunOnChildren( const std::function<void (BOARD_ITEM*)>& aFunction ) const override;
870
872 void RunOnDescendants( const std::function<void( BOARD_ITEM* )>& aFunction,
873 int aDepth = 0 ) const override;
874
875 virtual void ViewGetLayers( int aLayers[], int& aCount ) const override;
876
877 double ViewGetLOD( int aLayer, KIGFX::VIEW* aView ) const override;
878
879 virtual const BOX2I ViewBBox() const override;
880
888 static bool IsLibNameValid( const wxString& aName );
889
899 static const wxChar* StringLibNameInvalidChars( bool aUserReadable );
900
904 bool FootprintNeedsUpdate( const FOOTPRINT* aLibFP, REPORTER* aReporter = nullptr );
905
920 void SetInitialComments( wxArrayString* aInitialComments )
921 {
922 delete m_initial_comments;
923 m_initial_comments = aInitialComments;
924 }
925
932 double CoverageRatio( const GENERAL_COLLECTOR& aCollector ) const;
933
934 static double GetCoverageArea( const BOARD_ITEM* aItem, const GENERAL_COLLECTOR& aCollector );
935
937 const wxArrayString* GetInitialComments() const { return m_initial_comments; }
938
944 const SHAPE_POLY_SET& GetCourtyard( PCB_LAYER_ID aLayer ) const;
945
952 void BuildCourtyardCaches( OUTLINE_ERROR_HANDLER* aErrorHandler = nullptr );
953
954 // @copydoc BOARD_ITEM::GetEffectiveShape
955 std::shared_ptr<SHAPE> GetEffectiveShape( PCB_LAYER_ID aLayer = UNDEFINED_LAYER,
956 FLASHING aFlash = FLASHING::DEFAULT ) const override;
957
958 double Similarity( const BOARD_ITEM& aOther ) const override;
959
960 bool operator==( const BOARD_ITEM& aOther ) const override;
961 bool operator==( const FOOTPRINT& aOther ) const;
962
963#if defined(DEBUG)
964 virtual void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
965#endif
966
968 {
969 bool operator()( const BOARD_ITEM* itemA, const BOARD_ITEM* itemB ) const;
970 };
971
972 struct cmp_pads
973 {
974 bool operator()( const PAD* aFirst, const PAD* aSecond ) const;
975 };
976
978 {
979 bool operator()( const PAD* aFirst, const PAD* aSecond ) const;
980 };
981
983 {
984 bool operator()( const ZONE* aFirst, const ZONE* aSecond ) const;
985 };
986
987protected:
988 virtual void swapData( BOARD_ITEM* aImage ) override;
989
990private:
991 PCB_FIELDS m_fields;
992 DRAWINGS m_drawings; // BOARD_ITEMs for drawings on the board, owned by pointer.
993 PADS m_pads; // PAD items, owned by pointer
994 ZONES m_zones; // PCB_ZONE items, owned by pointer
995 GROUPS m_groups; // PCB_GROUP items, owned by pointer
996
997 EDA_ANGLE m_orient; // Orientation
998 VECTOR2I m_pos; // Position of footprint on the board in internal units.
999 LIB_ID m_fpid; // The #LIB_ID of the FOOTPRINT.
1000 int m_attributes; // Flag bits (see FOOTPRINT_ATTR_T)
1001 int m_fpStatus; // For autoplace: flags (LOCKED, FIELDS_AUTOPLACED)
1003
1004 // Bounding box caching strategy:
1005 // While we attempt to notice the low-hanging fruit operations and update the bounding boxes
1006 // accordingly, we rely mostly on a "if anything changed then the caches are stale" approach.
1007 // We implement this by having PCB_BASE_FRAME's OnModify() method increment an operation
1008 // counter, and storing that as a timestamp for the various caches.
1009 // This means caches will get regenerated often -- but still far less often than if we had no
1010 // caches at all. The principal opitmization would be to change to dirty flag and make sure
1011 // that any edit that could affect the bounding boxes (including edits to the footprint
1012 // children) marked the bounding boxes dirty. It would definitely be faster -- but also more
1013 // fragile.
1022
1023 // A list of pad groups, each of which is allowed to short nets within their group.
1024 // A pad group is a comma-separated list of pad numbers.
1025 std::vector<wxString> m_netTiePadGroups;
1026
1027 // Optional overrides
1029 std::optional<int> m_clearance;
1030 std::optional<int> m_solderMaskMargin; // Solder mask margin
1031 std::optional<int> m_solderPasteMargin; // Solder paste margin absolute value
1032 std::optional<double> m_solderPasteMarginRatio; // Solder mask margin ratio of pad size
1033 // The final margin is the sum of these 2 values
1034
1035 wxString m_libDescription; // File name and path for documentation file.
1036 wxString m_keywords; // Search keywords to find footprint in library.
1037 KIID_PATH m_path; // Path to associated symbol ([sheetUUID, .., symbolUUID]).
1038 wxString m_sheetname; // Name of the sheet containing the symbol for this footprint
1039 wxString m_sheetfile; // File of the sheet containing the symbol for this footprint
1040 wxString m_filters; // Footprint filters from symbol
1042 int m_arflag; // Use to trace ratsnest and auto routing.
1043 KIID m_link; // Temporary logical link used during editing
1044 LSET m_privateLayers; // Layers visible only in the footprint editor
1045
1046 std::vector<FP_3DMODEL> m_3D_Drawings; // 3D models.
1047 wxArrayString* m_initial_comments; // s-expression comments in the footprint,
1048 // lazily allocated only if needed for speed
1049
1050 SHAPE_POLY_SET m_courtyard_cache_front; // Note that a footprint can have both front and back
1051 SHAPE_POLY_SET m_courtyard_cache_back; // courtyards populated.
1054 mutable std::mutex m_courtyard_cache_mutex;
1055};
1056
1057#endif // FOOTPRINT_H
BITMAPS
A list of all bitmap identifiers.
Definition: bitmaps_list.h:33
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
virtual PCB_LAYER_ID GetLayer() const
Return the primary layer this item is on.
Definition: board_item.h:226
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:282
const Vec GetCenter() const
Definition: box2.h:220
Implement a canvas based on a wxGLCanvas.
Definition: eda_3d_canvas.h:49
double AsDegrees() const
Definition: eda_angle.h:155
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:88
KICAD_T Type() const
Returns the type of object.
Definition: eda_item.h:100
virtual const wxString & GetText() const
Return the string associated with the text object.
Definition: eda_text.h:98
virtual void SetText(const wxString &aText)
Definition: eda_text.cpp:183
bool FixUuids()
Old footprints do not always have a valid UUID (some can be set to null uuid) However null UUIDs,...
Definition: footprint.cpp:635
std::optional< int > GetClearanceOverrides(wxString *aSource) const
Return any local clearance overrides set in the "classic" (ie: pre-rule) system.
Definition: footprint.h:308
void CheckShortingPads(const std::function< void(const PAD *, const PAD *, const VECTOR2I &)> &aErrorHandler)
Check for overlapping, different-numbered, non-net-tie pads.
Definition: footprint.cpp:3092
void SetPosition(const VECTOR2I &aPos) override
Definition: footprint.cpp:2297
void SetFPID(const LIB_ID &aFPID)
Definition: footprint.h:234
LIB_ID m_fpid
Definition: footprint.h:999
wxString GetLibDescription() const
Definition: footprint.h:243
ZONE_CONNECTION GetLocalZoneConnection() const
Definition: footprint.h:274
void SetLink(const KIID &aLink)
Definition: footprint.h:836
KIID_PATH m_path
Definition: footprint.h:1037
bool IsBoardOnly() const
Definition: footprint.h:718
int GetFieldCount() const
Return the number of fields in this symbol.
Definition: footprint.h:706
BOX2I m_cachedTextExcludedBBox
Definition: footprint.h:1018
void CheckPads(const std::function< void(const PAD *, int, const wxString &)> &aErrorHandler)
Run non-board-specific DRC checks on footprint's pads.
Definition: footprint.cpp:3013
bool IsDNP() const
Definition: footprint.h:754
void SetLocked(bool isLocked) override
Set the #MODULE_is_LOCKED bit in the m_ModuleStatus.
Definition: footprint.h:407
VECTOR2I GetCenter() const override
This defaults to the center of the bounding box if not overridden.
Definition: footprint.h:183
std::vector< PAD * > GetNetTiePads(PAD *aPad) const
Definition: footprint.cpp:2966
bool ResolveTextVar(wxString *token, int aDepth=0) const
Resolve any references to system tokens supported by the component.
Definition: footprint.cpp:891
EDA_ANGLE GetOrientation() const
Definition: footprint.h:212
bool HasFieldByName(const wxString &aFieldName) const
Definition: footprint.cpp:527
ZONES & Zones()
Definition: footprint.h:197
bool Deserialize(const google::protobuf::Any &aContainer) override
Deserializes the given protobuf message into this object.
Definition: footprint.cpp:367
MD5_HASH m_courtyard_cache_front_hash
Definition: footprint.h:1052
void Remove(BOARD_ITEM *aItem, REMOVE_MODE aMode=REMOVE_MODE::NORMAL) override
Removes an item from the container.
Definition: footprint.cpp:1031
void SetIsPlaced(bool isPlaced)
Definition: footprint.h:421
ZONE_CONNECTION m_zoneConnection
Definition: footprint.h:1028
BOX2I m_cachedBoundingBox
Definition: footprint.h:1014
static double GetCoverageArea(const BOARD_ITEM *aItem, const GENERAL_COLLECTOR &aCollector)
Definition: footprint.cpp:2613
bool IsExcludedFromBOM() const
Definition: footprint.h:736
void SetOrientation(const EDA_ANGLE &aNewAngle)
Definition: footprint.cpp:2369
void SetFlag(int aFlag)
Definition: footprint.h:279
std::optional< double > m_solderPasteMarginRatio
Definition: footprint.h:1032
PCB_FIELD * GetFieldByName(const wxString &aFieldName)
Return a field in this symbol.
Definition: footprint.cpp:538
void SetDNP(bool aDNP=true)
Definition: footprint.h:755
static bool IsLibNameValid(const wxString &aName)
Test for validity of a name of a footprint to be used in a footprint library ( no spaces,...
Definition: footprint.cpp:2163
unsigned GetPadCount(INCLUDE_NPTH_T aIncludeNPTH=INCLUDE_NPTH_T(INCLUDE_NPTH)) const
Return the number of pads.
Definition: footprint.cpp:1815
void SetLocalSolderPasteMarginRatio(std::optional< double > aRatio)
Definition: footprint.h:271
void IncrementFlag()
Definition: footprint.h:280
const BOX2I GetLayerBoundingBox(LSET aLayers) const
Return the bounding box of the footprint on a given set of layers.
Definition: footprint.cpp:1378
std::optional< int > m_clearance
Definition: footprint.h:1029
PCB_FIELD * AddField(const PCB_FIELD &aField)
Add a field to the symbol.
Definition: footprint.cpp:580
void CheckNetTies(const std::function< void(const BOARD_ITEM *aItem, const BOARD_ITEM *bItem, const BOARD_ITEM *cItem, const VECTOR2I &)> &aErrorHandler)
Check for un-allowed shorting of pads in net-tie footprints.
Definition: footprint.cpp:3138
void SetExcludedFromBOM(bool aExclude=true)
Definition: footprint.h:737
wxString GetSheetname() const
Definition: footprint.h:252
int m_fpStatus
Definition: footprint.h:1001
void SetPath(const KIID_PATH &aPath)
Definition: footprint.h:250
PCB_FIELDS GetFields()
Return a vector of fields from the symbol.
Definition: footprint.h:684
double ViewGetLOD(int aLayer, KIGFX::VIEW *aView) const override
Return the level of detail (LOD) of the item.
Definition: footprint.cpp:2107
SHAPE_POLY_SET m_cachedHull
Definition: footprint.h:1020
std::set< wxString > GetUniquePadNumbers(INCLUDE_NPTH_T aIncludeNPTH=INCLUDE_NPTH_T(INCLUDE_NPTH)) const
Return the names of the unique, non-blank pads.
Definition: footprint.cpp:1834
void SetFilters(const wxString &aFilters)
Definition: footprint.h:259
void SetAllowMissingCourtyard(bool aAllow=true)
Definition: footprint.h:746
void SetKeywords(const wxString &aKeywords)
Definition: footprint.h:247
const DRAWINGS & GraphicalItems() const
Definition: footprint.h:195
void SetInitialComments(wxArrayString *aInitialComments)
Take ownership of caller's heap allocated aInitialComments block.
Definition: footprint.h:920
int m_attributes
Definition: footprint.h:1000
PCB_LAYER_ID GetSide() const
Use instead of IsFlipped() when you also need to account for unsided footprints (those purely on user...
Definition: footprint.cpp:1585
PCB_FIELD & Footprint()
Definition: footprint.h:626
std::vector< FP_3DMODEL > m_3D_Drawings
Definition: footprint.h:1046
double CoverageRatio(const GENERAL_COLLECTOR &aCollector) const
Calculate the ratio of total area of the footprint pads and graphical items to the area of the footpr...
Definition: footprint.cpp:2696
BOARD_ITEM * DuplicateItem(const BOARD_ITEM *aItem, bool aAddToFootprint=false)
Duplicate a given item within the footprint, optionally adding it to the board.
Definition: footprint.cpp:2409
std::shared_ptr< SHAPE > GetEffectiveShape(PCB_LAYER_ID aLayer=UNDEFINED_LAYER, FLASHING aFlash=FLASHING::DEFAULT) const override
Some pad shapes can be complex (rounded/chamfered rectangle), even without considering custom shapes.
Definition: footprint.cpp:2758
void RunOnChildren(const std::function< void(BOARD_ITEM *)> &aFunction) const override
Invoke a function on all descendants.
Definition: footprint.cpp:1992
void SetAttributes(int aAttributes)
Definition: footprint.h:277
void SetSheetfile(const wxString &aSheetfile)
Definition: footprint.h:256
BITMAPS GetMenuImage() const override
Return a pointer to an image to be used in menus.
Definition: footprint.cpp:1980
void RunOnDescendants(const std::function< void(BOARD_ITEM *)> &aFunction, int aDepth=0) const override
Invoke a function on all descendants.
Definition: footprint.cpp:2018
std::optional< int > GetLocalSolderPasteMargin() const
Definition: footprint.h:267
void TransformPadsToPolySet(SHAPE_POLY_SET &aBuffer, PCB_LAYER_ID aLayer, int aClearance, int aMaxError, ERROR_LOC aErrorLoc, bool aSkipNPTHPadsWihNoCopper=false, bool aSkipPlatedPads=false, bool aSkipNonPlatedPads=false) const
Generate pads shapes on layer aLayer as polygons and adds these polygons to aBuffer.
Definition: footprint.cpp:3573
wxArrayString * m_initial_comments
Definition: footprint.h:1047
EDA_ITEM * Clone() const override
Invoke a function on all children.
Definition: footprint.cpp:1986
BOX2I m_cachedVisibleBBox
Definition: footprint.h:1016
BOX2I GetFpPadsLocalBbox() const
Return the bounding box containing pads when the footprint is on the front side, orientation 0,...
Definition: footprint.cpp:1196
int m_visibleBBoxCacheTimeStamp
Definition: footprint.h:1017
PCB_FIELD & Value()
read/write accessors:
Definition: footprint.h:624
void Rotate(const VECTOR2I &aRotCentre, const EDA_ANGLE &aAngle) override
Rotate this object.
Definition: footprint.cpp:2201
std::optional< int > m_solderPasteMargin
Definition: footprint.h:1031
void SetFileFormatVersionAtLoad(int aVersion)
Definition: footprint.h:763
std::mutex m_courtyard_cache_mutex
Definition: footprint.h:1054
void SetExcludedFromPosFiles(bool aExclude=true)
Definition: footprint.h:728
const PCB_FIELD & Footprint() const
Definition: footprint.h:631
void SetOrientationDegrees(double aOrientation)
Definition: footprint.h:224
void SetPrivateLayers(LSET aLayers)
Adds an item to the container.
Definition: footprint.h:129
void ApplyDefaultSettings(const BOARD &board, bool aStyleFields, bool aStyleText, bool aStyleShapes)
Apply default board settings to the footprint field text properties.
Definition: footprint.cpp:602
std::map< wxString, int > MapPadNumbersToNetTieGroups() const
Definition: footprint.cpp:2911
std::optional< int > GetLocalClearance() const
Definition: footprint.h:261
double Similarity(const BOARD_ITEM &aOther) const override
Return a measure of how likely the other object is to represent the same object.
Definition: footprint.cpp:3363
void TransformFPTextToPolySet(SHAPE_POLY_SET &aBuffer, PCB_LAYER_ID aLayer, int aClearance, int aError, ERROR_LOC aErrorLoc) const
This function is the same as TransformFPShapesToPolySet but only generates text.
Definition: footprint.h:537
void MoveAnchorPosition(const VECTOR2I &aMoveVector)
Move the reference point of the footprint.
Definition: footprint.cpp:2324
FOOTPRINT & operator=(const FOOTPRINT &aOther)
Definition: footprint.cpp:767
int m_arflag
Definition: footprint.h:1042
double GetOrientationDegrees() const
Definition: footprint.h:228
BOARD_ITEM * Duplicate() const override
Create a copy of this BOARD_ITEM.
Definition: footprint.cpp:2396
INSPECT_RESULT Visit(INSPECTOR inspector, void *testData, const std::vector< KICAD_T > &aScanTypes) override
May be re-implemented for each derived class in order to handle all the types given by its member dat...
Definition: footprint.cpp:1882
void Serialize(google::protobuf::Any &aContainer) const override
Serializes this object to the given Any message.
Definition: footprint.cpp:262
int GetAttributes() const
Definition: footprint.h:276
std::optional< int > GetLocalClearance(wxString *aSource) const
Definition: footprint.h:294
void SetLocalZoneConnection(ZONE_CONNECTION aType)
Definition: footprint.h:273
bool FootprintNeedsUpdate(const FOOTPRINT *aLibFP, REPORTER *aReporter=nullptr)
Return true if a board footprint differs from the library version.
void ClearNetTiePadGroups()
Definition: footprint.h:327
PCB_LAYER_ID GetLayer() const override
Return the primary layer this item is on.
Definition: footprint.h:221
LSET GetPrivateLayers() const
Definition: footprint.h:128
wxString GetFPIDAsString() const
Definition: footprint.h:240
wxString GetValueAsString() const
Definition: footprint.h:618
bool AllowMissingCourtyard() const
Definition: footprint.h:745
const ZONES & Zones() const
Definition: footprint.h:198
bool IsFlipped() const
Definition: footprint.h:377
wxString GetSheetfile() const
Definition: footprint.h:255
PADS & Pads()
Definition: footprint.h:191
SHAPE_POLY_SET GetBoundingHull() const
Return a bounding polygon for the shapes and pads in the footprint.
Definition: footprint.cpp:1423
void TransformFPShapesToPolySet(SHAPE_POLY_SET &aBuffer, PCB_LAYER_ID aLayer, int aClearance, int aError, ERROR_LOC aErrorLoc, bool aIncludeText=true, bool aIncludeShapes=true, bool aIncludePrivateItems=false) const
Generate shapes of graphic items (outlines) on layer aLayer as polygons and adds these polygons to aB...
Definition: footprint.cpp:3646
wxString GetTypeName() const
Get the type of footprint.
Definition: footprint.cpp:1184
DRAWINGS m_drawings
Definition: footprint.h:992
bool NeedsPlaced() const
Definition: footprint.h:429
PCB_FIELD * GetFieldById(int aFieldId)
Return a field in this symbol.
Definition: footprint.cpp:516
SHAPE_POLY_SET m_courtyard_cache_back
Definition: footprint.h:1051
int m_textExcludedBBoxCacheTimeStamp
Definition: footprint.h:1019
const std::vector< wxString > & GetNetTiePadGroups() const
Definition: footprint.h:325
const LIB_ID & GetFPID() const
Definition: footprint.h:233
void SetReference(const wxString &aReference)
Definition: footprint.h:594
bool IsLocked() const override
Definition: footprint.h:397
const GROUPS & Groups() const
Definition: footprint.h:201
bool IsExcludedFromPosFiles() const
Definition: footprint.h:727
void SetLayerAndFlip(PCB_LAYER_ID aLayer)
Used as Layer property setter – performs a flip if necessary to set the footprint layer.
Definition: footprint.cpp:2229
ZONES m_zones
Definition: footprint.h:994
int m_hullCacheTimeStamp
Definition: footprint.h:1021
unsigned GetUniquePadCount(INCLUDE_NPTH_T aIncludeNPTH=INCLUDE_NPTH_T(INCLUDE_NPTH)) const
Return the number of unique non-blank pads.
Definition: footprint.cpp:1865
void AddNetTiePadGroup(const wxString &aGroup)
Definition: footprint.h:332
bool LegacyPadsLocked() const
Definition: footprint.h:438
virtual const BOX2I ViewBBox() const override
Return the bounding box of the item covering all its layers.
Definition: footprint.cpp:2148
LSET m_privateLayers
Definition: footprint.h:1044
int GetLikelyAttribute() const
Returns the most likely attribute based on pads Either FP_THROUGH_HOLE/FP_SMD/OTHER(0)
Definition: footprint.cpp:1132
void Move(const VECTOR2I &aMoveVector) override
Move this object.
Definition: footprint.cpp:2191
static bool ClassOf(const EDA_ITEM *aItem)
Definition: footprint.h:123
wxString m_libDescription
Definition: footprint.h:1035
bool HitTestOnLayer(const VECTOR2I &aPosition, PCB_LAYER_ID aLayer, int aAccuracy=0) const
Test if the point hits one or more of the footprint elements on a given layer.
Definition: footprint.cpp:1647
VECTOR2I m_pos
Definition: footprint.h:998
ZONE_CONNECTION GetZoneConnectionOverrides(wxString *aSource) const
Definition: footprint.h:313
std::vector< wxString > m_netTiePadGroups
Definition: footprint.h:1025
PAD * GetPad(const VECTOR2I &aPosition, LSET aLayerMask=LSET::AllLayersMask())
Get a pad at aPosition on aLayerMask in the footprint.
Definition: footprint.cpp:1799
void Add3DModel(FP_3DMODEL *a3DModel)
Add a3DModel definition to the end of the 3D model list.
Definition: footprint.cpp:1871
void SetValue(const wxString &aValue)
Definition: footprint.h:615
GROUPS m_groups
Definition: footprint.h:995
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: footprint.cpp:1505
PCB_FIELD & Reference()
Definition: footprint.h:625
const PCB_FIELD & Value() const
The const versions to keep the compiler happy.
Definition: footprint.h:629
wxString GetReferenceAsString() const
Definition: footprint.h:597
wxString m_sheetfile
Definition: footprint.h:1039
void GetContextualTextVars(wxArrayString *aVars) const
Return the list of system text vars for this footprint.
Definition: footprint.cpp:877
std::optional< int > m_solderMaskMargin
Definition: footprint.h:1030
SHAPE_POLY_SET m_courtyard_cache_front
Definition: footprint.h:1050
void Add(BOARD_ITEM *aItem, ADD_MODE aMode=ADD_MODE::INSERT, bool aSkipConnectivity=false) override
Removes an item from the container.
Definition: footprint.cpp:968
void AutoPositionFields()
Position Reference and Value fields at the top and bottom of footprint's bounding box.
Definition: footprint.cpp:2558
wxString m_keywords
Definition: footprint.h:1036
const PCB_FIELD & Reference() const
Definition: footprint.h:630
void ClearAllNets()
Clear (i.e.
Definition: footprint.cpp:959
bool HasThroughHolePads() const
Definition: footprint.cpp:3298
void BuildCourtyardCaches(OUTLINE_ERROR_HANDLER *aErrorHandler=nullptr)
Build complex polygons of the courtyard areas from graphic items on the courtyard layers.
Definition: footprint.cpp:2811
bool IsOnLayer(PCB_LAYER_ID aLayer) const override
Test to see if this object is on the given layer.
Definition: footprint.cpp:1616
wxString GetFieldText(const wxString &aFieldName) const
Search for a field named aFieldName and returns text associated with this field.
Definition: footprint.cpp:553
EDA_ANGLE m_orient
Definition: footprint.h:997
bool HitTestAccurate(const VECTOR2I &aPosition, int aAccuracy=0) const
Test if a point is inside the bounding polygon of the footprint.
Definition: footprint.cpp:1722
bool IsNetTie() const
Definition: footprint.h:283
wxString GetClass() const override
Return the class name.
Definition: footprint.h:857
const PCB_FIELDS & Fields() const
Definition: footprint.h:189
const PADS & Pads() const
Definition: footprint.h:192
void IncrementReference(int aDelta)
Bump the current reference by aDelta.
Definition: footprint.cpp:2586
int GetFileFormatVersionAtLoad() const
Definition: footprint.h:764
std::optional< double > GetLocalSolderPasteMarginRatio() const
Definition: footprint.h:270
KIID m_link
Definition: footprint.h:1043
void RemoveField(const wxString &aFieldName)
Remove a user field from the footprint.
Definition: footprint.cpp:589
GROUPS & Groups()
Definition: footprint.h:200
wxString GetFilters() const
Definition: footprint.h:258
void SetSheetname(const wxString &aSheetname)
Definition: footprint.h:253
const wxArrayString * GetInitialComments() const
Return the initial comments block or NULL if none, without transfer of ownership.
Definition: footprint.h:937
MD5_HASH m_courtyard_cache_back_hash
Definition: footprint.h:1053
KIID GetLink() const
Definition: footprint.h:835
bool IsConflicting() const
Definition: footprint.cpp:871
std::vector< FP_3DMODEL > & Models()
Definition: footprint.h:205
PCB_FIELDS & Fields()
Definition: footprint.h:188
static const wxChar * StringLibNameInvalidChars(bool aUserReadable)
Test for validity of the name in a library of the footprint ( no spaces, dir separators ....
Definition: footprint.cpp:2174
void SetLibDescription(const wxString &aDesc)
Definition: footprint.h:244
void Flip(const VECTOR2I &aCentre, bool aFlipLeftRight) override
Flip this object, i.e.
Definition: footprint.cpp:2238
const wxString & GetValue() const
Definition: footprint.h:610
double GetArea(int aPadding=0) const
Definition: footprint.cpp:1122
const PCB_FIELDS & GetFields() const
Definition: footprint.h:685
void SetNeedsPlaced(bool needsPlaced)
Definition: footprint.h:430
wxString m_filters
Definition: footprint.h:1040
const wxString & GetReference() const
Definition: footprint.h:588
void CheckNetTiePadGroups(const std::function< void(const wxString &)> &aErrorHandler)
Sanity check net-tie pad groups.
Definition: footprint.cpp:3251
void SetFPIDAsString(const wxString &aFPID)
Definition: footprint.h:241
void SetBoardOnly(bool aIsBoardOnly=true)
Definition: footprint.h:719
const std::vector< FP_3DMODEL > & Models() const
Definition: footprint.h:206
void SetLocalSolderMaskMargin(std::optional< int > aMargin)
Definition: footprint.h:265
PCB_FIELD * GetField(MANDATORY_FIELD_T aFieldType)
Return a mandatory field in this symbol.
Definition: footprint.cpp:504
timestamp_t m_lastEditTime
Definition: footprint.h:1041
const SHAPE_POLY_SET & GetCourtyard(PCB_LAYER_ID aLayer) const
Used in DRC to test the courtyard area (a complex polygon).
Definition: footprint.cpp:2794
int GetFlag() const
Definition: footprint.h:281
wxString m_sheetname
Definition: footprint.h:1038
virtual void ViewGetLayers(int aLayers[], int &aCount) const override
Return the all the layers within the VIEW the object is painted on.
Definition: footprint.cpp:2055
int m_fileFormatVersionAtLoad
Definition: footprint.h:1002
void SetLocalClearance(std::optional< int > aClearance)
Definition: footprint.h:262
const KIID_PATH & GetPath() const
Definition: footprint.h:249
std::optional< int > GetLocalSolderMaskMargin() const
Definition: footprint.h:264
void SetLocalSolderPasteMargin(std::optional< int > aMargin)
Definition: footprint.h:268
wxString GetKeywords() const
Definition: footprint.h:246
bool operator==(const BOARD_ITEM &aOther) const override
Definition: footprint.cpp:3310
void CheckFootprintAttributes(const std::function< void(const wxString &)> &aErrorHandler)
Test if footprint attributes for type (SMD/Through hole/Other) match the expected type based on the p...
Definition: footprint.cpp:2988
PADS m_pads
Definition: footprint.h:993
virtual void swapData(BOARD_ITEM *aImage) override
Definition: footprint.cpp:3276
wxString GetNextPadNumber(const wxString &aLastPadName) const
Return the next available pad number in the footprint.
Definition: footprint.cpp:2538
bool IsPlaced() const
Definition: footprint.h:420
int m_boundingBoxCacheTimeStamp
Definition: footprint.h:1015
VECTOR2I GetPosition() const override
Definition: footprint.h:209
DRAWINGS & GraphicalItems()
Definition: footprint.h:194
PCB_FIELDS m_fields
Definition: footprint.h:991
bool HitTest(const VECTOR2I &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this item.
Definition: footprint.cpp:1715
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider) const override
Return a user-visible description string of this item.
Definition: footprint.cpp:1969
PAD * FindPadByNumber(const wxString &aPadNumber, PAD *aSearchAfterMe=nullptr) const
Return a PAD with a matching number.
Definition: footprint.cpp:1779
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
Definition: footprint.cpp:1221
VECTOR3D m_Offset
3D model offset (mm)
Definition: footprint.h:98
double m_Opacity
Definition: footprint.h:99
VECTOR3D m_Rotation
3D model rotation (degrees)
Definition: footprint.h:97
FP_3DMODEL()
Definition: footprint.h:86
VECTOR3D m_Scale
3D model scaling factor (dimensionless)
Definition: footprint.h:96
wxString m_Filename
The 3D shape filename in 3D library.
Definition: footprint.h:100
bool m_Show
Include model in rendering.
Definition: footprint.h:101
Used when the right click button is pressed, or when the select tool is in effect.
Definition: collectors.h:206
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
A logical library item identifier and consists of various portions much like a URI.
Definition: lib_id.h:49
int Parse(const UTF8 &aId, bool aFix=false)
Parse LIB_ID with the information from aId.
Definition: lib_id.cpp:51
UTF8 Format() const
Definition: lib_id.cpp:118
An abstract class from which implementation specific LINE_READERs may be derived to read single lines...
Definition: richio.h:93
LSET is a set of PCB_LAYER_IDs.
Definition: layer_ids.h:575
static LSET AllLayersMask()
Definition: lset.cpp:898
EDA_MSG_PANEL items for displaying messages.
Definition: msgpanel.h:54
Definition: pad.h:59
A pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:71
Represent a set of closed polygons.
An abstract shape on 2D plane.
Definition: shape.h:126
Handle a list of polygons defining a copper zone.
Definition: zone.h:72
const std::function< void(const wxString &msg, BOARD_ITEM *itemA, BOARD_ITEM *itemB, const VECTOR2I &pt)> OUTLINE_ERROR_HANDLER
#define _(s)
@ DEGREES_T
Definition: eda_angle.h:31
INSPECT_RESULT
Definition: eda_item.h:43
const INSPECTOR_FUNC & INSPECTOR
Definition: eda_item.h:81
INCLUDE_NPTH_T
Definition: footprint.h:60
@ INCLUDE_NPTH
Definition: footprint.h:62
@ DO_NOT_INCLUDE_NPTH
Definition: footprint.h:61
FOOTPRINT_ATTR_T
The set of attributes allowed within a FOOTPRINT, using FOOTPRINT::SetAttributes() and FOOTPRINT::Get...
Definition: footprint.h:71
@ FP_SMD
Definition: footprint.h:73
@ FP_DNP
Definition: footprint.h:80
@ FP_ALLOW_MISSING_COURTYARD
Definition: footprint.h:79
@ FP_EXCLUDE_FROM_POS_FILES
Definition: footprint.h:74
@ FP_BOARD_ONLY
Definition: footprint.h:76
@ FP_EXCLUDE_FROM_BOM
Definition: footprint.h:75
@ FP_JUST_ADDED
Definition: footprint.h:77
@ FP_THROUGH_HOLE
Definition: footprint.h:72
@ FP_ALLOW_SOLDERMASK_BRIDGES
Definition: footprint.h:78
#define FP_is_PLACED
In autoplace: footprint automatically placed.
Definition: footprint.h:392
#define FP_is_LOCKED
footprint LOCKED: no autoplace allowed
Definition: footprint.h:391
#define FP_PADS_are_LOCKED
Definition: footprint.h:394
#define FP_to_PLACE
In autoplace: footprint waiting for autoplace.
Definition: footprint.h:393
ERROR_LOC
When approximating an arc or circle, should the error be placed on the outside or inside of the curve...
uint32_t timestamp_t
timestamp_t is our type to represent unique IDs for all kinds of elements; historically simply the ti...
Definition: kiid.h:46
FLASHING
Enum used during connectivity building to ensure we do not query connectivity while building the data...
Definition: layer_ids.h:149
PCB_LAYER_ID
A quick note on layer IDs:
Definition: layer_ids.h:60
@ B_Cu
Definition: layer_ids.h:95
@ UNDEFINED_LAYER
Definition: layer_ids.h:61
The Cairo implementation of the graphics abstraction layer.
Definition: color4d.cpp:247
std::vector< ZONE * > ZONES
Definition: pcb_io_eagle.h:46
bool operator()(const BOARD_ITEM *itemA, const BOARD_ITEM *itemB) const
Definition: footprint.cpp:3387
bool operator()(const PAD *aFirst, const PAD *aSecond) const
Definition: footprint.cpp:3464
bool operator()(const PAD *aFirst, const PAD *aSecond) const
Definition: footprint.cpp:3492
bool operator()(const ZONE *aFirst, const ZONE *aSecond) const
Definition: footprint.cpp:3547
MANDATORY_FIELD_T
The set of all field indices assuming an array like sequence that a SCH_COMPONENT or LIB_PART can hol...
@ FOOTPRINT_FIELD
Field Name Module PCB, i.e. "16DIP300".
@ VALUE_FIELD
Field Value of part, i.e. "3.3K".
@ REFERENCE_FIELD
Field Reference of part, i.e. "IC21".
@ PCB_FOOTPRINT_T
class FOOTPRINT, a footprint
Definition: typeinfo.h:86
ZONE_CONNECTION
How pads are covered by copper in zone.
Definition: zones.h:47