KiCad PCB EDA Suite
Loading...
Searching...
No Matches
board_item.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) 2018 Jean-Pierre Charras, jp.charras at wandadoo.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#pragma once
22
23#include <map>
24
25#include <core/mirror.h>
26#include <eda_item.h>
28#include <geometry/seg.h>
29#include <layer_ids.h>
30#include <properties/property.h>
31#include <lseq.h>
32#include <lset.h>
33#include <stroke_params.h>
34#include <geometry/eda_angle.h>
35#include <macros.h>
37
38
39class BOARD;
43class BOARD_COMMIT;
44class SHAPE_POLY_SET;
45class SHAPE_SEGMENT;
46class PCB_BASE_FRAME;
47class SHAPE;
48class PCB_GROUP;
49class FOOTPRINT;
50namespace KIGFX
51{
52 class RENDER_SETTINGS;
53 class VIEW;
54};
55
56namespace KIFONT
57{
58class METRICS;
59}
60
61
80
85inline SEG MIRROR_AXIS( const VECTOR2I& aCentre, FLIP_DIRECTION aFlipDirection )
86{
87 if( aFlipDirection == FLIP_DIRECTION::LEFT_RIGHT )
88 return SEG( aCentre, aCentre + VECTOR2I( 0, 1 ) );
89
90 return SEG( aCentre, aCentre + VECTOR2I( 1, 0 ) );
91}
92
98class BOARD_ITEM : public EDA_ITEM
99{
100public:
101 BOARD_ITEM( BOARD_ITEM* aParent, KICAD_T idtype, PCB_LAYER_ID aLayer = F_Cu ) :
102 EDA_ITEM( aParent, idtype, false, true ),
103 m_layer( aLayer ),
104 m_isKnockout( false ),
105 m_isLocked( false )
106 {
107 }
108
109 BOARD_ITEM( const BOARD_ITEM& aOther ) :
110 EDA_ITEM( aOther ),
111 m_layer( aOther.m_layer ),
112 m_isKnockout( aOther.m_isKnockout ),
113 m_isLocked( aOther.m_isLocked )
114 {
115 // Cache membership is owned by BOARD: clones start detached from any board index
116 }
117
119 {
120 if( this == &aOther )
121 return *this;
122
123 EDA_ITEM::operator=( aOther );
124 m_layer = aOther.m_layer;
125 m_isKnockout = aOther.m_isKnockout;
126 m_isLocked = aOther.m_isLocked;
127 // Owner stays with the target, do not copy it
128 return *this;
129 }
130
131 // A default move would copy the owner. Do not move it.
132 BOARD_ITEM( BOARD_ITEM&& aOther ) :
133 BOARD_ITEM( static_cast<const BOARD_ITEM&>( aOther ) )
134 {
135 }
136
138 {
139 return operator=( static_cast<const BOARD_ITEM&>( aOther ) );
140 }
141
142 ~BOARD_ITEM() override;
143
144 virtual void CopyFrom( const BOARD_ITEM* aOther );
145
146 bool IsGroupableType() const;
147
148 int GetX() const
149 {
150 VECTOR2I p = GetPosition();
151 return p.x;
152 }
153
154 int GetY() const
155 {
156 VECTOR2I p = GetPosition();
157 return p.y;
158 }
159
165 virtual VECTOR2I GetCenter() const
166 {
167 return GetBoundingBox().GetCenter();
168 }
169
170 void SetX( int aX )
171 {
172 VECTOR2I p( aX, GetY() );
173 SetPosition( p );
174 }
175
176 void SetY( int aY )
177 {
178 VECTOR2I p( GetX(), aY );
179 SetPosition( p );
180 }
181
187 virtual bool IsConnected() const
188 {
189 return false;
190 }
191
198 virtual double Similarity( const BOARD_ITEM& aItem ) const = 0;
199 virtual bool operator==( const BOARD_ITEM& aItem ) const = 0;
200
204 virtual bool IsOnCopperLayer() const
205 {
206 if( IsSingleLayerType( Type() ) )
207 {
208 return IsCopperLayer( GetLayer() );
209 }
210 else
211 {
212 for( PCB_LAYER_ID layer : GetLayerSet() )
213 {
214 if( IsCopperLayer( layer ) )
215 return true;
216 }
217
218 return false;
219 }
220 }
221
222 virtual bool HasHole() const
223 {
224 return false;
225 }
226
227 virtual bool HasDrilledHole() const
228 {
229 return false;
230 }
231
239 virtual bool IsTented( PCB_LAYER_ID aLayer ) const
240 {
241 return false;
242 }
243
248
267 virtual std::shared_ptr<SHAPE> GetEffectiveShape( PCB_LAYER_ID aLayer = UNDEFINED_LAYER,
269 DRC_CONSTRAINT_T aUsage = NULL_CONSTRAINT ) const;
270
271 virtual std::shared_ptr<SHAPE_SEGMENT> GetEffectiveHoleShape( PCB_LAYER_ID aLayer = UNDEFINED_LAYER,
272 DRC_CONSTRAINT_T aUsage = NULL_CONSTRAINT ) const;
273
279 virtual void RunOnChildren( const std::function<void( BOARD_ITEM* )>& aFunction, RECURSE_MODE aMode ) const {}
280
282
284
290 void SetUuidDirect( const KIID& aUuid );
291
293
294 void SetUuid( const KIID& aUuid );
295 void ResetUuid() { SetUuid( KIID() ); }
296
302 virtual void RemapKIIDs( const std::map<KIID, KIID>& aIdMap ) {}
303
305 void SetFPRelativePosition( const VECTOR2I& aPos );
306
312 virtual bool HasLineStroke() const { return false; }
313
322 virtual bool IsLayerAgnostic() const { return false; }
323
331 virtual bool FitsEnabledLayers( const LSET& aEnabledLayers, int aCopperLayerCount ) const;
332
333 virtual STROKE_PARAMS GetStroke() const;
334 virtual void SetStroke( const STROKE_PARAMS& aStroke );
335
336 const KIFONT::METRICS& GetFontMetrics() const;
337
341 virtual PCB_LAYER_ID GetLayer() const;
342
350
354 virtual int BoardLayerCount() const;
355
359 virtual int BoardCopperLayerCount() const;
360
364 virtual LSET BoardLayerSet() const;
365
369 virtual LSET GetLayerSet() const
370 {
371 if( m_layer == UNDEFINED_LAYER )
372 return LSET();
373 else
374 return LSET( { m_layer } );
375 }
376
377 virtual void SetLayerSet( const LSET& aLayers )
378 {
379 if( aLayers.count() == 1 )
380 {
381 SetLayer( aLayers.Seq()[0] );
382 return;
383 }
384
386
387 // Derived classes which support multiple layers must implement this
388 }
389
390 bool IsSideSpecific() const;
391
397 virtual void SetLayer( PCB_LAYER_ID aLayer )
398 {
399 m_layer = aLayer;
400 }
401
409 virtual BOARD_ITEM* Duplicate( bool addToParentGroup, BOARD_COMMIT* aCommit = nullptr ) const;
410
421 void SwapItemData( BOARD_ITEM* aImage );
422
432 virtual bool IsOnLayer( PCB_LAYER_ID aLayer ) const
433 {
434 return m_layer == aLayer;
435 }
436
437 virtual bool IsKnockout() const { return m_isKnockout; }
438 virtual void SetIsKnockout( bool aKnockout ) { m_isKnockout = aKnockout; }
439
440 bool IsLocked() const override;
441 void SetLocked( bool aLocked ) override { m_isLocked = aLocked; }
442
443 bool IsIndexedInBoard() const { return m_owningIndex != nullptr; }
444
445 int GetMaxError() const;
446
447 virtual void StyleFromSettings( const BOARD_DESIGN_SETTINGS& settings, bool aCheckSide ) { }
448
452 void DeleteStructure();
453
459 virtual void Move( const VECTOR2I& aMoveVector )
460 {
461 wxFAIL_MSG( wxT( "virtual BOARD_ITEM::Move called for " ) + GetClass() );
462 }
463
470 virtual void Rotate( const VECTOR2I& aRotCentre, const EDA_ANGLE& aAngle );
471
483 virtual void OnFootprintRescaled( double aRatioX, double aRatioY, double aLinearFactor, const VECTOR2I& aAnchor,
484 const EDA_ANGLE& aParentRotate )
485 {}
486
491 virtual void OnFootprintTransformed() {}
492
499 virtual void Flip( const VECTOR2I& aCentre, FLIP_DIRECTION aFlipDirection );
500
507 virtual void Mirror( const VECTOR2I& aCentre, FLIP_DIRECTION aFlipDirection );
508
515 virtual void Mirror( const SEG& aAxis );
516
520 virtual void Normalize() {}
521
527 virtual void NormalizeForCompare() { Normalize(); }
528
532 virtual const BOARD* GetBoard() const;
533 virtual BOARD* GetBoard();
534
539 wxString GetParentAsString() const;
540
546 wxString GetLayerName() const;
547
551 wxString GetLayerName( PCB_LAYER_ID aLayer ) const;
552
553 virtual std::vector<int> ViewGetLayers() const override;
554
566 virtual void TransformShapeToPolygon( SHAPE_POLY_SET& aBuffer, PCB_LAYER_ID aLayer,
567 int aClearance, int aError, ERROR_LOC aErrorLoc,
568 bool ignoreLineWidth = false ) const;
569
583 int aClearance, int aError, ERROR_LOC aErrorLoc,
584 KIGFX::RENDER_SETTINGS* aRenderSettings = nullptr ) const
585 {
586 TransformShapeToPolygon( aBuffer, aLayer, aClearance, aError, aErrorLoc );
587 }
588
595 virtual double GetCoverageArea( int aTextMargin ) const;
596
597 const std::vector<wxString>* GetEmbeddedFonts() override;
598
602 virtual wxString LayerMaskDescribe() const;
603
604 enum COMPARE_FLAGS : int
605 {
606 DRC = 0x01,
608 };
609
610 struct ptr_cmp
611 {
612 bool operator() ( const BOARD_ITEM* a, const BOARD_ITEM* b ) const;
613 };
614
615protected:
616 virtual void swapData( BOARD_ITEM* aImage );
617
619 static double polygonArea( SHAPE_POLY_SET& aPolySet );
620
622 LSET viewVisibleLayers( const KIGFX::VIEW* aView ) const;
623
624protected:
628
633 mutable BOARD_ITEM_INDEX* m_owningIndex = nullptr;
634
635 friend class BOARD_ITEM_INDEX;
636};
637
639
646{
647public:
649 BOARD_ITEM( nullptr, NOT_USED )
650 {}
651
652 wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider, bool aFull ) const override
653 {
654 return _( "(Deleted Item)" );
655 }
656
657 wxString GetClass() const override
658 {
659 return wxT( "DELETED_BOARD_ITEM" );
660 }
661
662 // pure virtuals:
663 void SetPosition( const VECTOR2I& ) override {}
664 VECTOR2I GetPosition() const override { return VECTOR2I( 0, 0 ); }
665
667 {
668 static DELETED_BOARD_ITEM* item = nullptr;
669
670 if( !item )
671 item = new DELETED_BOARD_ITEM();
672
673 return item;
674 }
675
676 double Similarity( const BOARD_ITEM& aItem ) const override
677 {
678 return ( this == &aItem ) ? 1.0 : 0.0;
679 }
680
681 bool operator==( const BOARD_ITEM& aBoardItem ) const override
682 {
683 return ( this == &aBoardItem );
684 }
685
686 bool operator==( const DELETED_BOARD_ITEM& aOther ) const
687 {
688 return ( this == &aOther );
689 }
690
691#if defined(DEBUG)
692 void Show( int , std::ostream& ) const override {}
693#endif
694};
ERROR_LOC
When approximating an arc or circle, should the error be placed on the outside or inside of the curve...
ZONE_LAYER_OVERRIDE
Conditionally flashed vias and pads that interact with zones of different priority can be very squirr...
Definition board_item.h:75
@ ZLO_NONE
Definition board_item.h:76
@ ZLO_FORCE_NO_ZONE_CONNECTION
Definition board_item.h:78
@ ZLO_FORCE_FLASHED
Definition board_item.h:77
SEG MIRROR_AXIS(const VECTOR2I &aCentre, FLIP_DIRECTION aFlipDirection)
Definition board_item.h:85
Container for design settings for a BOARD object.
Abstract interface for BOARD_ITEMs capable of storing other items inside.
Bi-directional index mapping a board's items keyed by identity (KIID).
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Definition board_item.h:99
BOARD_ITEM(BOARD_ITEM *aParent, KICAD_T idtype, PCB_LAYER_ID aLayer=F_Cu)
Definition board_item.h:101
virtual void Mirror(const VECTOR2I &aCentre, FLIP_DIRECTION aFlipDirection)
Mirror this object relative to a given horizontal axis the layer is not changed.
void SetUuidDirect(const KIID &aUuid)
Raw UUID assignment.
void ResetUuidDirect()
Definition board_item.h:292
int GetY() const
Definition board_item.h:154
bool IsGroupableType() const
virtual BOARD_ITEM * Duplicate(bool addToParentGroup, BOARD_COMMIT *aCommit=nullptr) const
Create a copy of this BOARD_ITEM.
virtual void NormalizeForCompare()
Perform any normalization required to compare 2 graphics, especially if the can be rotated and/or fli...
Definition board_item.h:527
virtual void OnFootprintTransformed()
Hook for items inside a footprint to refresh after the FP transform changes (translate,...
Definition board_item.h:491
void DeleteStructure()
Delete this object after removing from its parent if it has one.
const std::vector< wxString > * GetEmbeddedFonts() override
void SwapItemData(BOARD_ITEM *aImage)
Swap data between aItem and aImage.
void SetLocked(bool aLocked) override
Definition board_item.h:441
virtual STROKE_PARAMS GetStroke() const
virtual bool IsConnected() const
Returns information if the object is derived from BOARD_CONNECTED_ITEM.
Definition board_item.h:187
bool m_isKnockout
Definition board_item.h:626
PCB_LAYER_ID GetFlippedLayer(PCB_LAYER_ID aLayer) const
Return the layer paired with aLayer on the opposite side of the board.
virtual int BoardLayerCount() const
Return the total number of layers for the board that this item resides on.
virtual void SetStroke(const STROKE_PARAMS &aStroke)
LSET viewVisibleLayers(const KIGFX::VIEW *aView) const
Enabled board layers that aView shows, for LOD checks on views that hide layers on their own.
void SetUuid(const KIID &aUuid)
static double polygonArea(SHAPE_POLY_SET &aPolySet)
Area of aPolySet with every contour closed first, holes subtracted.
PCB_LAYER_ID m_layer
Definition board_item.h:625
BOARD_ITEM(const BOARD_ITEM &aOther)
Definition board_item.h:109
virtual void SetLayerSet(const LSET &aLayers)
Definition board_item.h:377
bool m_isLocked
Definition board_item.h:627
bool IsIndexedInBoard() const
Definition board_item.h:443
wxString GetParentAsString() const
For "parent" property.
virtual std::shared_ptr< SHAPE_SEGMENT > GetEffectiveHoleShape(PCB_LAYER_ID aLayer=UNDEFINED_LAYER, DRC_CONSTRAINT_T aUsage=NULL_CONSTRAINT) const
virtual bool IsKnockout() const
Definition board_item.h:437
int GetX() const
Definition board_item.h:148
bool IsLocked() const override
virtual PCB_LAYER_ID GetLayer() const
Return the primary layer this item is on.
virtual void TransformShapeToPolygon(SHAPE_POLY_SET &aBuffer, PCB_LAYER_ID aLayer, int aClearance, int aError, ERROR_LOC aErrorLoc, bool ignoreLineWidth=false) const
Convert the item shape to a closed polygon.
virtual void Rotate(const VECTOR2I &aRotCentre, const EDA_ANGLE &aAngle)
Rotate this object.
void SetX(int aX)
Definition board_item.h:170
void SetY(int aY)
Definition board_item.h:176
virtual VECTOR2I GetCenter() const
This defaults to the center of the bounding box if not overridden.
Definition board_item.h:165
virtual void Move(const VECTOR2I &aMoveVector)
Move this object.
Definition board_item.h:459
virtual bool IsOnLayer(PCB_LAYER_ID aLayer) const
Test to see if this object is on the given layer.
Definition board_item.h:432
virtual void SetIsKnockout(bool aKnockout)
Definition board_item.h:438
virtual double GetCoverageArea(int aTextMargin) const
Return the board area this item covers, used to rank candidates under the cursor so a click on a smal...
virtual void SetLayer(PCB_LAYER_ID aLayer)
Set the layer this item is on.
Definition board_item.h:397
BOARD_ITEM & operator=(BOARD_ITEM &&aOther)
Definition board_item.h:137
virtual std::vector< int > ViewGetLayers() const override
Return the all the layers within the VIEW the object is painted on.
virtual const BOARD * GetBoard() const
Return the BOARD in which this BOARD_ITEM resides, or NULL if none.
FOOTPRINT * GetParentFootprint() const
VECTOR2I GetFPRelativePosition() const
virtual LSET BoardLayerSet() const
Return the LSET for the board that this item resides on.
BOARD_ITEM(BOARD_ITEM &&aOther)
Definition board_item.h:132
virtual LSET GetLayerSet() const
Return a std::bitset of all layers on which the item physically resides.
Definition board_item.h:369
virtual bool IsTented(PCB_LAYER_ID aLayer) const
Checks if the given object is tented (its copper shape is covered by solder mask) on a given side of ...
Definition board_item.h:239
virtual bool IsLayerAgnostic() const
Check if this item's layer set must not be confined to a board's enabled layers.
Definition board_item.h:322
virtual void TransformShapeToPolySet(SHAPE_POLY_SET &aBuffer, PCB_LAYER_ID aLayer, int aClearance, int aError, ERROR_LOC aErrorLoc, KIGFX::RENDER_SETTINGS *aRenderSettings=nullptr) const
Convert the item shape to a polyset.
Definition board_item.h:582
virtual void swapData(BOARD_ITEM *aImage)
const KIFONT::METRICS & GetFontMetrics() const
~BOARD_ITEM() override
@ INSTANCE_TO_INSTANCE
Definition board_item.h:607
friend class BOARD_ITEM_INDEX
Definition board_item.h:635
void SetFPRelativePosition(const VECTOR2I &aPos)
virtual wxString LayerMaskDescribe() const
Return a string (to be shown to the user) describing a layer mask.
static VECTOR2I ZeroOffset
A value of wxPoint(0,0) which can be passed to the Draw() functions.
Definition board_item.h:247
virtual bool FitsEnabledLayers(const LSET &aEnabledLayers, int aCopperLayerCount) const
Check if a board offering aEnabledLayers can hold this item.
virtual void CopyFrom(const BOARD_ITEM *aOther)
virtual bool operator==(const BOARD_ITEM &aItem) const =0
virtual void RunOnChildren(const std::function< void(BOARD_ITEM *)> &aFunction, RECURSE_MODE aMode) const
Invoke a function on all children.
Definition board_item.h:279
BOARD_ITEM & operator=(const BOARD_ITEM &aOther)
Definition board_item.h:118
void ResetUuid()
Definition board_item.h:295
BOARD_ITEM_INDEX * m_owningIndex
Board index that indexes this item, or nullptr.
Definition board_item.h:633
virtual bool HasDrilledHole() const
Definition board_item.h:227
BOARD_ITEM_CONTAINER * GetParent() const
Definition board_item.h:281
bool IsSideSpecific() const
virtual int BoardCopperLayerCount() const
Return the total number of copper layers for the board that this item resides on.
virtual bool IsOnCopperLayer() const
Definition board_item.h:204
virtual bool HasLineStroke() const
Check if this item has line stoke properties.
Definition board_item.h:312
virtual void Normalize()
Perform any normalization required after a user rotate and/or flip.
Definition board_item.h:520
virtual std::shared_ptr< SHAPE > GetEffectiveShape(PCB_LAYER_ID aLayer=UNDEFINED_LAYER, FLASHING aFlash=FLASHING::DEFAULT, DRC_CONSTRAINT_T aUsage=NULL_CONSTRAINT) const
Some pad shapes can be complex (rounded/chamfered rectangle), even without considering custom shapes.
virtual void OnFootprintRescaled(double aRatioX, double aRatioY, double aLinearFactor, const VECTOR2I &aAnchor, const EDA_ANGLE &aParentRotate)
Apply a parent footprint scale to this item.
Definition board_item.h:483
wxString GetLayerName() const
Return the name of the PCB layer on which the item resides.
int GetMaxError() const
virtual double Similarity(const BOARD_ITEM &aItem) const =0
Return a measure of how likely the other object is to represent the same object.
virtual void StyleFromSettings(const BOARD_DESIGN_SETTINGS &settings, bool aCheckSide)
Definition board_item.h:447
virtual void Flip(const VECTOR2I &aCentre, FLIP_DIRECTION aFlipDirection)
Flip this object, i.e.
virtual bool HasHole() const
Definition board_item.h:222
virtual void RemapKIIDs(const std::map< KIID, KIID > &aIdMap)
Remap KIIDs this item stores to reference other items (e.g.
Definition board_item.h:302
Information pertinent to a Pcbnew printed circuit board.
Definition board.h:411
constexpr const Vec GetCenter() const
Definition box2.h:233
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider, bool aFull) const override
Return a user-visible description string of this item.
Definition board_item.h:652
static DELETED_BOARD_ITEM * GetInstance()
Definition board_item.h:666
wxString GetClass() const override
Return the class name.
Definition board_item.h:657
double Similarity(const BOARD_ITEM &aItem) const override
Return a measure of how likely the other object is to represent the same object.
Definition board_item.h:676
VECTOR2I GetPosition() const override
Definition board_item.h:664
void SetPosition(const VECTOR2I &) override
Definition board_item.h:663
bool operator==(const BOARD_ITEM &aBoardItem) const override
Definition board_item.h:681
bool operator==(const DELETED_BOARD_ITEM &aOther) const
Definition board_item.h:686
virtual VECTOR2I GetPosition() const
Definition eda_item.h:348
EDA_ITEM & operator=(const EDA_ITEM &aItem)
Assign the members of aItem to another object.
Definition eda_item.cpp:498
virtual void SetPosition(const VECTOR2I &aPos)
Definition eda_item.h:349
virtual const BOX2I GetBoundingBox() const
Return the orthogonal bounding box of this object for display purposes.
Definition eda_item.cpp:280
KICAD_T Type() const
Returns the type of object.
Definition eda_item.h:110
EDA_ITEM * m_parent
Owner.
Definition eda_item.h:609
EDA_ITEM(EDA_ITEM *parent, KICAD_T idType, bool isSCH_ITEM=false, bool isBOARD_ITEM=false)
Definition eda_item.cpp:84
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
virtual wxString GetClass() const =0
Return the class name.
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:46
LSET is a set of PCB_LAYER_IDs.
Definition lset.h:37
LSEQ Seq(const LSEQ &aSequence) const
Return an LSEQ from the union of this LSET and a desired sequence.
Definition lset.cpp:309
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
A set of BOARD_ITEMs (i.e., without duplicates).
Definition pcb_group.h:51
Definition seg.h:38
Represent a set of closed polygons.
An abstract shape on 2D plane.
Definition shape.h:124
Simple container to manage line stroke parameters.
@ NULL_CONSTRAINT
#define _(s)
RECURSE_MODE
Definition eda_item.h:50
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
bool IsCopperLayer(int aLayerId)
Test whether a layer is a copper layer.
Definition layer_ids.h:744
PCB_LAYER_ID
A quick note on layer IDs:
Definition layer_ids.h:56
@ UNDEFINED_LAYER
Definition layer_ids.h:57
@ F_Cu
Definition layer_ids.h:60
This file contains miscellaneous commonly used macros and functions.
#define UNIMPLEMENTED_FOR(type)
Definition macros.h:92
FLIP_DIRECTION
Definition mirror.h:26
@ LEFT_RIGHT
Flip left to right (around the Y axis)
Definition mirror.h:27
The Cairo implementation of the graphics abstraction layer.
Definition eda_group.h:30
#define DECLARE_ENUM_TO_WXANY(type)
Definition property.h:879
bool operator()(const BOARD_ITEM *a, const BOARD_ITEM *b) const
constexpr bool IsSingleLayerType(const KICAD_T aType)
Definition typeinfo.h:527
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
Definition typeinfo.h:70
@ NOT_USED
the 3d code uses this value
Definition typeinfo.h:71
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:708