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 The 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, see <https://www.gnu.org/licenses/>.
19 */
20
21#ifndef FOOTPRINT_H
22#define FOOTPRINT_H
23
24#include <deque>
25#include <map>
26#include <memory>
27#include <mutex>
28#include <optional>
29#include <unordered_set>
30
31#include <template_fieldnames.h>
32
34#include <board_item.h>
35#include <embedded_files.h>
36#include <layer_ids.h> // ALL_LAYERS definition.
37#include <lset.h>
38#include <lib_id.h>
39#include <lib_tree_item.h>
40#include <list>
41
42#include <zones.h>
44#include <pcb_item_containers.h>
45#include <pcb_field.h>
46#include <functional>
47#include <math/vector3.h>
50#include <gal/color4d.h>
51
52class LINE_READER;
53class EDA_3D_CANVAS;
54class PAD;
55class BOARD;
56class COMPONENT_CLASS;
58class MSG_PANEL_ITEM;
59class SHAPE;
60class REPORTER;
63class PCB_POINT;
64
65namespace KIGFX {
66class VIEW;
67}
68
69namespace KIFONT {
70class OUTLINE_FONT;
71}
72
73namespace kiapi::board::types
74{
75class Footprint;
76}
77
84{
86 FP_SMD = 0x0002,
89 FP_BOARD_ONLY = 0x0010, // Footprint has no corresponding symbol
90 FP_JUST_ADDED = 0x0020, // Footprint just added by netlist update
91 FP_DNP = 0x0040,
93};
94
95
102
103
111
113{
114public:
115 EXTRUDED_3D_BODY() = default;
116
117 int m_height = 0;
118 int m_standoff = 0;
122 bool m_show = true;
123
124 VECTOR3D m_scale{ 1.0, 1.0, 1.0 };
125 VECTOR3D m_rotation{ 0.0, 0.0, 0.0 };
126 VECTOR3D m_offset{ 0.0, 0.0, 0.0 };
127
129 {
130 switch( aMaterial )
131 {
132 default:
133 case EXTRUSION_MATERIAL::PLASTIC: return KIGFX::COLOR4D( 0.2, 0.2, 0.2, 1.0 );
134 case EXTRUSION_MATERIAL::MATTE: return KIGFX::COLOR4D( 0.4, 0.4, 0.4, 1.0 );
135 case EXTRUSION_MATERIAL::METAL: return KIGFX::COLOR4D( 0.7, 0.7, 0.7, 1.0 );
136 case EXTRUSION_MATERIAL::COPPER: return KIGFX::COLOR4D( 0.72, 0.45, 0.2, 1.0 );
137 }
138 }
139
140 bool operator==( const EXTRUDED_3D_BODY& aOther ) const
141 {
142 return m_height == aOther.m_height && m_standoff == aOther.m_standoff && m_layer == aOther.m_layer
143 && m_color == aOther.m_color && m_material == aOther.m_material && m_scale == aOther.m_scale
144 && m_rotation == aOther.m_rotation && m_offset == aOther.m_offset && m_show == aOther.m_show;
145 }
146
147 static uint32_t PackColorKey( const KIGFX::COLOR4D& aColor )
148 {
149 return ( (uint8_t) ( aColor.r * 255 ) << 24 ) | ( (uint8_t) ( aColor.g * 255 ) << 16 )
150 | ( (uint8_t) ( aColor.b * 255 ) << 8 ) | (uint8_t) ( aColor.a * 255 );
151 }
152};
153
167
169{
170public:
172 // Initialize with sensible values
173 m_Scale { 1, 1, 1 },
174 m_Rotation { 0, 0, 0 },
175 m_Offset { 0, 0, 0 },
176 m_Opacity( 1.0 ),
177 m_Show( true )
178 {
179 }
180
184 double m_Opacity;
185 wxString m_Filename;
186 bool m_Show;
187
188 bool operator==( const FP_3DMODEL& aOther ) const
189 {
190 return m_Scale == aOther.m_Scale
191 && m_Rotation == aOther.m_Rotation
192 && m_Offset == aOther.m_Offset
193 && m_Opacity == aOther.m_Opacity
194 && m_Filename == aOther.m_Filename
195 && m_Show == aOther.m_Show;
196 }
197};
198
199
201{
202 SHAPE_POLY_SET front; // Note that a footprint can have both front and back courtyards populated.
206};
207
208
218
219
227{
228public:
229 FOOTPRINT_VARIANT( const wxString& aName = wxEmptyString ) :
230 m_name( aName ),
231 m_dnp( false ),
232 m_excludedFromBOM( false ),
233 m_excludedFromSim( false ),
235 {
236 }
237
238 wxString GetName() const { return m_name; }
239 void SetName( const wxString& aName ) { m_name = aName; }
240
241 bool GetDNP() const { return m_dnp; }
242 void SetDNP( bool aDNP ) { m_dnp = aDNP; }
243
244 bool GetExcludedFromBOM() const { return m_excludedFromBOM; }
245 void SetExcludedFromBOM( bool aExclude ) { m_excludedFromBOM = aExclude; }
246
247 bool GetExcludedFromSim() const { return m_excludedFromSim; }
248 void SetExcludedFromSim( bool aExclude ) { m_excludedFromSim = aExclude; }
249
251 void SetExcludedFromPosFiles( bool aExclude ) { m_excludedFromPosFiles = aExclude; }
252
258 wxString GetFieldValue( const wxString& aFieldName ) const
259 {
260 auto it = m_fields.find( aFieldName );
261
262 if( it != m_fields.end() )
263 return it->second;
264
265 return wxString();
266 }
267
273 void SetFieldValue( const wxString& aFieldName, const wxString& aValue )
274 {
275 m_fields[aFieldName] = aValue;
276 }
277
281 void RemoveFieldValue( const wxString& aFieldName )
282 {
283 m_fields.erase( aFieldName );
284 }
285
286 bool HasFieldValue( const wxString& aFieldName ) const
287 {
288 return m_fields.find( aFieldName ) != m_fields.end();
289 }
290
291 const std::map<wxString, wxString>& GetFields() const { return m_fields; }
292
293 bool operator==( const FOOTPRINT_VARIANT& aOther ) const
294 {
295 return m_name == aOther.m_name
296 && m_dnp == aOther.m_dnp
300 && m_fields == aOther.m_fields;
301 }
302
303private:
304 wxString m_name;
305 bool m_dnp;
309 std::map<wxString, wxString> m_fields;
310};
311
312
314{
315public:
316 FOOTPRINT( BOARD* parent );
317
318 FOOTPRINT( const FOOTPRINT& aFootprint );
319
320 // Move constructor and operator needed due to std containers inside the footprint
321 FOOTPRINT( FOOTPRINT&& aFootprint );
322
323 ~FOOTPRINT();
324
325 FOOTPRINT& operator=( const FOOTPRINT& aOther );
326 FOOTPRINT& operator=( FOOTPRINT&& aOther );
327
328 void CopyFrom( const BOARD_ITEM* aOther ) override;
329
330 void Serialize( google::protobuf::Any &aContainer ) const override;
331 bool Deserialize( const google::protobuf::Any &aContainer ) override;
332
333 void SerializeDefinition( kiapi::board::types::Footprint* aOutput ) const;
334 bool DeserializeDefinition( const kiapi::board::types::Footprint& aInput );
335
336 static inline bool ClassOf( const EDA_ITEM* aItem )
337 {
338 return aItem && aItem->Type() == PCB_FOOTPRINT_T;
339 }
340
343
345 void SetPrivateLayers( const LSET& aLayers ) { m_privateLayers = aLayers; }
346
348 void Add( BOARD_ITEM* aItem, ADD_MODE aMode = ADD_MODE::INSERT,
349 bool aSkipConnectivity = false ) override;
350
352 void Remove( BOARD_ITEM* aItem, REMOVE_MODE aMode = REMOVE_MODE::NORMAL ) override;
353
361 void ClearAllNets();
362
370 bool FixUuids();
371
382
390
391 bool TextOnly() const;
392
393 // Virtual function
394 const BOX2I GetBoundingBox() const override;
395 const BOX2I GetBoundingBox( bool aIncludeText ) const;
396
400 const BOX2I GetLayerBoundingBox( const LSET& aLayers ) const;
401
402 VECTOR2I GetCenter() const override { return GetBoundingBox( false ).GetCenter(); }
403
404 std::deque<PAD*>& Pads() { return m_pads; }
405 const std::deque<PAD*>& Pads() const { return m_pads; }
406
408 const DRAWINGS& GraphicalItems() const { return m_drawings; }
409
410 ZONES& Zones() { return m_zones; }
411 const ZONES& Zones() const { return m_zones; }
412
413 GROUPS& Groups() { return m_groups; }
414 const GROUPS& Groups() const { return m_groups; }
415
417 const CONSTRAINTS& Constraints() const { return m_constraints; }
418
420 const PCB_POINTS& Points() const { return m_points; }
421
422 bool HasThroughHolePads() const;
423
424 std::vector<FP_3DMODEL>& Models() { return m_3D_Drawings; }
425 const std::vector<FP_3DMODEL>& Models() const { return m_3D_Drawings; }
426
427 bool HasExtrudedBody() const { return m_extrudedBody != nullptr; }
428 const EXTRUDED_3D_BODY* GetExtrudedBody() const { return m_extrudedBody.get(); }
431 void SetExtrudedBody( std::unique_ptr<EXTRUDED_3D_BODY> aBody );
433
434 void SetPosition( const VECTOR2I& aPos ) override;
435 VECTOR2I GetPosition() const override { return m_transform.GetTranslate(); }
436
437 void SetOrientation( const EDA_ANGLE& aNewAngle );
438 EDA_ANGLE GetOrientation() const { return m_transform.GetRotate(); }
439
444 void SetLayerAndFlip( PCB_LAYER_ID aLayer );
445
446 void SetLayer( PCB_LAYER_ID aLayer ) override;
447
448 // A footprint's m_layer is set to F_Cu or B_Cu to encode which side of the board it's on.
449 PCB_LAYER_ID GetLayer() const override { return m_layer; }
450
451 const TRANSFORM_TRS& GetTransform() const { return m_transform; }
452
453 void SetTransformScale( double aScaleX, double aScaleY );
454
455 double GetScaleX() const { return m_transform.GetScaleX(); }
456 double GetScaleY() const { return m_transform.GetScaleY(); }
457
458 void SetScaleX( double aScaleX ) { SetTransformScale( aScaleX, m_transform.GetScaleY() ); }
459
460 void SetScaleY( double aScaleY ) { SetTransformScale( m_transform.GetScaleX(), aScaleY ); }
461
462 void RescaleAroundPoint( const VECTOR2I& aCenter, double aSx, double aSy );
463
464 void SetOrientationDegrees( double aOrientation )
465 {
466 SetOrientation( EDA_ANGLE( aOrientation, DEGREES_T ) );
467 }
469 {
470 return m_transform.GetRotate().AsDegrees();
471 }
472
473 const LIB_ID& GetFPID() const { return m_fpid; }
474 void SetFPID( const LIB_ID& aFPID )
475 {
476 m_fpid = aFPID;
477 }
478
479 wxString GetFPIDAsString() const { return m_fpid.Format(); }
480 void SetFPIDAsString( const wxString& aFPID ) { m_fpid.Parse( aFPID ); }
481
482 // LIB_TREE_ITEM interface
483 LIB_ID GetLIB_ID() const override { return m_fpid; }
484 wxString GetName() const override { return m_fpid.GetLibItemName(); }
485 wxString GetLibNickname() const override { return m_fpid.GetLibNickname(); }
486 wxString GetDesc() override { return GetLibDescription(); }
487 int GetPinCount() override { return static_cast<int>( GetNumberedPadCount() ); }
488 std::vector<SEARCH_TERM>& GetSearchTerms() override;
489
490 wxString GetLibDescription() const { return m_libDescription; }
491 void SetLibDescription( const wxString& aDesc ) { m_libDescription = aDesc; }
492
493 wxString GetKeywords() const { return m_keywords; }
494 void SetKeywords( const wxString& aKeywords ) { m_keywords = aKeywords; }
495
496 const KIID_PATH& GetPath() const { return m_path; }
497 void SetPath( const KIID_PATH& aPath ) { m_path = aPath; }
498
508 bool IsWithinSchematicSheet( const KIID_PATH& aSheetPath ) const;
509
510 wxString GetSheetname() const { return m_sheetname; }
511 void SetSheetname( const wxString& aSheetname ) { m_sheetname = aSheetname; }
512
513 wxString GetSheetfile() const { return m_sheetfile; }
514 void SetSheetfile( const wxString& aSheetfile ) { m_sheetfile = aSheetfile; }
515
516 wxString GetFilters() const { return m_filters; }
517 void SetFilters( const wxString& aFilters ) { m_filters = aFilters; }
518
519 std::optional<int> GetLocalClearance() const { return m_clearance; }
520 void SetLocalClearance( std::optional<int> aClearance ) { m_clearance = aClearance; }
521
522 std::optional<int> GetLocalSolderMaskMargin() const { return m_solderMaskMargin; }
523 void SetLocalSolderMaskMargin( std::optional<int> aMargin ) { m_solderMaskMargin = aMargin; }
524
525 std::optional<int> GetLocalSolderPasteMargin() const { return m_solderPasteMargin; }
526 void SetLocalSolderPasteMargin( std::optional<int> aMargin ) { m_solderPasteMargin = aMargin; }
527
528 std::optional<double> GetLocalSolderPasteMarginRatio() const { return m_solderPasteMarginRatio; }
529 void SetLocalSolderPasteMarginRatio( std::optional<double> aRatio ) { m_solderPasteMarginRatio = aRatio; }
530
533
540 void SetStackupMode( FOOTPRINT_STACKUP aMode );
542
547 void SetStackupLayers( LSET aLayers );
548 const LSET& GetStackupLayers() const { return m_stackupLayers; }
549
550 int GetAttributes() const { return m_attributes; }
551 void SetAttributes( int aAttributes ) { m_attributes = aAttributes; }
552
554 void SetFootprintType( FOOTPRINT_TYPE aFootprintType );
555
557 void SetAllowMissingCourtyard( bool aAllow ) { m_allowMissingCourtyard = aAllow; }
558
560 void SetAllowSolderMaskBridges( bool aAllow ) { m_allowSolderMaskBridges = aAllow; }
561
562 void SetFlag( int aFlag ) { m_arflag = aFlag; }
563 void IncrementFlag() { m_arflag += 1; }
564 int GetFlag() const { return m_arflag; }
565
566 bool IsNetTie() const
567 {
568 for( const wxString& group : m_netTiePadGroups )
569 {
570 if( !group.IsEmpty() )
571 return true;
572 }
573
574 return false;
575 }
576
577 std::optional<int> GetLocalClearance( wxString* aSource ) const
578 {
579 if( m_clearance.has_value() && aSource )
580 *aSource = wxString::Format( _( "footprint %s" ), GetReference() );
581
582 return m_clearance;
583 }
584
591 std::optional<int> GetClearanceOverrides( wxString* aSource ) const
592 {
593 return GetLocalClearance( aSource );
594 }
595
597 {
599 *aSource = wxString::Format( _( "footprint %s" ), GetReference() );
600
601 return m_zoneConnection;
602 }
603
608 const std::vector<wxString>& GetNetTiePadGroups() const { return m_netTiePadGroups; }
609
611 {
612 m_netTiePadGroups.clear();
613 }
614
615 void AddNetTiePadGroup( const wxString& aGroup )
616 {
617 m_netTiePadGroups.emplace_back( aGroup );
618 }
619
624 std::map<wxString, int> MapPadNumbersToNetTieGroups() const;
625
629 std::vector<PAD*> GetNetTiePads( PAD* aPad ) const;
630
636 int GetLikelyAttribute() const;
637
638 void Move( const VECTOR2I& aMoveVector ) override;
639
640 void Rotate( const VECTOR2I& aRotCentre, const EDA_ANGLE& aAngle ) override;
641
642 void Flip( const VECTOR2I& aCentre, FLIP_DIRECTION aFlipDirection ) override;
643
655 void MoveAnchorPosition( const VECTOR2I& aMoveVector );
656
660 bool IsFlipped() const { return GetLayer() == B_Cu; }
661
666 PCB_LAYER_ID GetSide() const;
667
671 bool IsOnLayer( PCB_LAYER_ID aLayer ) const override;
672
673// m_footprintStatus bits:
674#define FP_is_LOCKED 0x01
675#define FP_is_PLACED 0x02
676#define FP_to_PLACE 0x04
677#define FP_PADS_are_LOCKED 0x08
678
679
680 bool IsLocked() const override
681 {
682 return ( m_fpStatus & FP_is_LOCKED ) != 0;
683 }
684
688 bool IsLayerAgnostic() const override { return true; }
689
693 bool FitsEnabledLayers( const LSET& aEnabledLayers, int aCopperLayerCount ) const override
694 {
695 return GetLayer() == F_Cu || GetLayer() == B_Cu;
696 }
697
703 void SetLocked( bool isLocked ) override
704 {
705 if( isLocked )
707 else
709 }
710
714 bool IsConflicting() const;
715
716 bool IsPlaced() const { return m_fpStatus & FP_is_PLACED; }
717 void SetIsPlaced( bool isPlaced )
718 {
719 if( isPlaced )
721 else
723 }
724
725 bool NeedsPlaced() const { return m_fpStatus & FP_to_PLACE; }
726 void SetNeedsPlaced( bool needsPlaced )
727 {
728 if( needsPlaced )
730 else
732 }
733
735
746 void CheckFootprintAttributes( const std::function<void( const wxString& )>& aErrorHandler );
747
754 void CheckPads( UNITS_PROVIDER* aUnitsProvider,
755 const std::function<void( const PAD*, int, const wxString& )>& aErrorHandler );
756
762 void CheckShortingPads( const std::function<void( const PAD*, const PAD*, int aErrorCode,
763 const VECTOR2I& )>& aErrorHandler );
764
771 void CheckNetTies( const std::function<void( const BOARD_ITEM* aItem,
772 const BOARD_ITEM* bItem,
773 const BOARD_ITEM* cItem,
774 const VECTOR2I& )>& aErrorHandler );
775
782 void CheckNetTiePadGroups( const std::function<void( const wxString& )>& aErrorHandler );
783
784 void CheckClippedSilk( const std::function<void( BOARD_ITEM* aItemA,
785 BOARD_ITEM* aItemB,
786 const VECTOR2I& aPt )>& aErrorHandler );
790 void BuildNetTieCache();
791
795 const std::set<int>& GetNetTieCache( const BOARD_ITEM* aItem ) const
796 {
797 static const std::set<int> emptySet;
798
799 auto it = m_netTieCache.find( aItem );
800
801 if( it == m_netTieCache.end() )
802 return emptySet;
803
804 return it->second;
805 }
806
819 void TransformPadsToPolySet( SHAPE_POLY_SET& aBuffer, PCB_LAYER_ID aLayer, int aClearance,
820 int aMaxError, ERROR_LOC aErrorLoc ) const;
821
836 void TransformFPShapesToPolySet( SHAPE_POLY_SET& aBuffer, PCB_LAYER_ID aLayer, int aClearance,
837 int aError, ERROR_LOC aErrorLoc,
838 bool aIncludeText = true,
839 bool aIncludeShapes = true,
840 bool aIncludePrivateItems = false ) const;
841
845 void TransformFPTextToPolySet( SHAPE_POLY_SET& aBuffer, PCB_LAYER_ID aLayer, int aClearance,
846 int aError, ERROR_LOC aErrorLoc ) const
847 {
848 TransformFPShapesToPolySet( aBuffer, aLayer, aClearance, aError, aErrorLoc, true, false );
849 }
850
854 void GetContextualTextVars( wxArrayString* aVars ) const;
855
861 bool ResolveTextVar( wxString* token, int aDepth = 0 ) const;
862 bool ResolveTextVar( wxString* token, const wxString& aVariantName, int aDepth = 0 ) const;
863
865 void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList ) override;
866
867 bool HitTest( const VECTOR2I& aPosition, int aAccuracy = 0 ) const override;
868
869 bool Matches( const EDA_SEARCH_DATA& aSearchData, void* aAuxData ) const override;
870
880 bool HitTestAccurate( const VECTOR2I& aPosition, int aAccuracy = 0 ) const;
881
882 bool HitTest( const BOX2I& aRect, bool aContained, int aAccuracy = 0 ) const override;
883
884 bool HitTest( const SHAPE_LINE_CHAIN& aPoly, bool aContained ) const override;
885
894 bool HitTestOnLayer( const VECTOR2I& aPosition, PCB_LAYER_ID aLayer, int aAccuracy = 0 ) const;
895
896 bool HitTestOnLayer( const BOX2I& aRect, bool aContained, PCB_LAYER_ID aLayer, int aAccuracy = 0 ) const;
897
901 const wxString& GetReference() const { return Reference().GetText(); }
902
907 void SetReference( const wxString& aReference ) { Reference().SetText( aReference ); }
908
909 // Property system doesn't like const references
910 wxString GetReferenceAsString() const
911 {
912 return GetReference();
913 }
914
918 void IncrementReference( int aDelta );
919
920 bool IsAnnotated() const { return !GetReference().IsEmpty() && GetReference().Last() != '?'; }
921
925 const wxString& GetValue() const { return Value().GetText(); }
926
930 void SetValue( const wxString& aValue ) { Value().SetText( aValue ); }
931
932 // Property system doesn't like const references
933 wxString GetValueAsString() const
934 {
935 return GetValue();
936 }
937
941
943 const PCB_FIELD& Value() const { return *GetField( FIELD_T::VALUE ); }
944 const PCB_FIELD& Reference() const { return *GetField( FIELD_T::REFERENCE ); }
945
946 //-----<Fields>-----------------------------------------------------------
947
952 PCB_FIELD* GetField( FIELD_T aFieldType );
953 const PCB_FIELD* GetField( FIELD_T aFieldNdx ) const;
954
962 PCB_FIELD* GetField( const wxString& aFieldName ) const;
963
964 bool HasField( const wxString& aFieldName ) const;
965
972 void GetFields( std::vector<PCB_FIELD*>& aVector, bool aVisibleOnly ) const;
973
977 const std::deque<PCB_FIELD*>& GetFields() const { return m_fields; }
978 std::deque<PCB_FIELD*>& GetFields() { return m_fields; }
979
992 void UpdateFields( const std::vector<PCB_FIELD>& aFields, std::vector<PCB_FIELD*>& aAdded,
993 std::vector<PCB_FIELD*>& aDetached );
994
998 int GetNextFieldOrdinal() const;
999
1007 void ApplyDefaultSettings( const BOARD& board, bool aStyleFields, bool aStyleText,
1008 bool aStyleShapes, bool aStyleDimensions, bool aStyleBarcodes );
1009
1011 {
1012 wxString m_unitName; // e.g. A
1013 std::vector<wxString> m_pins; // pin numbers in this unit
1014 };
1015
1016 void SetUnitInfo( const std::vector<FP_UNIT_INFO>& aUnits ) { m_unitInfo = aUnits; }
1017 const std::vector<FP_UNIT_INFO>& GetUnitInfo() const { return m_unitInfo; }
1018
1019 bool IsBoardOnly() const { return m_attributes & FP_BOARD_ONLY; }
1020 void SetBoardOnly( bool aIsBoardOnly = true )
1021 {
1022 if( aIsBoardOnly )
1024 else
1026 }
1027
1029 void SetExcludedFromPosFiles( bool aExclude = true )
1030 {
1031 if( aExclude )
1033 else
1035 }
1036
1038 void SetExcludedFromBOM( bool aExclude = true )
1039 {
1040 if( aExclude )
1042 else
1044 }
1045
1047 void SetExcludedFromSim( bool aExclude = true )
1048 {
1049 if( aExclude )
1051 else
1053 }
1054
1055 bool IsDNP() const { return m_attributes & FP_DNP; }
1056 void SetDNP( bool aDNP = true )
1057 {
1058 if( aDNP )
1060 else
1062 }
1063
1064 // =====================================================================
1065 // Variant Support
1066 // =====================================================================
1067
1073 const FOOTPRINT_VARIANT* GetVariant( const wxString& aVariantName ) const;
1074
1080 FOOTPRINT_VARIANT* GetVariant( const wxString& aVariantName );
1081
1086 void SetVariant( const FOOTPRINT_VARIANT& aVariant );
1087
1093 FOOTPRINT_VARIANT* AddVariant( const wxString& aVariantName );
1094
1099 void DeleteVariant( const wxString& aVariantName );
1100
1106 void RenameVariant( const wxString& aOldName, const wxString& aNewName );
1107
1113 bool HasVariant( const wxString& aVariantName ) const;
1114
1120
1129 bool GetDNPForVariant( const wxString& aVariantName ) const;
1130
1139 bool GetExcludedFromBOMForVariant( const wxString& aVariantName ) const;
1140
1149 bool GetExcludedFromSimForVariant( const wxString& aVariantName ) const;
1150
1159 bool GetExcludedFromPosFilesForVariant( const wxString& aVariantName ) const;
1160
1173 wxString GetFieldValueForVariant( const wxString& aVariantName, const wxString& aFieldName ) const;
1174
1175 void SetFileFormatVersionAtLoad( int aVersion ) { m_fileFormatVersionAtLoad = aVersion; }
1177
1178 std::vector<PROPERTY_BASE*> GetDynamicProperties() const override;
1179
1189 PAD* FindPadByNumber( const wxString& aPadNumber, PAD* aSearchAfterMe = nullptr ) const;
1190
1191 PAD* FindPadByUuid( const KIID& aUuid ) const;
1192
1200 PAD* GetPad( const VECTOR2I& aPosition, const LSET& aLayerMask = LSET::AllLayersMask() );
1201
1202 std::vector<const PAD*> GetPads( const wxString& aPadNumber, const PAD* aIgnore = nullptr ) const;
1203
1207 unsigned GetPadCount() const;
1208
1215 std::set<wxString> GetUniquePadNumbers() const;
1216
1225 unsigned GetNumberedPadCount() const;
1226
1230 wxString GetNextPadNumber( const wxString& aLastPadName ) const;
1231
1234
1239 std::vector<std::set<wxString>>& JumperPadGroups() { return m_jumperPadGroups; }
1240 const std::vector<std::set<wxString>>& JumperPadGroups() const { return m_jumperPadGroups; }
1241
1243 std::optional<const std::set<wxString>> GetJumperPadGroup( const wxString& aPadNumber ) const;
1244
1248 void AutoPositionFields();
1249
1254 wxString GetTypeName() const;
1255
1256 double GetArea( int aPadding = 0 ) const;
1257
1258 KIID GetLink() const { return m_link; }
1259 void SetLink( const KIID& aLink ) { m_link = aLink; }
1260
1261 BOARD_ITEM* Duplicate( bool addToParentGroup, BOARD_COMMIT* aCommit = nullptr ) const override;
1262
1268 BOARD_ITEM* DuplicateItem( bool addToParentGroup, BOARD_COMMIT* aCommit, const BOARD_ITEM* aItem,
1269 bool addToFootprint = false );
1270
1276 void Add3DModel( FP_3DMODEL* a3DModel );
1277
1278 INSPECT_RESULT Visit( INSPECTOR inspector, void* testData,
1279 const std::vector<KICAD_T>& aScanTypes ) override;
1280
1281 wxString GetClass() const override
1282 {
1283 return wxT( "FOOTPRINT" );
1284 }
1285
1286 wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider, bool aFull ) const override;
1287
1288 wxString DisambiguateItemDescription( UNITS_PROVIDER* aUnitsProvider, bool aFull ) const override;
1289
1290 BITMAPS GetMenuImage() const override;
1291
1292 EDA_ITEM* Clone() const override;
1293
1295 void RunOnChildren( const std::function<void( BOARD_ITEM* )>& aFunction, RECURSE_MODE aMode ) const override;
1296
1297 virtual std::vector<int> ViewGetLayers() const override;
1298
1299 double ViewGetLOD( int aLayer, const KIGFX::VIEW* aView ) const override;
1300
1301 virtual const BOX2I ViewBBox() const override;
1302
1310 static bool IsLibNameValid( const wxString& aName );
1311
1321 static const wxChar* StringLibNameInvalidChars( bool aUserReadable );
1322
1326 bool FootprintNeedsUpdate( const FOOTPRINT* aLibFP, int aCompareFlags = 0,
1327 REPORTER* aReporter = nullptr );
1328
1343 void SetInitialComments( wxArrayString* aInitialComments )
1344 {
1345 delete m_initial_comments;
1346 m_initial_comments = aInitialComments;
1347 }
1348
1355 double CoverageRatio( const GENERAL_COLLECTOR& aCollector ) const;
1356
1357 static double GetCoverageArea( const BOARD_ITEM* aItem, const GENERAL_COLLECTOR& aCollector );
1358
1360 const wxArrayString* GetInitialComments() const { return m_initial_comments; }
1361
1367 const SHAPE_POLY_SET& GetCourtyard( PCB_LAYER_ID aLayer ) const;
1368
1374 const SHAPE_POLY_SET& GetCachedCourtyard( PCB_LAYER_ID aLayer ) const;
1375
1382 void BuildCourtyardCaches( OUTLINE_ERROR_HANDLER* aErrorHandler = nullptr );
1383
1384 // @copydoc BOARD_ITEM::GetEffectiveShape
1385 std::shared_ptr<SHAPE> GetEffectiveShape( PCB_LAYER_ID aLayer = UNDEFINED_LAYER,
1386 FLASHING aFlash = FLASHING::DEFAULT,
1387 DRC_CONSTRAINT_T aUsage = NULL_CONSTRAINT ) const override;
1388
1390 {
1391 return static_cast<EMBEDDED_FILES*>( this );
1392 }
1393
1395 {
1396 return static_cast<const EMBEDDED_FILES*>( this );
1397 }
1398
1402 std::set<KIFONT::OUTLINE_FONT*> GetFonts() const override;
1403
1404 void EmbedFonts() override;
1405
1406 double Similarity( const BOARD_ITEM& aOther ) const override;
1407
1409 void SetStaticComponentClass( const COMPONENT_CLASS* aClass ) const;
1410
1413
1415 const COMPONENT_CLASS* GetComponentClass() const;
1416
1418 wxString GetComponentClassAsString() const;
1419
1421 void RecomputeComponentClass() const;
1422
1424 void InvalidateComponentClassCache() const;
1425
1432 void SetTransientComponentClassNames( const std::unordered_set<wxString>& classNames )
1433 {
1434 m_transientComponentClassNames = classNames;
1435 }
1436
1438 const std::unordered_set<wxString>& GetTransientComponentClassNames()
1439 {
1441 }
1442
1445
1447 void ResolveComponentClassNames( BOARD* aBoard,
1448 const std::unordered_set<wxString>& aComponentClassNames );
1449
1451 void FixUpPadsForBoard( BOARD* aBoard );
1452
1453 bool operator==( const BOARD_ITEM& aOther ) const override;
1454 bool operator==( const FOOTPRINT& aOther ) const;
1455
1456#if defined(DEBUG)
1457 virtual void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
1458#endif
1459
1461 {
1462 bool operator()( const BOARD_ITEM* itemA, const BOARD_ITEM* itemB ) const;
1463 };
1464
1466 {
1467 bool operator()( const PAD* aFirst, const PAD* aSecond ) const;
1468 };
1469 // TODO(JE) padstacks -- this code isn't used anywhere though
1470#if 0
1471 struct cmp_padstack
1472 {
1473 bool operator()( const PAD* aFirst, const PAD* aSecond ) const;
1474 };
1475#endif
1477 {
1478 bool operator()( const ZONE* aFirst, const ZONE* aSecond ) const;
1479 };
1480
1481protected:
1482 virtual void swapData( BOARD_ITEM* aImage ) override;
1483
1485
1486private:
1487 std::deque<PCB_FIELD*> m_fields; // Fields, mapped by name, owned by pointer
1488 std::deque<BOARD_ITEM*> m_drawings; // Drawings in the footprint, owned by pointer
1489 std::deque<PAD*> m_pads; // Pads, owned by pointer
1490 std::vector<ZONE*> m_zones; // Rule area zones, owned by pointer
1491 std::deque<PCB_GROUP*> m_groups; // Groups, owned by pointer
1492 std::deque<PCB_CONSTRAINT*> m_constraints; // Geometric constraints, owned by pointer
1493 std::deque<PCB_POINT*> m_points; // Points, owned by pointer
1494
1496 bool m_flipped = false;
1498 int m_attributes; // Flag bits (see FOOTPRINT_ATTR_T)
1499 int m_fpStatus; // For autoplace: flags (LOCKED, FIELDS_AUTOPLACED)
1501
1504
1505 // Bounding box caching strategy:
1506 // While we attempt to notice the low-hanging fruit operations and update the bounding boxes
1507 // accordingly, we rely mostly on a "if anything changed then the caches are stale" approach.
1508 // We implement this by having PCB_BASE_FRAME's OnModify() method increment an operation
1509 // counter, and storing that as a timestamp for the various caches.
1510 // This means caches will get regenerated often -- but still far less often than if we had no
1511 // caches at all. The principal opitmization would be to change to dirty flag and make sure
1512 // that any edit that could affect the bounding boxes (including edits to the footprint
1513 // children) marked the bounding boxes dirty. It would definitely be faster -- but also more
1514 // fragile.
1515 mutable std::mutex m_geometry_cache_mutex;
1516 mutable std::unique_ptr<FOOTPRINT_GEOMETRY_CACHE_DATA> m_geometry_cache;
1517
1518 mutable std::map<wxString, std::unique_ptr<PCB_FOOTPRINT_FIELD_PROPERTY>> m_dynamicPropertyCache;
1519
1520 // A list of pad groups, each of which is allowed to short nets within their group.
1521 // A pad group is a comma-separated list of pad numbers.
1522 std::vector<wxString> m_netTiePadGroups;
1523
1524 // A list of 1:N footprint item to allowed net numbers
1525 std::map<const BOARD_ITEM*, std::set<int>> m_netTieCache;
1526
1529 std::vector<std::set<wxString>> m_jumperPadGroups;
1530
1534
1537
1538 // Optional overrides
1540 std::optional<int> m_clearance;
1541 std::optional<int> m_solderMaskMargin; // Solder mask margin
1542 std::optional<int> m_solderPasteMargin; // Solder paste margin absolute value
1543 std::optional<double> m_solderPasteMarginRatio; // Solder mask margin ratio of pad size
1544 // The final margin is the sum of these 2 values
1545
1546 LSET m_stackupLayers; // Layers in the stackup
1547 FOOTPRINT_STACKUP m_stackupMode; // Stackup mode for this footprint
1548 LSET m_privateLayers; // Layers visible only in the footprint editor
1549
1550 wxString m_libDescription; // File name and path for documentation file.
1551 wxString m_keywords; // Search keywords to find footprint in library.
1552 KIID_PATH m_path; // Path to associated symbol ([sheetUUID, .., symbolUUID]).
1553 wxString m_sheetname; // Name of the sheet containing the symbol for this footprint
1554 wxString m_sheetfile; // File of the sheet containing the symbol for this footprint
1555 wxString m_filters; // Footprint filters from symbol
1557 int m_arflag; // Use to trace ratsnest and auto routing.
1558 KIID m_link; // Temporary logical link used during editing
1559
1560 std::vector<FP_3DMODEL> m_3D_Drawings; // 3D models.
1561
1562 std::unique_ptr<EXTRUDED_3D_BODY> m_extrudedBody; // nullptr = disabled
1563
1564 wxArrayString* m_initial_comments; // s-expression comments in the footprint,
1565 // lazily allocated only if needed for speed
1566
1567 mutable std::unique_ptr<FOOTPRINT_COURTYARD_CACHE_DATA> m_courtyard_cache;
1568 mutable std::mutex m_courtyard_cache_mutex;
1569
1570 std::unordered_set<wxString> m_transientComponentClassNames;
1571 std::unique_ptr<COMPONENT_CLASS_CACHE_PROXY> m_componentClassCacheProxy;
1572
1573 // Optional unit mapping information for multi-unit symbols
1574 std::vector<FP_UNIT_INFO> m_unitInfo;
1575
1576 std::vector<SEARCH_TERM> m_searchTerms;
1577};
1578
1579#endif // FOOTPRINT_H
ERROR_LOC
When approximating an arc or circle, should the error be placed on the outside or inside of the curve...
BITMAPS
A list of all bitmap identifiers.
BOX2< VECTOR2I > BOX2I
Definition box2.h:927
std::map< wxString, ValueType, DETAIL::CASE_INSENSITIVE_COMPARER > CASE_INSENSITIVE_MAP
BOARD_ITEM_CONTAINER(BOARD_ITEM *aParent, KICAD_T aType)
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Definition board_item.h:84
BOARD_ITEM(BOARD_ITEM *aParent, KICAD_T idtype, PCB_LAYER_ID aLayer=F_Cu)
Definition board_item.h:86
friend class BOARD
Definition board_item.h:578
PCB_LAYER_ID m_layer
Definition board_item.h:571
Information pertinent to a Pcbnew printed circuit board.
Definition board.h:409
constexpr const Vec GetCenter() const
Definition box2.h:227
A lightweight representation of a component class.
Implement a canvas based on a wxGLCanvas.
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:98
KICAD_T Type() const
Returns the type of object.
Definition eda_item.h:110
EDA_ITEM(EDA_ITEM *parent, KICAD_T idType, bool isSCH_ITEM=false, bool isBOARD_ITEM=false)
Definition eda_item.cpp:84
virtual const wxString & GetText() const
Return the string associated with the text object.
Definition eda_text.h:118
virtual void SetText(const wxString &aText)
Definition eda_text.cpp:231
EMBEDDED_FILES()=default
bool operator==(const EXTRUDED_3D_BODY &aOther) const
Definition footprint.h:140
KIGFX::COLOR4D m_color
Definition footprint.h:120
VECTOR3D m_offset
Definition footprint.h:126
EXTRUDED_3D_BODY()=default
PCB_LAYER_ID m_layer
Definition footprint.h:119
static KIGFX::COLOR4D GetDefaultColor(EXTRUSION_MATERIAL aMaterial)
Definition footprint.h:128
VECTOR3D m_rotation
Definition footprint.h:125
static uint32_t PackColorKey(const KIGFX::COLOR4D &aColor)
Definition footprint.h:147
VECTOR3D m_scale
Definition footprint.h:124
EXTRUSION_MATERIAL m_material
Definition footprint.h:121
Variant information for a footprint.
Definition footprint.h:227
wxString GetName() const
Definition footprint.h:238
FOOTPRINT_VARIANT(const wxString &aName=wxEmptyString)
Definition footprint.h:229
bool HasFieldValue(const wxString &aFieldName) const
Definition footprint.h:286
bool m_excludedFromPosFiles
Definition footprint.h:308
void SetExcludedFromPosFiles(bool aExclude)
Definition footprint.h:251
wxString GetFieldValue(const wxString &aFieldName) const
Get a field value override for this variant.
Definition footprint.h:258
void SetName(const wxString &aName)
Definition footprint.h:239
const std::map< wxString, wxString > & GetFields() const
Definition footprint.h:291
bool GetExcludedFromSim() const
Definition footprint.h:247
bool GetExcludedFromBOM() const
Definition footprint.h:244
bool operator==(const FOOTPRINT_VARIANT &aOther) const
Definition footprint.h:293
void SetExcludedFromSim(bool aExclude)
Definition footprint.h:248
void SetDNP(bool aDNP)
Definition footprint.h:242
bool GetExcludedFromPosFiles() const
Definition footprint.h:250
void RemoveFieldValue(const wxString &aFieldName)
Remove a field value override for this variant.
Definition footprint.h:281
bool GetDNP() const
Definition footprint.h:241
std::map< wxString, wxString > m_fields
Field value overrides for this variant.
Definition footprint.h:309
void SetFieldValue(const wxString &aFieldName, const wxString &aValue)
Set a field value override for this variant.
Definition footprint.h:273
void SetExcludedFromBOM(bool aExclude)
Definition footprint.h:245
bool FixUuids()
Old footprints do not always have a valid UUID (some can be set to null uuid) However null UUIDs,...
bool GetDuplicatePadNumbersAreJumpers() const
Definition footprint.h:1232
const CASE_INSENSITIVE_MAP< FOOTPRINT_VARIANT > & GetVariants() const
Get all variants.
Definition footprint.h:1119
std::optional< int > GetClearanceOverrides(wxString *aSource) const
Return any local clearance overrides set in the "classic" (ie: pre-rule) system.
Definition footprint.h:591
void EmbedFonts() override
bool AllowSolderMaskBridges() const
Definition footprint.h:559
void SetPosition(const VECTOR2I &aPos) override
void SetFPID(const LIB_ID &aFPID)
Definition footprint.h:474
LIB_ID m_fpid
Definition footprint.h:1497
wxString GetLibDescription() const
Definition footprint.h:490
ZONE_CONNECTION GetLocalZoneConnection() const
Definition footprint.h:532
void SetLink(const KIID &aLink)
Definition footprint.h:1259
KIID_PATH m_path
Definition footprint.h:1552
std::deque< BOARD_ITEM * > m_drawings
Definition footprint.h:1488
void SetStackupLayers(LSET aLayers)
If the footprint has a non-default stackup, set the layers that should be used for the stackup.
bool IsBoardOnly() const
Definition footprint.h:1019
void SerializeDefinition(kiapi::board::types::Footprint *aOutput) const
void InvalidateComponentClassCache() const
Forces deferred (on next access) recalculation of the component class for this footprint.
const std::deque< PAD * > & Pads() const
Definition footprint.h:405
bool IsDNP() const
Definition footprint.h:1055
void SetLocked(bool isLocked) override
Set the #MODULE_is_LOCKED bit in the m_ModuleStatus.
Definition footprint.h:703
VECTOR2I GetCenter() const override
This defaults to the center of the bounding box if not overridden.
Definition footprint.h:402
void SetFootprintType(FOOTPRINT_TYPE aFootprintType)
std::vector< PAD * > GetNetTiePads(PAD *aPad) const
bool ResolveTextVar(wxString *token, int aDepth=0) const
Resolve any references to system tokens supported by the component.
EDA_ANGLE GetOrientation() const
Definition footprint.h:438
ZONES & Zones()
Definition footprint.h:410
bool Deserialize(const google::protobuf::Any &aContainer) override
Deserializes the given protobuf message into this object.
std::deque< PCB_POINT * > m_points
Definition footprint.h:1493
void CheckClippedSilk(const std::function< void(BOARD_ITEM *aItemA, BOARD_ITEM *aItemB, const VECTOR2I &aPt)> &aErrorHandler)
std::unique_ptr< EXTRUDED_3D_BODY > m_extrudedBody
Definition footprint.h:1562
void Remove(BOARD_ITEM *aItem, REMOVE_MODE aMode=REMOVE_MODE::NORMAL) override
Removes an item from the container.
void SetIsPlaced(bool isPlaced)
Definition footprint.h:717
ZONE_CONNECTION m_zoneConnection
Definition footprint.h:1539
int GetNextFieldOrdinal() const
Return the next ordinal for a user field for this footprint.
PCB_POINTS & Points()
Definition footprint.h:419
static double GetCoverageArea(const BOARD_ITEM *aItem, const GENERAL_COLLECTOR &aCollector)
bool IsExcludedFromBOM() const
Definition footprint.h:1037
std::shared_ptr< SHAPE > GetEffectiveShape(PCB_LAYER_ID aLayer=UNDEFINED_LAYER, FLASHING aFlash=FLASHING::DEFAULT, DRC_CONSTRAINT_T aUsage=NULL_CONSTRAINT) const override
Some pad shapes can be complex (rounded/chamfered rectangle), even without considering custom shapes.
void SetOrientation(const EDA_ANGLE &aNewAngle)
void SetFlag(int aFlag)
Definition footprint.h:562
std::optional< double > m_solderPasteMarginRatio
Definition footprint.h:1543
void SetDNP(bool aDNP=true)
Definition footprint.h:1056
void SetAllowSolderMaskBridges(bool aAllow)
Definition footprint.h:560
void RecomputeComponentClass() const
Forces immediate recalculation of the component class for this footprint.
std::vector< ZONE * > m_zones
Definition footprint.h:1490
bool GetExcludedFromSimForVariant(const wxString &aVariantName) const
Get the exclude-from-simulation status for a specific variant.
const TRANSFORM_TRS & GetTransform() const
Definition footprint.h:451
static bool IsLibNameValid(const wxString &aName)
Test for validity of a name of a footprint to be used in a footprint library ( no spaces,...
void SetStackupMode(FOOTPRINT_STACKUP aMode)
Set the stackup mode for this footprint.
void SetLocalSolderPasteMarginRatio(std::optional< double > aRatio)
Definition footprint.h:529
std::vector< SEARCH_TERM > & GetSearchTerms() override
void IncrementFlag()
Definition footprint.h:563
double ViewGetLOD(int aLayer, const KIGFX::VIEW *aView) const override
Return the level of detail (LOD) of the item.
bool IsAnnotated() const
Definition footprint.h:920
std::optional< int > m_clearance
Definition footprint.h:1540
bool m_duplicatePadNumbersAreJumpers
Flag that this footprint should automatically treat sets of two or more pads with the same number as ...
Definition footprint.h:1533
void SetExcludedFromSim(bool aExclude=true)
Definition footprint.h:1047
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.
void CheckPads(UNITS_PROVIDER *aUnitsProvider, const std::function< void(const PAD *, int, const wxString &)> &aErrorHandler)
Run non-board-specific DRC checks on footprint's pads.
void SetExcludedFromBOM(bool aExclude=true)
Definition footprint.h:1038
wxString GetSheetname() const
Definition footprint.h:510
int m_fpStatus
Definition footprint.h:1499
void SetPath(const KIID_PATH &aPath)
Definition footprint.h:497
void SetFilters(const wxString &aFilters)
Definition footprint.h:517
void SetKeywords(const wxString &aKeywords)
Definition footprint.h:494
void SetStaticComponentClass(const COMPONENT_CLASS *aClass) const
Sets the component class object pointer for this footprint.
const DRAWINGS & GraphicalItems() const
Definition footprint.h:408
wxString DisambiguateItemDescription(UNITS_PROVIDER *aUnitsProvider, bool aFull) const override
void SetInitialComments(wxArrayString *aInitialComments)
Take ownership of caller's heap allocated aInitialComments block.
Definition footprint.h:1343
int m_attributes
Definition footprint.h:1498
PCB_LAYER_ID GetSide() const
Use instead of IsFlipped() when you also need to account for unsided footprints (those purely on user...
wxString GetLibNickname() const override
Definition footprint.h:485
const BOX2I GetLayerBoundingBox(const LSET &aLayers) const
Return the bounding box of the footprint on a given set of layers.
std::vector< FP_3DMODEL > m_3D_Drawings
Definition footprint.h:1560
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...
FOOTPRINT_TYPE GetFootprintType() const
void RunOnChildren(const std::function< void(BOARD_ITEM *)> &aFunction, RECURSE_MODE aMode) const override
Invoke a function on all children.
bool FootprintNeedsUpdate(const FOOTPRINT *aLibFP, int aCompareFlags=0, REPORTER *aReporter=nullptr)
Return true if a board footprint differs from the library version.
bool m_allowMissingCourtyard
Definition footprint.h:1535
const std::vector< FP_UNIT_INFO > & GetUnitInfo() const
Definition footprint.h:1017
const EXTRUDED_3D_BODY * GetExtrudedBody() const
Definition footprint.h:428
std::unordered_set< wxString > m_transientComponentClassNames
Definition footprint.h:1570
void SetAttributes(int aAttributes)
Definition footprint.h:551
void SetSheetfile(const wxString &aSheetfile)
Definition footprint.h:514
BITMAPS GetMenuImage() const override
Return a pointer to an image to be used in menus.
std::optional< int > GetLocalSolderPasteMargin() const
Definition footprint.h:525
std::unique_ptr< COMPONENT_CLASS_CACHE_PROXY > m_componentClassCacheProxy
Definition footprint.h:1571
wxArrayString * m_initial_comments
Definition footprint.h:1564
EDA_ITEM * Clone() const override
Invoke a function on all children.
BOX2I GetFpPadsLocalBbox() const
Return the bounding box containing pads when the footprint is on the front side, orientation 0,...
LIB_ID GetLIB_ID() const override
Definition footprint.h:483
std::deque< PCB_FIELD * > m_fields
Definition footprint.h:1487
std::mutex m_geometry_cache_mutex
Definition footprint.h:1515
PCB_FIELD & Value()
read/write accessors:
Definition footprint.h:939
const EMBEDDED_FILES * GetEmbeddedFiles() const
Definition footprint.h:1394
void Rotate(const VECTOR2I &aRotCentre, const EDA_ANGLE &aAngle) override
Rotate this object.
std::optional< int > m_solderPasteMargin
Definition footprint.h:1542
const std::vector< std::set< wxString > > & JumperPadGroups() const
Definition footprint.h:1240
void SetFileFormatVersionAtLoad(int aVersion)
Definition footprint.h:1175
std::mutex m_courtyard_cache_mutex
Definition footprint.h:1568
void SetExcludedFromPosFiles(bool aExclude=true)
Definition footprint.h:1029
bool IsWithinSchematicSheet(const KIID_PATH &aSheetPath) const
Test whether this footprint's symbol lives on aSheetPath or any sheet below it.
void SetOrientationDegrees(double aOrientation)
Definition footprint.h:464
bool HasExtrudedBody() const
Definition footprint.h:427
unsigned GetPadCount() const
std::optional< const std::set< wxString > > GetJumperPadGroup(const wxString &aPadNumber) const
Retrieves the jumper group containing the specified pad number, if one exists.
std::map< wxString, int > MapPadNumbersToNetTieGroups() const
std::optional< int > GetLocalClearance() const
Definition footprint.h:519
void UpdateFields(const std::vector< PCB_FIELD > &aFields, std::vector< PCB_FIELD * > &aAdded, std::vector< PCB_FIELD * > &aDetached)
Replace the fields with aFields, reusing the existing mandatory field objects.
double Similarity(const BOARD_ITEM &aOther) const override
Return a measure of how likely the other object is to represent the same object.
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:845
const FOOTPRINT_VARIANT * GetVariant(const wxString &aVariantName) const
Get a variant by name.
void MoveAnchorPosition(const VECTOR2I &aMoveVector)
Move the reference point of the footprint.
std::vector< std::set< wxString > > & JumperPadGroups()
Each jumper pad group is a set of pad numbers that should be treated as internally connected.
Definition footprint.h:1239
void SetDuplicatePadNumbersAreJumpers(bool aEnabled)
Definition footprint.h:1233
bool m_allowSolderMaskBridges
Definition footprint.h:1536
FOOTPRINT & operator=(const FOOTPRINT &aOther)
bool HasField(const wxString &aFieldName) const
CONSTRAINTS & Constraints()
Definition footprint.h:416
PCB_FIELD * GetField(FIELD_T aFieldType)
Return a mandatory field in this footprint.
void SetScaleY(double aScaleY)
Definition footprint.h:460
void TransformPadsToPolySet(SHAPE_POLY_SET &aBuffer, PCB_LAYER_ID aLayer, int aClearance, int aMaxError, ERROR_LOC aErrorLoc) const
Generate pads shapes on layer aLayer as polygons and adds these polygons to aBuffer.
void ClearExtrudedBody()
Definition footprint.h:432
double GetOrientationDegrees() const
Definition footprint.h:468
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...
std::deque< PAD * > & Pads()
Definition footprint.h:404
void ResolveComponentClassNames(BOARD *aBoard, const std::unordered_set< wxString > &aComponentClassNames)
Resolves a set of component class names to this footprint's actual component class.
EXTRUDED_3D_BODY & EnsureExtrudedBody()
wxString GetDesc() override
Definition footprint.h:486
void Serialize(google::protobuf::Any &aContainer) const override
Serializes this object to the given Any message.
int GetAttributes() const
Definition footprint.h:550
bool Matches(const EDA_SEARCH_DATA &aSearchData, void *aAuxData) const override
Compare the item against the search criteria in aSearchData.
std::optional< int > GetLocalClearance(wxString *aSource) const
Definition footprint.h:577
const COMPONENT_CLASS * GetComponentClass() const
Returns the component class for this footprint.
void SetLocalZoneConnection(ZONE_CONNECTION aType)
Definition footprint.h:531
BOARD_ITEM * DuplicateItem(bool addToParentGroup, BOARD_COMMIT *aCommit, const BOARD_ITEM *aItem, bool addToFootprint=false)
Duplicate a given item within the footprint, optionally adding it to the board.
FOOTPRINT(BOARD *parent)
void ClearNetTiePadGroups()
Definition footprint.h:610
PCB_LAYER_ID GetLayer() const override
Return the primary layer this item is on.
Definition footprint.h:449
LSET GetPrivateLayers() const
Definition footprint.h:344
void SetExtrudedBody(std::unique_ptr< EXTRUDED_3D_BODY > aBody)
wxString GetFPIDAsString() const
Definition footprint.h:479
CASE_INSENSITIVE_MAP< FOOTPRINT_VARIANT > m_variants
Variant data for this footprint, keyed by variant name.
Definition footprint.h:1503
double GetScaleX() const
Definition footprint.h:455
wxString GetValueAsString() const
Definition footprint.h:933
bool AllowMissingCourtyard() const
Definition footprint.h:556
void DeleteVariant(const wxString &aVariantName)
Delete a variant by name.
const ZONES & Zones() const
Definition footprint.h:411
wxString GetComponentClassAsString() const
Used for display in the properties panel.
bool IsFlipped() const
Definition footprint.h:660
wxString GetSheetfile() const
Definition footprint.h:513
bool IsLayerAgnostic() const override
Check if this item's layer set must not be confined to a board's enabled layers.
Definition footprint.h:688
int GetPinCount() override
The pin count for symbols or the unique pad count for footprints.
Definition footprint.h:487
SHAPE_POLY_SET GetBoundingHull() const
Return a bounding polygon for the shapes and pads in the footprint.
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...
const CONSTRAINTS & Constraints() const
Definition footprint.h:417
bool m_flipped
Definition footprint.h:1496
std::deque< PCB_CONSTRAINT * > m_constraints
Definition footprint.h:1492
wxString GetTypeName() const
Get the type of footprint.
bool NeedsPlaced() const
Definition footprint.h:725
const std::vector< wxString > & GetNetTiePadGroups() const
Definition footprint.h:608
const LIB_ID & GetFPID() const
Definition footprint.h:473
bool DeserializeDefinition(const kiapi::board::types::Footprint &aInput)
const std::unordered_set< wxString > & GetTransientComponentClassNames()
Gets the transient component class names.
Definition footprint.h:1438
void SetReference(const wxString &aReference)
Definition footprint.h:907
bool IsLocked() const override
Definition footprint.h:680
std::vector< FP_UNIT_INFO > m_unitInfo
Definition footprint.h:1574
const GROUPS & Groups() const
Definition footprint.h:414
bool IsExcludedFromPosFiles() const
Definition footprint.h:1028
void SetLayerAndFlip(PCB_LAYER_ID aLayer)
Used as Layer property setter – performs a flip if necessary to set the footprint layer.
unsigned GetNumberedPadCount() const
Return the number of unique pads whose pad number represents an electrical pin.
wxString GetFieldValueForVariant(const wxString &aVariantName, const wxString &aFieldName) const
Get a field value for a specific variant.
void AddNetTiePadGroup(const wxString &aGroup)
Definition footprint.h:615
bool LegacyPadsLocked() const
Definition footprint.h:734
virtual const BOX2I ViewBBox() const override
Return the bounding box of the item covering all its layers.
LSET m_privateLayers
Definition footprint.h:1548
bool IsExcludedFromSim() const
Definition footprint.h:1046
const std::set< int > & GetNetTieCache(const BOARD_ITEM *aItem) const
Get the set of net codes that are allowed to connect to a footprint item.
Definition footprint.h:795
const LSET & GetStackupLayers() const
Definition footprint.h:548
const std::deque< PCB_FIELD * > & GetFields() const
Return a reference to the deque holding the footprint's fields.
Definition footprint.h:977
int GetLikelyAttribute() const
Returns the most likely attribute based on pads Either FP_THROUGH_HOLE/FP_SMD/OTHER(0)
std::deque< PCB_GROUP * > m_groups
Definition footprint.h:1491
void Move(const VECTOR2I &aMoveVector) override
Move this object.
static bool ClassOf(const EDA_ITEM *aItem)
Definition footprint.h:336
wxString m_libDescription
Definition footprint.h:1550
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.
void ApplyDefaultSettings(const BOARD &board, bool aStyleFields, bool aStyleText, bool aStyleShapes, bool aStyleDimensions, bool aStyleBarcodes)
Apply default board settings to the footprint field text properties.
void ClearTransientComponentClassNames()
Remove the transient component class names.
Definition footprint.h:1444
ZONE_CONNECTION GetZoneConnectionOverrides(wxString *aSource) const
Definition footprint.h:596
std::vector< wxString > m_netTiePadGroups
Definition footprint.h:1522
void InvalidateGeometryCaches()
Resets the caches for this footprint, for example if it was modified via the API.
virtual std::vector< int > ViewGetLayers() const override
Return the all the layers within the VIEW the object is painted on.
std::set< KIFONT::OUTLINE_FONT * > GetFonts() const override
Get a list of outline fonts referenced in the footprint.
void Add3DModel(FP_3DMODEL *a3DModel)
Add a3DModel definition to the end of the 3D model list.
void SetValue(const wxString &aValue)
Definition footprint.h:930
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.
void SetTransformScale(double aScaleX, double aScaleY)
FOOTPRINT_STACKUP m_stackupMode
Definition footprint.h:1547
PCB_FIELD & Reference()
Definition footprint.h:940
std::vector< std::set< wxString > > m_jumperPadGroups
A list of jumper pad groups, each of which is a set of pad numbers that should be jumpered together (...
Definition footprint.h:1529
const PCB_FIELD & Value() const
The const versions to keep the compiler happy.
Definition footprint.h:943
wxString GetReferenceAsString() const
Definition footprint.h:910
wxString m_sheetfile
Definition footprint.h:1554
PAD * FindPadByUuid(const KIID &aUuid) const
void GetContextualTextVars(wxArrayString *aVars) const
Return the list of system text vars for this footprint.
std::optional< int > m_solderMaskMargin
Definition footprint.h:1541
void Add(BOARD_ITEM *aItem, ADD_MODE aMode=ADD_MODE::INSERT, bool aSkipConnectivity=false) override
Removes an item from the container.
void SetUnitInfo(const std::vector< FP_UNIT_INFO > &aUnits)
Definition footprint.h:1016
std::vector< const PAD * > GetPads(const wxString &aPadNumber, const PAD *aIgnore=nullptr) const
void AutoPositionFields()
Position Reference and Value fields at the top and bottom of footprint's bounding box.
void addMandatoryFields()
wxString m_keywords
Definition footprint.h:1551
const PCB_FIELD & Reference() const
Definition footprint.h:944
void SetTransientComponentClassNames(const std::unordered_set< wxString > &classNames)
Sets the transient component class names.
Definition footprint.h:1432
std::map< wxString, std::unique_ptr< PCB_FOOTPRINT_FIELD_PROPERTY > > m_dynamicPropertyCache
Definition footprint.h:1518
void SetScaleX(double aScaleX)
Definition footprint.h:458
void ClearAllNets()
Clear (i.e.
std::deque< PAD * > m_pads
Definition footprint.h:1489
void RescaleAroundPoint(const VECTOR2I &aCenter, double aSx, double aSy)
bool HasThroughHolePads() const
const PCB_POINTS & Points() const
Definition footprint.h:420
bool FitsEnabledLayers(const LSET &aEnabledLayers, int aCopperLayerCount) const override
Check if a board offering aEnabledLayers can hold this item.
Definition footprint.h:693
void BuildCourtyardCaches(OUTLINE_ERROR_HANDLER *aErrorHandler=nullptr)
Build complex polygons of the courtyard areas from graphic items on the courtyard layers.
bool IsOnLayer(PCB_LAYER_ID aLayer) const override
Test to see if this object is on the given layer.
bool HitTestAccurate(const VECTOR2I &aPosition, int aAccuracy=0) const
Test if a point is inside the bounding polygon of the footprint.
bool IsNetTie() const
Definition footprint.h:566
bool GetDNPForVariant(const wxString &aVariantName) const
Get the DNP status for a specific variant.
wxString GetClass() const override
Return the class name.
Definition footprint.h:1281
void SetVariant(const FOOTPRINT_VARIANT &aVariant)
Add or update a variant.
std::unique_ptr< FOOTPRINT_COURTYARD_CACHE_DATA > m_courtyard_cache
Definition footprint.h:1567
void SetLayer(PCB_LAYER_ID aLayer) override
Set the layer this item is on.
void IncrementReference(int aDelta)
Bump the current reference by aDelta.
int GetFileFormatVersionAtLoad() const
Definition footprint.h:1176
std::optional< double > GetLocalSolderPasteMarginRatio() const
Definition footprint.h:528
EXTRUDED_3D_BODY * GetExtrudedBody()
Definition footprint.h:429
void Flip(const VECTOR2I &aCentre, FLIP_DIRECTION aFlipDirection) override
Flip this object, i.e.
KIID m_link
Definition footprint.h:1558
GROUPS & Groups()
Definition footprint.h:413
wxString GetFilters() const
Definition footprint.h:516
void SetSheetname(const wxString &aSheetname)
Definition footprint.h:511
const wxArrayString * GetInitialComments() const
Return the initial comments block or NULL if none, without transfer of ownership.
Definition footprint.h:1360
KIID GetLink() const
Definition footprint.h:1258
std::set< wxString > GetUniquePadNumbers() const
A complex pad can be built with many pads having the same pad name to create a complex shape or fragm...
void SetAllowMissingCourtyard(bool aAllow)
Definition footprint.h:557
void BuildNetTieCache()
Cache the pads that are allowed to connect to each other in the footprint.
bool IsConflicting() const
std::vector< FP_3DMODEL > & Models()
Definition footprint.h:424
BOARD_ITEM * Duplicate(bool addToParentGroup, BOARD_COMMIT *aCommit=nullptr) const override
Create a copy of this BOARD_ITEM.
const SHAPE_POLY_SET & GetCachedCourtyard(PCB_LAYER_ID aLayer) const
Return the cached courtyard area.
std::deque< PCB_FIELD * > & GetFields()
Definition footprint.h:978
wxString GetName() const override
Definition footprint.h:484
static const wxChar * StringLibNameInvalidChars(bool aUserReadable)
Test for validity of the name in a library of the footprint ( no spaces, dir separators ....
void SetLibDescription(const wxString &aDesc)
Definition footprint.h:491
bool TextOnly() const
const wxString & GetValue() const
Definition footprint.h:925
const COMPONENT_CLASS * GetStaticComponentClass() const
Returns the component class for this footprint.
void FixUpPadsForBoard(BOARD *aBoard)
Used post-loading of a footprint to adjust the layers on pads to match board inner layers.
bool GetExcludedFromPosFilesForVariant(const wxString &aVariantName) const
Get the exclude-from-position-files status for a specific variant.
void CheckShortingPads(const std::function< void(const PAD *, const PAD *, int aErrorCode, const VECTOR2I &)> &aErrorHandler)
Check for overlapping, different-numbered, non-net-tie pads.
FOOTPRINT_VARIANT * AddVariant(const wxString &aVariantName)
Add a new variant with the given name.
double GetArea(int aPadding=0) const
void SetNeedsPlaced(bool needsPlaced)
Definition footprint.h:726
wxString m_filters
Definition footprint.h:1555
const wxString & GetReference() const
Definition footprint.h:901
std::unique_ptr< FOOTPRINT_GEOMETRY_CACHE_DATA > m_geometry_cache
Definition footprint.h:1516
bool GetExcludedFromBOMForVariant(const wxString &aVariantName) const
Get the exclude-from-BOM status for a specific variant.
void CopyFrom(const BOARD_ITEM *aOther) override
void CheckNetTiePadGroups(const std::function< void(const wxString &)> &aErrorHandler)
Sanity check net-tie pad groups.
void SetFPIDAsString(const wxString &aFPID)
Definition footprint.h:480
void RenameVariant(const wxString &aOldName, const wxString &aNewName)
Rename a variant.
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider, bool aFull) const override
Return a user-visible description string of this item.
void SetBoardOnly(bool aIsBoardOnly=true)
Definition footprint.h:1020
const std::vector< FP_3DMODEL > & Models() const
Definition footprint.h:425
void SetLocalSolderMaskMargin(std::optional< int > aMargin)
Definition footprint.h:523
TRANSFORM_TRS m_transform
Definition footprint.h:1495
timestamp_t m_lastEditTime
Definition footprint.h:1556
PAD * GetPad(const VECTOR2I &aPosition, const LSET &aLayerMask=LSET::AllLayersMask())
Get a pad at aPosition on aLayerMask in the footprint.
const SHAPE_POLY_SET & GetCourtyard(PCB_LAYER_ID aLayer) const
Used in DRC to test the courtyard area (a complex polygon).
int GetFlag() const
Definition footprint.h:564
std::map< const BOARD_ITEM *, std::set< int > > m_netTieCache
Definition footprint.h:1525
std::vector< PROPERTY_BASE * > GetDynamicProperties() const override
Return dynamically-computed properties specific to this object instance (e.g.
wxString m_sheetname
Definition footprint.h:1553
LSET m_stackupLayers
Definition footprint.h:1546
int m_fileFormatVersionAtLoad
Definition footprint.h:1500
void SetLocalClearance(std::optional< int > aClearance)
Definition footprint.h:520
void SetPrivateLayers(const LSET &aLayers)
Adds an item to the container.
Definition footprint.h:345
const KIID_PATH & GetPath() const
Definition footprint.h:496
std::optional< int > GetLocalSolderMaskMargin() const
Definition footprint.h:522
void SetLocalSolderPasteMargin(std::optional< int > aMargin)
Definition footprint.h:526
wxString GetKeywords() const
Definition footprint.h:493
bool operator==(const BOARD_ITEM &aOther) const override
EMBEDDED_FILES * GetEmbeddedFiles() override
Definition footprint.h:1389
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...
FOOTPRINT_STACKUP GetStackupMode() const
Definition footprint.h:541
virtual void swapData(BOARD_ITEM *aImage) override
wxString GetNextPadNumber(const wxString &aLastPadName) const
double GetScaleY() const
Definition footprint.h:456
bool IsPlaced() const
Definition footprint.h:716
bool HasVariant(const wxString &aVariantName) const
Check if a variant exists.
VECTOR2I GetPosition() const override
Definition footprint.h:435
DRAWINGS & GraphicalItems()
Definition footprint.h:407
bool HitTest(const VECTOR2I &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this item.
PAD * FindPadByNumber(const wxString &aPadNumber, PAD *aSearchAfterMe=nullptr) const
Return a PAD with a matching number.
std::vector< SEARCH_TERM > m_searchTerms
Definition footprint.h:1576
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
bool operator==(const FP_3DMODEL &aOther) const
Definition footprint.h:188
VECTOR3D m_Offset
3D model offset (mm)
Definition footprint.h:183
double m_Opacity
Definition footprint.h:184
VECTOR3D m_Rotation
3D model rotation (degrees)
Definition footprint.h:182
VECTOR3D m_Scale
3D model scaling factor (dimensionless)
Definition footprint.h:181
wxString m_Filename
The 3D shape filename in 3D library.
Definition footprint.h:185
bool m_Show
Include model in rendering.
Definition footprint.h:186
Used when the right click button is pressed, or when the select tool is in effect.
Definition collectors.h:203
Class OUTLINE_FONT implements outline font drawing.
A color representation with 4 components: red, green, blue, alpha.
Definition color4d.h:101
double r
Red component.
Definition color4d.h:390
double g
Green component.
Definition color4d.h:391
double a
Alpha component.
Definition color4d.h:393
static const COLOR4D UNSPECIFIED
For legacy support; used as a value to indicate color hasn't been set yet.
Definition color4d.h:399
double b
Blue component.
Definition color4d.h:392
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
Definition view.h:63
Definition kiid.h:46
A logical library item identifier and consists of various portions much like a URI.
Definition lib_id.h:45
A mix-in to provide polymorphism between items stored in libraries (symbols, aliases and footprints).
An abstract class from which implementation specific LINE_READERs may be derived to read single lines...
Definition richio.h:65
LSET is a set of PCB_LAYER_IDs.
Definition lset.h:37
static const LSET & AllLayersMask()
Definition lset.cpp:637
EDA_MSG_PANEL items for displaying messages.
Definition msgpanel.h:50
Definition pad.h:61
A PCB_POINT is a 0-dimensional point that is used to mark a position on a PCB, or more usually a foot...
Definition pcb_point.h:39
A pure virtual class used to derive REPORTER objects from.
Definition reporter.h:73
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
Represent a set of closed polygons.
An abstract shape on 2D plane.
Definition shape.h:124
Handle a list of polygons defining a copper zone.
Definition zone.h:70
const std::function< void(const wxString &msg, BOARD_ITEM *itemA, BOARD_ITEM *itemB, const VECTOR2I &pt)> OUTLINE_ERROR_HANDLER
DRC_CONSTRAINT_T
Definition drc_rule.h:49
@ NULL_CONSTRAINT
Definition drc_rule.h:50
#define _(s)
@ DEGREES_T
Definition eda_angle.h:31
RECURSE_MODE
Definition eda_item.h:50
INSPECT_RESULT
Definition eda_item.h:44
const INSPECTOR_FUNC & INSPECTOR
std::function passed to nested users by ref, avoids copying std::function.
Definition eda_item.h:91
FOOTPRINT_TYPE
Definition footprint.h:97
EXTRUSION_MATERIAL
Definition footprint.h:105
FOOTPRINT_ATTR_T
The set of attributes allowed within a FOOTPRINT, using FOOTPRINT::SetAttributes() and FOOTPRINT::Get...
Definition footprint.h:84
@ FP_SMD
Definition footprint.h:86
@ FP_DNP
Definition footprint.h:91
@ FP_EXCLUDE_FROM_POS_FILES
Definition footprint.h:87
@ FP_BOARD_ONLY
Definition footprint.h:89
@ FP_EXCLUDE_FROM_BOM
Definition footprint.h:88
@ FP_JUST_ADDED
Definition footprint.h:90
@ FP_EXCLUDE_FROM_SIM
Definition footprint.h:92
@ FP_THROUGH_HOLE
Definition footprint.h:85
#define FP_is_PLACED
In autoplace: footprint automatically placed.
Definition footprint.h:675
#define FP_is_LOCKED
footprint LOCKED: no autoplace allowed
Definition footprint.h:674
#define FP_PADS_are_LOCKED
Definition footprint.h:677
FOOTPRINT_STACKUP
Definition footprint.h:155
@ EXPAND_INNER_LAYERS
The 'normal' stackup handling, where there is a single inner layer (In1) and rule areas using it expa...
Definition footprint.h:160
@ CUSTOM_LAYERS
Stackup handling where the footprint can have any number of copper layers, and objects on those layer...
Definition footprint.h:165
#define FP_to_PLACE
In autoplace: footprint waiting for autoplace.
Definition footprint.h:676
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:43
FLASHING
Enum used during connectivity building to ensure we do not query connectivity while building the data...
Definition layer_ids.h:180
@ DEFAULT
Flashing follows connectivity.
Definition layer_ids.h:181
PCB_LAYER_ID
A quick note on layer IDs:
Definition layer_ids.h:56
@ B_Cu
Definition layer_ids.h:61
@ UNDEFINED_LAYER
Definition layer_ids.h:57
@ F_Cu
Definition layer_ids.h:60
FLIP_DIRECTION
Definition mirror.h:23
The Cairo implementation of the graphics abstraction layer.
Definition eda_group.h:30
std::vector< ZONE * > ZONES
std::deque< PCB_GROUP * > GROUPS
std::deque< PCB_CONSTRAINT * > CONSTRAINTS
std::deque< BOARD_ITEM * > DRAWINGS
std::deque< PCB_POINT * > PCB_POINTS
std::vector< wxString > m_pins
Definition footprint.h:1013
bool operator()(const BOARD_ITEM *itemA, const BOARD_ITEM *itemB) const
bool operator()(const PAD *aFirst, const PAD *aSecond) const
bool operator()(const ZONE *aFirst, const ZONE *aSecond) const
A storage class for 128-bit hash value.
Definition hash_128.h:32
FIELD_T
The set of all field indices assuming an array like sequence that a SCH_COMPONENT or LIB_PART can hol...
@ REFERENCE
Field Reference of part, i.e. "IC21".
@ VALUE
Field Value of part, i.e. "3.3K".
@ PCB_FOOTPRINT_T
class FOOTPRINT, a footprint
Definition typeinfo.h:78
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:683
VECTOR3< double > VECTOR3D
Definition vector3.h:230
ZONE_CONNECTION
How pads are covered by copper in zone.
Definition zones.h:43