KiCad PCB EDA Suite
Loading...
Searching...
No Matches
pcb_track.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) 2004 Jean-Pierre Charras, [email protected]
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, 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
34
35#pragma once
36
37#include <array>
38#include <optional>
39#include <mutex>
40
42#include <base_units.h>
44#include <core/minoptmax.h>
45#include <core/arraydim.h>
46#include <lset.h>
47#include <padstack.h>
48#include <pcb_track_types.h>
49
50class PAD;
51class MSG_PANEL_ITEM;
52class SHAPE_POLY_SET;
53class SHAPE_ARC;
54
55
56// Used for tracks and vias for algorithmic safety, not to enforce constraints
57#define GEOMETRY_MIN_SIZE (int) ( 0.001 * pcbIUScale.IU_PER_MM )
58
59
61{
62public:
63 static inline bool ClassOf( const EDA_ITEM* aItem )
64 {
65 return aItem && PCB_TRACE_T == aItem->Type();
66 }
67
68 PCB_TRACK( BOARD_ITEM* aParent, KICAD_T idtype = PCB_TRACE_T );
69
70 // Do not create a copy constructor. The one generated by the compiler is adequate.
71
72 void CopyFrom( const BOARD_ITEM* aOther ) override;
73
74 void Move( const VECTOR2I& aMoveVector ) override
75 {
76 m_Start += aMoveVector;
77 m_End += aMoveVector;
78 }
79
80 void Rotate( const VECTOR2I& aRotCentre, const EDA_ANGLE& aAngle ) override;
81
82 virtual void Mirror( const VECTOR2I& aCentre, FLIP_DIRECTION aFlipDirection ) override;
83
84 void Flip( const VECTOR2I& aCentre, FLIP_DIRECTION aFlipDirection ) override;
85
86 void SetPosition( const VECTOR2I& aPos ) override { m_Start = aPos; }
87 VECTOR2I GetPosition() const override { return m_Start; }
88 const VECTOR2I GetFocusPosition() const override { return ( m_Start + m_End ) / 2; }
89
90 virtual void SetWidth( int aWidth ) { m_width = aWidth; }
91 virtual int GetWidth() const { return m_width; }
92
93 void SetEnd( const VECTOR2I& aEnd ) { m_End = aEnd; }
94 const VECTOR2I& GetEnd() const { return m_End; }
95
96 void SetStart( const VECTOR2I& aStart ) { m_Start = aStart; }
97 const VECTOR2I& GetStart() const { return m_Start; }
98
99 void SetStartX( int aX ) { m_Start.x = aX; }
100 void SetStartY( int aY ) { m_Start.y = aY; }
101
102 int GetStartX() const { return m_Start.x; }
103 int GetStartY() const { return m_Start.y; }
104
105 void SetEndX( int aX ) { m_End.x = aX; }
106 void SetEndY( int aY ) { m_End.y = aY; }
107
108 int GetEndX() const { return m_End.x; }
109 int GetEndY() const { return m_End.y; }
110
112 const VECTOR2I& GetEndPoint( ENDPOINT_T aEndPoint ) const
113 {
114 if( aEndPoint == ENDPOINT_START )
115 return m_Start;
116 else
117 return m_End;
118 }
119
120 void SetHasSolderMask( bool aVal ) { m_hasSolderMask = aVal; }
121 bool HasSolderMask() const { return m_hasSolderMask; }
122
123 void SetLocalSolderMaskMargin( std::optional<int> aMargin ) { m_solderMaskMargin = aMargin; }
124 std::optional<int> GetLocalSolderMaskMargin() const { return m_solderMaskMargin; }
125
126 int GetSolderMaskExpansion() const;
127
128 // Virtual function
129 bool IsOnLayer( PCB_LAYER_ID aLayer ) const override;
130
131 virtual LSET GetLayerSet() const override;
132 virtual void SetLayerSet( const LSET& aLayers ) override;
133
134 const BOX2I GetBoundingBox() const override;
135
141 virtual double GetLength() const;
142
148 virtual double GetDelay() const;
149
161 void TransformShapeToPolygon( SHAPE_POLY_SET& aBuffer, PCB_LAYER_ID aLayer, int aClearance,
162 int aError, ERROR_LOC aErrorLoc,
163 bool ignoreLineWidth = false ) const override;
164
165 // @copydoc BOARD_ITEM::GetEffectiveShape
166 std::shared_ptr<SHAPE> GetEffectiveShape( PCB_LAYER_ID aLayer = UNDEFINED_LAYER,
167 FLASHING aFlash = FLASHING::DEFAULT ) const override;
168
176 EDA_ITEM_FLAGS IsPointOnEnds( const VECTOR2I& point, int min_dist = 0 ) const;
177
181 bool IsNull() const
182 {
183 return ( Type() == PCB_VIA_T ) || ( m_Start == m_End );
184 }
185
186 void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList ) override;
187 wxString GetFriendlyName() const override;
188
189 INSPECT_RESULT Visit( INSPECTOR inspector, void* testData,
190 const std::vector<KICAD_T>& aScanTypes ) override;
191
192 bool HitTest( const VECTOR2I& aPosition, int aAccuracy = 0 ) const override;
193 bool HitTest( const BOX2I& aRect, bool aContained, int aAccuracy = 0 ) const override;
194 bool HitTest( const SHAPE_LINE_CHAIN& aPoly, bool aContained ) const override;
195
196 bool ApproxCollinear( const PCB_TRACK& aTrack );
197
198 wxString GetClass() const override
199 {
200 return wxT( "PCB_TRACK" );
201 }
202
203 virtual MINOPTMAX<int> GetWidthConstraint( wxString* aSource = nullptr ) const;
204
205 wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider, bool aFull ) const override;
206
207 BITMAPS GetMenuImage() const override;
208
209 virtual EDA_ITEM* Clone() const override;
210
211 virtual std::vector<int> ViewGetLayers() const override;
212
213 double ViewGetLOD( int aLayer, const KIGFX::VIEW* aView ) const override;
214
215 const BOX2I ViewBBox() const override;
216
220 bool IsOnCopperLayer() const override
221 {
222 return true;
223 }
224
225 virtual double Similarity( const BOARD_ITEM& aOther ) const override;
226
227 virtual bool operator==( const BOARD_ITEM& aOther ) const override;
228 virtual bool operator==( const PCB_TRACK& aOther ) const;
229
231 {
232 bool operator()( const PCB_TRACK* aFirst, const PCB_TRACK* aSecond ) const;
233 };
234
235 void Serialize( google::protobuf::Any &aContainer ) const override;
236 bool Deserialize( const google::protobuf::Any &aContainer ) override;
237
238#if defined (DEBUG)
239 virtual void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
240#endif
241
242protected:
243 virtual void swapData( BOARD_ITEM* aImage ) override;
244
246 std::vector<MSG_PANEL_ITEM>& aList ) const;
247
248protected:
251
253 std::optional<int> m_solderMaskMargin;
254
255private:
257};
258
259
260class PCB_ARC : public PCB_TRACK
261{
262public:
263 PCB_ARC( BOARD_ITEM* aParent ) :
264 PCB_TRACK( aParent, PCB_ARC_T )
265 { }
266
267 PCB_ARC( BOARD_ITEM* aParent, const SHAPE_ARC* aArc );
268
269 void CopyFrom( const BOARD_ITEM* aOther ) override;
270
271 static inline bool ClassOf( const EDA_ITEM *aItem )
272 {
273 return aItem && PCB_ARC_T == aItem->Type();
274 }
275
276 virtual void Move( const VECTOR2I& aMoveVector ) override
277 {
278 m_Start += aMoveVector;
279 m_Mid += aMoveVector;
280 m_End += aMoveVector;
281 }
282
283 void Rotate( const VECTOR2I& aRotCentre, const EDA_ANGLE& aAngle ) override;
284
285 void Mirror( const VECTOR2I& aCentre, FLIP_DIRECTION aFlipDirection ) override;
286
287 void Flip( const VECTOR2I& aCentre, FLIP_DIRECTION aFlipDirection ) override;
288
289 void SetMid( const VECTOR2I& aMid ) { m_Mid = aMid; }
290 const VECTOR2I& GetMid() const { return m_Mid; }
291
292 void SetPosition( const VECTOR2I& aPos ) override { m_Start = aPos; }
293
294 virtual VECTOR2I GetPosition() const override;
295 const VECTOR2I GetFocusPosition() const override { return m_Mid; }
296
297 virtual VECTOR2I GetCenter() const override { return GetPosition(); }
298
299 double GetRadius() const;
300 EDA_ANGLE GetAngle() const;
302 EDA_ANGLE GetArcAngleEnd() const; // Called by Python; ignore CLion's claim that it's unused
303 virtual bool HitTest( const VECTOR2I& aPosition, int aAccuracy = 0 ) const override;
304
305 virtual bool HitTest( const BOX2I& aRect, bool aContained = true,
306 int aAccuracy = 0 ) const override;
307
308 bool IsCCW() const;
309
310 wxString GetClass() const override
311 {
312 return wxT( "PCB_ARC" );
313 }
314
315 // @copydoc BOARD_ITEM::GetEffectiveShape
316 std::shared_ptr<SHAPE> GetEffectiveShape( PCB_LAYER_ID aLayer = UNDEFINED_LAYER,
317 FLASHING aFlash = FLASHING::DEFAULT ) const override;
318
324 virtual double GetLength() const override
325 {
326 return GetRadius() * std::abs( GetAngle().AsRadians() );
327 }
328
329 EDA_ITEM* Clone() const override;
330
337 bool IsDegenerated( int aThreshold = 5 ) const;
338
339 double Similarity( const BOARD_ITEM& aOther ) const override;
340
341 bool operator==( const PCB_ARC& aOther ) const;
342 bool operator==( const BOARD_ITEM& aBoardItem ) const override;
343
344 void Serialize( google::protobuf::Any &aContainer ) const override;
345 bool Deserialize( const google::protobuf::Any &aContainer ) override;
346
347protected:
348 virtual void swapData( BOARD_ITEM* aImage ) override;
349
350private:
351 // Silence GCC warning about overriding the base class method
352 bool operator==( const PCB_TRACK& aOther ) const override;
353
355};
356
357
358class PCB_VIA : public PCB_TRACK
359{
360public:
361 PCB_VIA( BOARD_ITEM* aParent );
362
363 static inline bool ClassOf( const EDA_ITEM *aItem )
364 {
365 return aItem && PCB_VIA_T == aItem->Type();
366 }
367
368 PCB_VIA( const PCB_VIA& aOther );
369 PCB_VIA& operator=( const PCB_VIA &aOther );
370
371 void CopyFrom( const BOARD_ITEM* aOther ) override;
372
373 bool IsType( const std::vector<KICAD_T>& aScanTypes ) const override
374 {
375 if( BOARD_CONNECTED_ITEM::IsType( aScanTypes ) )
376 return true;
377
378 for( KICAD_T scanType : aScanTypes )
379 {
380 if( scanType == PCB_LOCATE_STDVIA_T && m_viaType == VIATYPE::THROUGH )
381 return true;
382 else if( scanType == PCB_LOCATE_UVIA_T && m_viaType == VIATYPE::MICROVIA )
383 return true;
384 else if( scanType == PCB_LOCATE_BLINDVIA_T && m_viaType == VIATYPE::BLIND )
385 return true;
386 else if( scanType == PCB_LOCATE_BURIEDVIA_T && m_viaType == VIATYPE::BURIED )
387 return true;
388 }
389
390 return false;
391 }
392
396 bool HasValidLayerPair( int aCopperLayerCount );
397
398 VIATYPE GetViaType() const { return m_viaType; }
399 void SetViaType( VIATYPE aViaType )
400 {
401 m_viaType = aViaType;
402 // If someone updates a VIA to TH, we want to kick out any non-outer layers
404 }
405
406 const PADSTACK& Padstack() const { return m_padStack; }
408 void SetPadstack( const PADSTACK& aPadstack ) { m_padStack = aPadstack; }
409
410 BACKDRILL_MODE GetBackdrillMode() const { return m_padStack.GetBackdrillMode(); }
411 void SetBackdrillMode( BACKDRILL_MODE aMode ) { m_padStack.SetBackdrillMode( aMode ); }
412
413 std::optional<int> GetBottomBackdrillSize() const { return m_padStack.GetBackdrillSize( false ); }
414 void SetBottomBackdrillSize( std::optional<int> aSize ) { m_padStack.SetBackdrillSize( false, aSize ); }
415
416 PCB_LAYER_ID GetBottomBackdrillLayer() const { return m_padStack.GetBackdrillEndLayer( false ); }
417 void SetBottomBackdrillLayer( PCB_LAYER_ID aLayer ) { m_padStack.SetBackdrillEndLayer( false, aLayer ); }
418
419 std::optional<int> GetTopBackdrillSize() const { return m_padStack.GetBackdrillSize( true ); }
420 void SetTopBackdrillSize( std::optional<int> aSize ) { m_padStack.SetBackdrillSize( true, aSize ); }
421
422 PCB_LAYER_ID GetTopBackdrillLayer() const { return m_padStack.GetBackdrillEndLayer( true ); }
423 void SetTopBackdrillLayer( PCB_LAYER_ID aLayer ) { m_padStack.SetBackdrillEndLayer( true, aLayer ); }
424
425 bool IsMicroVia() const;
426 bool IsBlindVia() const;
427 bool IsBuriedVia() const;
428
449
450 static std::optional<VIA_PARAMETER_ERROR>
451 ValidateViaParameters( std::optional<int> aDiameter,
452 std::optional<int> aPrimaryDrill,
453 std::optional<PCB_LAYER_ID> aPrimaryStartLayer = std::nullopt,
454 std::optional<PCB_LAYER_ID> aPrimaryEndLayer = std::nullopt,
455 std::optional<int> aSecondaryDrill = std::nullopt,
456 std::optional<PCB_LAYER_ID> aSecondaryStartLayer = std::nullopt,
457 std::optional<PCB_LAYER_ID> aSecondaryEndLayer = std::nullopt,
458 std::optional<int> aTertiaryDrill = std::nullopt,
459 std::optional<PCB_LAYER_ID> aTertiaryStartLayer = std::nullopt,
460 std::optional<PCB_LAYER_ID> aTertiaryEndLayer = std::nullopt,
461 int aCopperLayerCount = 0 );
462
463 const BOX2I GetBoundingBox() const override;
464 const BOX2I GetBoundingBox( PCB_LAYER_ID aLayer ) const;
465
466 void SetWidth( int aWidth ) override;
467 int GetWidth() const override;
468
469 void SetWidth( PCB_LAYER_ID aLayer, int aWidth );
470 int GetWidth( PCB_LAYER_ID aLayer ) const;
471
472 // For properties panel
473 void SetFrontWidth( int aWidth ) { SetWidth( F_Cu, aWidth ); }
474 int GetFrontWidth() const { return GetWidth( F_Cu ); }
475
476 bool HasHole() const override
477 {
478 return true;
479 }
480
481 bool HasDrilledHole() const override
482 {
484 }
485
486 std::shared_ptr<SHAPE_SEGMENT> GetEffectiveHoleShape() const override;
487
488 MINOPTMAX<int> GetWidthConstraint( wxString* aSource = nullptr ) const override;
489 MINOPTMAX<int> GetDrillConstraint( wxString* aSource = nullptr ) const;
490
491 void SetFrontTentingMode( TENTING_MODE aMode );
493 void SetBackTentingMode( TENTING_MODE aMode );
495
500
505
506 void SetCappingMode( CAPPING_MODE aMode );
508
509 void SetFillingMode( FILLING_MODE aMode );
511
512 bool IsTented( PCB_LAYER_ID aLayer ) const override;
513 int GetSolderMaskExpansion() const;
514
515 PCB_LAYER_ID GetLayer() const override;
516 void SetLayer( PCB_LAYER_ID aLayer ) override;
517
518 bool IsOnLayer( PCB_LAYER_ID aLayer ) const override;
519
520 virtual LSET GetLayerSet() const override;
521
526 virtual void SetLayerSet( const LSET& aLayers ) override;
527
534 void SetLayerPair( PCB_LAYER_ID aTopLayer, PCB_LAYER_ID aBottomLayer );
535
536 void SetBottomLayer( PCB_LAYER_ID aLayer );
537 void SetTopLayer( PCB_LAYER_ID aLayer );
538
546 void LayerPair( PCB_LAYER_ID* top_layer, PCB_LAYER_ID* bottom_layer ) const;
547
548 PCB_LAYER_ID TopLayer() const;
550
555 void SanitizeLayers();
556
557 VECTOR2I GetPosition() const override { return m_Start; }
558 void SetPosition( const VECTOR2I& aPoint ) override { m_Start = aPoint; m_End = aPoint; }
559
560 void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList ) override;
561
562 bool HitTest( const VECTOR2I& aPosition, int aAccuracy = 0 ) const override;
563 bool HitTest( const BOX2I& aRect, bool aContained, int aAccuracy = 0 ) const override;
564
565 wxString GetClass() const override
566 {
567 return wxT( "PCB_VIA" );
568 }
569
570 wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider, bool aFull ) const override;
571
572 BITMAPS GetMenuImage() const override;
573
574 EDA_ITEM* Clone() const override;
575
576 std::vector<int> ViewGetLayers() const override;
577
578 double ViewGetLOD( int aLayer, const KIGFX::VIEW* aView ) const override;
579
580 void Flip( const VECTOR2I& aCentre, FLIP_DIRECTION aFlipDirection ) override;
581
582#if defined (DEBUG)
583 void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
584#endif
585
586 int GetMinAnnulus( PCB_LAYER_ID aLayer, wxString* aSource ) const;
587
593 void SetRemoveUnconnected( bool aSet )
594 {
595 m_padStack.SetUnconnectedLayerMode( aSet ? UNCONNECTED_LAYER_MODE::REMOVE_ALL
597 }
598
600 {
601 return m_padStack.UnconnectedLayerMode() != UNCONNECTED_LAYER_MODE::KEEP_ALL;
602 }
603
608 void SetKeepStartEnd( bool aSet )
609 {
612 }
613
614 bool GetKeepStartEnd() const
615 {
617 }
618
620 {
621 switch( m_padStack.UnconnectedLayerMode() )
622 {
624 return false;
625
627 return true;
628
631 return aLayer != m_padStack.Drill().start && aLayer != m_padStack.Drill().end;
632 }
633
634 return true;
635 }
636
643 bool FlashLayer( int aLayer ) const;
644
652 bool FlashLayer( const LSET& aLayers ) const;
653
660 PCB_LAYER_ID* aBottommost ) const;
661
667 void SetPrimaryDrillSize( const VECTOR2I& aSize );
668 const VECTOR2I& GetPrimaryDrillSize() const { return m_padStack.Drill().size; }
669
671 PAD_DRILL_SHAPE GetPrimaryDrillShape() const { return m_padStack.Drill().shape; }
672
674 PCB_LAYER_ID GetPrimaryDrillStartLayer() const { return m_padStack.Drill().start; }
675
677 PCB_LAYER_ID GetPrimaryDrillEndLayer() const { return m_padStack.Drill().end; }
678
679 void SetFrontPostMachining( const std::optional<PAD_DRILL_POST_MACHINING_MODE>& aMode );
680 std::optional<PAD_DRILL_POST_MACHINING_MODE> GetFrontPostMachining() const { return m_padStack.FrontPostMachining().mode; }
681
683 {
684 m_padStack.FrontPostMachining().mode = aMode;
685 }
686
691
692 void SetFrontPostMachiningSize( int aSize ) { m_padStack.FrontPostMachining().size = aSize; }
693 int GetFrontPostMachiningSize() const { return m_padStack.FrontPostMachining().size; }
694 void SetFrontPostMachiningDepth( int aDepth ) { m_padStack.FrontPostMachining().depth = aDepth; }
695 int GetFrontPostMachiningDepth() const { return m_padStack.FrontPostMachining().depth; }
696 void SetFrontPostMachiningAngle( int aAngle ) { m_padStack.FrontPostMachining().angle = aAngle; }
697 int GetFrontPostMachiningAngle() const { return m_padStack.FrontPostMachining().angle; }
698
699 void SetBackPostMachining( const std::optional<PAD_DRILL_POST_MACHINING_MODE>& aMode );
700 std::optional<PAD_DRILL_POST_MACHINING_MODE> GetBackPostMachining() const { return m_padStack.BackPostMachining().mode; }
701
703 {
704 m_padStack.BackPostMachining().mode = aMode;
705 }
706
711
712 void SetBackPostMachiningSize( int aSize ) { m_padStack.BackPostMachining().size = aSize; }
713 int GetBackPostMachiningSize() const { return m_padStack.BackPostMachining().size; }
714 void SetBackPostMachiningDepth( int aDepth ) { m_padStack.BackPostMachining().depth = aDepth; }
715 int GetBackPostMachiningDepth() const { return m_padStack.BackPostMachining().depth; }
716 void SetBackPostMachiningAngle( int aAngle ) { m_padStack.BackPostMachining().angle = aAngle; }
717 int GetBackPostMachiningAngle() const { return m_padStack.BackPostMachining().angle; }
718
728 bool IsBackdrilledOrPostMachined( PCB_LAYER_ID aLayer ) const;
729
736 int GetPostMachiningKnockout( PCB_LAYER_ID aLayer ) const;
737
738 void SetPrimaryDrillFilled( const std::optional<bool>& aFilled );
739 void SetPrimaryDrillFilledFlag( bool aFilled );
740 std::optional<bool> GetPrimaryDrillFilled() const { return m_padStack.Drill().is_filled; }
741 bool GetPrimaryDrillFilledFlag() const { return m_padStack.Drill().is_filled.value_or( false ); }
742
743 void SetPrimaryDrillCapped( const std::optional<bool>& aCapped );
744 void SetPrimaryDrillCappedFlag( bool aCapped );
745 std::optional<bool> GetPrimaryDrillCapped() const { return m_padStack.Drill().is_capped; }
746 bool GetPrimaryDrillCappedFlag() const { return m_padStack.Drill().is_capped.value_or( false ); }
747
748 void SetDrill( int aDrill )
749 {
750 SetPrimaryDrillSize( { aDrill, aDrill } );
751 }
752
758 int GetDrill() const { return GetPrimaryDrillSize().x; }
759
765 int GetDrillValue() const;
766
774
775 void SetSecondaryDrillSize( const VECTOR2I& aSize );
777 void SetSecondaryDrillSize( const std::optional<int>& aDrill );
778 std::optional<int> GetSecondaryDrillSize() const;
779
781 PCB_LAYER_ID GetSecondaryDrillStartLayer() const { return m_padStack.SecondaryDrill().start; }
782
784 PCB_LAYER_ID GetSecondaryDrillEndLayer() const { return m_padStack.SecondaryDrill().end; }
785
787 PAD_DRILL_SHAPE GetSecondaryDrillShape() const { return m_padStack.SecondaryDrill().shape; }
788
789 void SetTertiaryDrillSize( const VECTOR2I& aSize );
791 void SetTertiaryDrillSize( const std::optional<int>& aDrill );
792 std::optional<int> GetTertiaryDrillSize() const;
793
795 PCB_LAYER_ID GetTertiaryDrillStartLayer() const { return m_padStack.TertiaryDrill().start; }
796
798 PCB_LAYER_ID GetTertiaryDrillEndLayer() const { return m_padStack.TertiaryDrill().end; }
799
801 PAD_DRILL_SHAPE GetTertiaryDrillShape() const { return m_padStack.TertiaryDrill().shape; }
802
810 bool GetIsFree() const { return m_isFree; }
811 void SetIsFree( bool aFree = true ) { m_isFree = aFree; }
812
813 // @copydoc BOARD_ITEM::GetEffectiveShape
814 std::shared_ptr<SHAPE> GetEffectiveShape( PCB_LAYER_ID aLayer = UNDEFINED_LAYER,
815 FLASHING aFlash = FLASHING::DEFAULT ) const override;
816
818
820
821 void SetZoneLayerOverride( PCB_LAYER_ID aLayer, ZONE_LAYER_OVERRIDE aOverride );
822
823 double Similarity( const BOARD_ITEM& aOther ) const override;
824
825 bool operator==( const PCB_VIA& aOther ) const;
826 bool operator==( const BOARD_ITEM& aOther ) const override;
827
828 void Serialize( google::protobuf::Any &aContainer ) const override;
829 bool Deserialize( const google::protobuf::Any &aContainer ) override;
830
831 wxString LayerMaskDescribe() const override;
832
833protected:
834 void swapData( BOARD_ITEM* aImage ) override;
835
836private:
837 // Silence GCC warning about hiding the PCB_TRACK base method
838 bool operator==( const PCB_TRACK& aOther ) const override;
839
841
843
844 bool m_isFree;
845
847 std::map<PCB_LAYER_ID, ZONE_LAYER_OVERRIDE> m_zoneLayerOverrides;
848};
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.
ZONE_LAYER_OVERRIDE
Conditionally flashed vias and pads that interact with zones of different priority can be very squirr...
Definition board_item.h:72
BOX2< VECTOR2I > BOX2I
Definition box2.h:922
BOARD_CONNECTED_ITEM(BOARD_ITEM *aParent, KICAD_T idtype)
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
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:99
KICAD_T Type() const
Returns the type of object.
Definition eda_item.h:111
virtual bool IsType(const std::vector< KICAD_T > &aScanTypes) const
Check whether the item is one of the listed types.
Definition eda_item.h:198
EDA_ITEM(EDA_ITEM *parent, KICAD_T idType, bool isSCH_ITEM=false, bool isBOARD_ITEM=false)
Definition eda_item.cpp:41
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
Definition view.h:67
LSET is a set of PCB_LAYER_IDs.
Definition lset.h:37
EDA_MSG_PANEL items for displaying messages.
Definition msgpanel.h:54
A PADSTACK defines the characteristics of a single or multi-layer pad, in the IPC sense of the word.
Definition padstack.h:157
Definition pad.h:55
virtual VECTOR2I GetPosition() const override
bool IsDegenerated(int aThreshold=5) const
virtual void swapData(BOARD_ITEM *aImage) override
bool IsCCW() const
virtual double GetLength() const override
Return the length of the arc track.
Definition pcb_track.h:324
void Serialize(google::protobuf::Any &aContainer) const override
Serializes this object to the given Any message.
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
Definition pcb_track.cpp:95
void Flip(const VECTOR2I &aCentre, FLIP_DIRECTION aFlipDirection) override
Flip this object, i.e.
EDA_ANGLE GetArcAngleStart() const
void Mirror(const VECTOR2I &aCentre, FLIP_DIRECTION aFlipDirection) override
Mirror this object relative to a given horizontal axis the layer is not changed.
virtual bool HitTest(const VECTOR2I &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this item.
EDA_ANGLE GetArcAngleEnd() const
const VECTOR2I GetFocusPosition() const override
Similar to GetPosition() but allows items to return their visual center rather than their anchor.
Definition pcb_track.h:295
void SetPosition(const VECTOR2I &aPos) override
Definition pcb_track.h:292
virtual void Move(const VECTOR2I &aMoveVector) override
Move this object.
Definition pcb_track.h:276
wxString GetClass() const override
Return the class name.
Definition pcb_track.h:310
bool Deserialize(const google::protobuf::Any &aContainer) override
Deserializes the given protobuf message into this object.
void SetMid(const VECTOR2I &aMid)
Definition pcb_track.h:289
double GetRadius() const
EDA_ANGLE GetAngle() const
const VECTOR2I & GetMid() const
Definition pcb_track.h:290
PCB_ARC(BOARD_ITEM *aParent)
Definition pcb_track.h:263
double Similarity(const BOARD_ITEM &aOther) const override
Return a measure of how likely the other object is to represent the same object.
VECTOR2I m_Mid
Arc mid point, halfway between start and end.
Definition pcb_track.h:354
static bool ClassOf(const EDA_ITEM *aItem)
Definition pcb_track.h:271
void Rotate(const VECTOR2I &aRotCentre, const EDA_ANGLE &aAngle) override
Rotate this object.
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.
bool operator==(const PCB_ARC &aOther) const
virtual VECTOR2I GetCenter() const override
This defaults to the center of the bounding box if not overridden.
Definition pcb_track.h:297
void CopyFrom(const BOARD_ITEM *aOther) override
virtual LSET GetLayerSet() const override
Return a std::bitset of all layers on which the item physically resides.
virtual void SetLayerSet(const LSET &aLayers) override
int GetSolderMaskExpansion() const
void Rotate(const VECTOR2I &aRotCentre, const EDA_ANGLE &aAngle) override
Rotate this object.
void Serialize(google::protobuf::Any &aContainer) const override
Serializes this object to the given Any message.
void SetEndY(int aY)
Definition pcb_track.h:106
const VECTOR2I GetFocusPosition() const override
Similar to GetPosition() but allows items to return their visual center rather than their anchor.
Definition pcb_track.h:88
bool IsOnCopperLayer() const override
Definition pcb_track.h:220
void Move(const VECTOR2I &aMoveVector) override
Move this object.
Definition pcb_track.h:74
wxString GetClass() const override
Return the class name.
Definition pcb_track.h:198
void SetHasSolderMask(bool aVal)
Definition pcb_track.h:120
virtual double GetLength() const
Get the length of the track using the hypotenuse calculation.
double ViewGetLOD(int aLayer, const KIGFX::VIEW *aView) const override
Return the level of detail (LOD) of the item.
virtual void swapData(BOARD_ITEM *aImage) override
void SetEnd(const VECTOR2I &aEnd)
Definition pcb_track.h:93
bool HasSolderMask() const
Definition pcb_track.h:121
void SetStart(const VECTOR2I &aStart)
Definition pcb_track.h:96
const BOX2I ViewBBox() const override
Return the bounding box of the item covering all its layers.
int GetStartY() const
Definition pcb_track.h:103
int GetEndX() const
Definition pcb_track.h:108
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider, bool aFull) const override
Return a user-visible description string of this item.
virtual void Mirror(const VECTOR2I &aCentre, FLIP_DIRECTION aFlipDirection) override
Mirror this object relative to a given horizontal axis the layer is not changed.
bool Deserialize(const google::protobuf::Any &aContainer) override
Deserializes the given protobuf message into this object.
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...
bool ApproxCollinear(const PCB_TRACK &aTrack)
VECTOR2I m_End
Line end point.
Definition pcb_track.h:250
void SetLocalSolderMaskMargin(std::optional< int > aMargin)
Definition pcb_track.h:123
std::optional< int > m_solderMaskMargin
Definition pcb_track.h:253
void CopyFrom(const BOARD_ITEM *aOther) override
Definition pcb_track.cpp:79
void SetPosition(const VECTOR2I &aPos) override
Definition pcb_track.h:86
std::optional< int > GetLocalSolderMaskMargin() const
Definition pcb_track.h:124
virtual double GetDelay() const
Get the time delay of the track.
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.
virtual EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
Definition pcb_track.cpp:73
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
void TransformShapeToPolygon(SHAPE_POLY_SET &aBuffer, PCB_LAYER_ID aLayer, int aClearance, int aError, ERROR_LOC aErrorLoc, bool ignoreLineWidth=false) const override
Convert the track shape to a closed polygon.
const VECTOR2I & GetStart() const
Definition pcb_track.h:97
virtual bool operator==(const BOARD_ITEM &aOther) const override
VECTOR2I m_Start
Line start point.
Definition pcb_track.h:249
int GetEndY() const
Definition pcb_track.h:109
wxString GetFriendlyName() const override
VECTOR2I GetPosition() const override
Definition pcb_track.h:87
virtual std::vector< int > ViewGetLayers() const override
Return the all the layers within the VIEW the object is painted on.
BITMAPS GetMenuImage() const override
Return a pointer to an image to be used in menus.
const VECTOR2I & GetEndPoint(ENDPOINT_T aEndPoint) const
Return the selected endpoint (start or end)
Definition pcb_track.h:112
bool HitTest(const VECTOR2I &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this item.
static bool ClassOf(const EDA_ITEM *aItem)
Definition pcb_track.h:63
void Flip(const VECTOR2I &aCentre, FLIP_DIRECTION aFlipDirection) override
Flip this object, i.e.
bool IsNull() const
Return true if segment length is zero.
Definition pcb_track.h:181
virtual double Similarity(const BOARD_ITEM &aOther) const override
Return a measure of how likely the other object is to represent the same object.
bool m_hasSolderMask
Definition pcb_track.h:252
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.
void SetStartX(int aX)
Definition pcb_track.h:99
const VECTOR2I & GetEnd() const
Definition pcb_track.h:94
PCB_TRACK(BOARD_ITEM *aParent, KICAD_T idtype=PCB_TRACE_T)
Definition pcb_track.cpp:65
void SetStartY(int aY)
Definition pcb_track.h:100
bool IsOnLayer(PCB_LAYER_ID aLayer) const override
Test to see if this object is on the given layer.
virtual MINOPTMAX< int > GetWidthConstraint(wxString *aSource=nullptr) const
void SetEndX(int aX)
Definition pcb_track.h:105
int GetStartX() const
Definition pcb_track.h:102
int m_width
Thickness of track (or arc) – no longer the width of a via.
Definition pcb_track.h:256
EDA_ITEM_FLAGS IsPointOnEnds(const VECTOR2I &point, int min_dist=0) const
Return STARTPOINT if point if near (dist = min_dist) start point, ENDPOINT if point if near (dist = m...
virtual void SetWidth(int aWidth)
Definition pcb_track.h:90
virtual int GetWidth() const
Definition pcb_track.h:91
void GetMsgPanelInfoBase_Common(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) const
void SetRemoveUnconnected(bool aSet)
Definition pcb_track.h:593
bool GetIsFree() const
Check if the via is a free via (as opposed to one created on a track by the router).
Definition pcb_track.h:810
int GetFrontPostMachiningSize() const
Definition pcb_track.h:693
PCB_LAYER_ID BottomLayer() const
BITMAPS GetMenuImage() const override
Return a pointer to an image to be used in menus.
PLUGGING_MODE GetFrontPluggingMode() const
VECTOR2I GetPosition() const override
Definition pcb_track.h:557
bool IsTented(PCB_LAYER_ID aLayer) const override
Checks if the given object is tented (its copper shape is covered by solder mask) on a given side of ...
void CopyFrom(const BOARD_ITEM *aOther) override
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.
PCB_LAYER_ID GetTopBackdrillLayer() const
Definition pcb_track.h:422
bool GetPrimaryDrillFilledFlag() const
Definition pcb_track.h:741
void SetFrontPostMachiningDepth(int aDepth)
Definition pcb_track.h:694
void SetCappingMode(CAPPING_MODE aMode)
void SetFrontCoveringMode(COVERING_MODE aMode)
wxString LayerMaskDescribe() const override
Return a string (to be shown to the user) describing a layer mask.
int GetBackPostMachiningDepth() const
Definition pcb_track.h:715
bool Deserialize(const google::protobuf::Any &aContainer) override
Deserializes the given protobuf message into this object.
void SetBackPostMachiningAngle(int aAngle)
Definition pcb_track.h:716
int GetBackPostMachiningAngle() const
Definition pcb_track.h:717
PCB_LAYER_ID GetTertiaryDrillEndLayer() const
Definition pcb_track.h:798
COVERING_MODE GetBackCoveringMode() const
std::optional< int > GetTertiaryDrillSize() const
bool GetRemoveUnconnected() const
Definition pcb_track.h:599
void SetTopBackdrillSize(std::optional< int > aSize)
Definition pcb_track.h:420
bool FlashLayer(int aLayer) const
Check to see whether the via should have a pad on the specific layer.
void SetKeepStartEnd(bool aSet)
Definition pcb_track.h:608
void SetBackPostMachiningMode(PAD_DRILL_POST_MACHINING_MODE aMode)
Definition pcb_track.h:702
std::optional< int > GetTopBackdrillSize() const
Definition pcb_track.h:419
void SetBackdrillMode(BACKDRILL_MODE aMode)
Definition pcb_track.h:411
void SetDrillDefault()
Set the drill value for vias to the default value UNDEFINED_DRILL_DIAMETER.
Definition pcb_track.h:770
std::map< PCB_LAYER_ID, ZONE_LAYER_OVERRIDE > m_zoneLayerOverrides
Definition pcb_track.h:847
void SetBottomBackdrillSize(std::optional< int > aSize)
Definition pcb_track.h:414
void ClearZoneLayerOverrides()
CAPPING_MODE GetCappingMode() const
const PADSTACK & Padstack() const
Definition pcb_track.h:406
void SetFrontTentingMode(TENTING_MODE aMode)
int GetDrill() const
Return the local drill setting for this PCB_VIA.
Definition pcb_track.h:758
PAD_DRILL_SHAPE GetTertiaryDrillShape() const
Definition pcb_track.h:801
bool m_isFree
"Free" vias don't get their nets auto-updated
Definition pcb_track.h:844
bool HitTest(const VECTOR2I &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this item.
int GetFrontPostMachiningDepth() const
Definition pcb_track.h:695
bool IsBlindVia() const
PAD_DRILL_SHAPE GetPrimaryDrillShape() const
Definition pcb_track.h:671
TENTING_MODE GetFrontTentingMode() const
std::optional< bool > GetPrimaryDrillCapped() const
Definition pcb_track.h:745
int GetPostMachiningKnockout(PCB_LAYER_ID aLayer) const
Get the knockout diameter for a layer affected by post-machining.
void SetBottomLayer(PCB_LAYER_ID aLayer)
void SetPrimaryDrillSize(const VECTOR2I &aSize)
Set the drill value for vias.
bool IsBackdrilledOrPostMachined(PCB_LAYER_ID aLayer) const
Check if a layer is affected by backdrilling or post-machining operations.
std::optional< int > GetSecondaryDrillSize() const
void SetPrimaryDrillCappedFlag(bool aCapped)
PADSTACK & Padstack()
Definition pcb_track.h:407
int GetSolderMaskExpansion() const
void SetSecondaryDrillStartLayer(PCB_LAYER_ID aLayer)
void SetTertiaryDrillEndLayer(PCB_LAYER_ID aLayer)
std::optional< PAD_DRILL_POST_MACHINING_MODE > GetFrontPostMachining() const
Definition pcb_track.h:680
void ClearSecondaryDrillSize()
void SetBackPostMachiningDepth(int aDepth)
Definition pcb_track.h:714
void SetDrill(int aDrill)
Definition pcb_track.h:748
PLUGGING_MODE GetBackPluggingMode() const
void SetBackPluggingMode(PLUGGING_MODE aMode)
PCB_LAYER_ID GetSecondaryDrillEndLayer() const
Definition pcb_track.h:784
MINOPTMAX< int > GetDrillConstraint(wxString *aSource=nullptr) const
void SetBackTentingMode(TENTING_MODE aMode)
PAD_DRILL_SHAPE GetSecondaryDrillShape() const
Definition pcb_track.h:787
void SetIsFree(bool aFree=true)
Definition pcb_track.h:811
std::optional< bool > GetPrimaryDrillFilled() const
Definition pcb_track.h:740
void SetFrontPluggingMode(PLUGGING_MODE aMode)
PCB_LAYER_ID GetPrimaryDrillStartLayer() const
Definition pcb_track.h:674
void Flip(const VECTOR2I &aCentre, FLIP_DIRECTION aFlipDirection) override
Flip this object, i.e.
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.
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
void SetFrontPostMachining(const std::optional< PAD_DRILL_POST_MACHINING_MODE > &aMode)
bool operator==(const PCB_VIA &aOther) const
PCB_LAYER_ID GetLayer() const override
Return the primary layer this item is on.
void SetSecondaryDrillEndLayer(PCB_LAYER_ID aLayer)
int GetFrontPostMachiningAngle() const
Definition pcb_track.h:697
std::mutex m_zoneLayerOverridesMutex
Definition pcb_track.h:846
PCB_LAYER_ID GetPrimaryDrillEndLayer() const
Definition pcb_track.h:677
void SetFrontPostMachiningAngle(int aAngle)
Definition pcb_track.h:696
void SetTopLayer(PCB_LAYER_ID aLayer)
FILLING_MODE GetFillingMode() const
void SetPosition(const VECTOR2I &aPoint) override
Definition pcb_track.h:558
bool IsBuriedVia() const
std::shared_ptr< SHAPE_SEGMENT > GetEffectiveHoleShape() const override
int GetFrontWidth() const
Definition pcb_track.h:474
void SetLayerPair(PCB_LAYER_ID aTopLayer, PCB_LAYER_ID aBottomLayer)
For a via m_layer contains the top layer, the other layer is in m_bottomLayer/.
bool HasDrilledHole() const override
Definition pcb_track.h:481
PAD_DRILL_POST_MACHINING_MODE GetFrontPostMachiningMode() const
Definition pcb_track.h:687
void SetFrontPostMachiningSize(int aSize)
Definition pcb_track.h:692
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider, bool aFull) const override
Return a user-visible description string of this item.
bool IsType(const std::vector< KICAD_T > &aScanTypes) const override
Check whether the item is one of the listed types.
Definition pcb_track.h:373
double Similarity(const BOARD_ITEM &aOther) const override
Return a measure of how likely the other object is to represent the same object.
void SetLayer(PCB_LAYER_ID aLayer) override
Set the layer this item is on.
void SetTertiaryDrillStartLayer(PCB_LAYER_ID aLayer)
PCB_LAYER_ID GetBottomBackdrillLayer() const
Definition pcb_track.h:416
void SetPrimaryDrillShape(PAD_DRILL_SHAPE aShape)
static std::optional< VIA_PARAMETER_ERROR > ValidateViaParameters(std::optional< int > aDiameter, std::optional< int > aPrimaryDrill, std::optional< PCB_LAYER_ID > aPrimaryStartLayer=std::nullopt, std::optional< PCB_LAYER_ID > aPrimaryEndLayer=std::nullopt, std::optional< int > aSecondaryDrill=std::nullopt, std::optional< PCB_LAYER_ID > aSecondaryStartLayer=std::nullopt, std::optional< PCB_LAYER_ID > aSecondaryEndLayer=std::nullopt, std::optional< int > aTertiaryDrill=std::nullopt, std::optional< PCB_LAYER_ID > aTertiaryStartLayer=std::nullopt, std::optional< PCB_LAYER_ID > aTertiaryEndLayer=std::nullopt, int aCopperLayerCount=0)
bool IsMicroVia() const
void SetTertiaryDrillShape(PAD_DRILL_SHAPE aShape)
bool GetKeepStartEnd() const
Definition pcb_track.h:614
virtual void SetLayerSet(const LSET &aLayers) override
Note SetLayerSet() initialize the first and last copper layers connected by the via.
void GetOutermostConnectedLayers(PCB_LAYER_ID *aTopmost, PCB_LAYER_ID *aBottommost) const
Return the top-most and bottom-most connected layers.
static bool ClassOf(const EDA_ITEM *aItem)
Definition pcb_track.h:363
void SetSecondaryDrillShape(PAD_DRILL_SHAPE aShape)
bool HasHole() const override
Definition pcb_track.h:476
void SanitizeLayers()
Check so that the layers are correct depending on the type of via, and so that the top actually is on...
int GetWidth() const override
void SetBackPostMachining(const std::optional< PAD_DRILL_POST_MACHINING_MODE > &aMode)
PCB_LAYER_ID GetTertiaryDrillStartLayer() const
Definition pcb_track.h:795
PCB_VIA & operator=(const PCB_VIA &aOther)
void swapData(BOARD_ITEM *aImage) override
wxString GetClass() const override
Return the class name.
Definition pcb_track.h:565
const VECTOR2I & GetPrimaryDrillSize() const
Definition pcb_track.h:668
void Serialize(google::protobuf::Any &aContainer) const override
Serializes this object to the given Any message.
void SetFillingMode(FILLING_MODE aMode)
PCB_VIA(BOARD_ITEM *aParent)
void SetPrimaryDrillFilledFlag(bool aFilled)
std::optional< int > GetBottomBackdrillSize() const
Definition pcb_track.h:413
bool ConditionallyFlashed(PCB_LAYER_ID aLayer) const
Definition pcb_track.h:619
std::vector< int > ViewGetLayers() const override
Return the all the layers within the VIEW the object is painted on.
void SetViaType(VIATYPE aViaType)
Definition pcb_track.h:399
int GetMinAnnulus(PCB_LAYER_ID aLayer, wxString *aSource) const
bool IsOnLayer(PCB_LAYER_ID aLayer) const override
Test to see if this object is on the given layer.
TENTING_MODE GetBackTentingMode() const
PCB_LAYER_ID TopLayer() const
void ClearTertiaryDrillSize()
VIATYPE m_viaType
through, blind/buried or micro
Definition pcb_track.h:840
void SetBottomBackdrillLayer(PCB_LAYER_ID aLayer)
Definition pcb_track.h:417
int GetBackPostMachiningSize() const
Definition pcb_track.h:713
void SetTertiaryDrillSize(const VECTOR2I &aSize)
PADSTACK m_padStack
Definition pcb_track.h:842
void SetSecondaryDrillSize(const VECTOR2I &aSize)
COVERING_MODE GetFrontCoveringMode() const
int GetDrillValue() const
Calculate the drill value for vias (m_drill if > 0, or default drill value for the board).
void SetZoneLayerOverride(PCB_LAYER_ID aLayer, ZONE_LAYER_OVERRIDE aOverride)
PAD_DRILL_POST_MACHINING_MODE GetBackPostMachiningMode() const
Definition pcb_track.h:707
void SetFrontWidth(int aWidth)
Definition pcb_track.h:473
VIATYPE GetViaType() const
Definition pcb_track.h:398
PCB_LAYER_ID GetSecondaryDrillStartLayer() const
Definition pcb_track.h:781
double ViewGetLOD(int aLayer, const KIGFX::VIEW *aView) const override
Return the level of detail (LOD) of the item.
void SetPrimaryDrillCapped(const std::optional< bool > &aCapped)
MINOPTMAX< int > GetWidthConstraint(wxString *aSource=nullptr) const override
BACKDRILL_MODE GetBackdrillMode() const
Definition pcb_track.h:410
void SetWidth(int aWidth) override
std::optional< PAD_DRILL_POST_MACHINING_MODE > GetBackPostMachining() const
Definition pcb_track.h:700
void SetBackCoveringMode(COVERING_MODE aMode)
virtual LSET GetLayerSet() const override
Return a std::bitset of all layers on which the item physically resides.
void SetPrimaryDrillFilled(const std::optional< bool > &aFilled)
void SetTopBackdrillLayer(PCB_LAYER_ID aLayer)
Definition pcb_track.h:423
const ZONE_LAYER_OVERRIDE & GetZoneLayerOverride(PCB_LAYER_ID aLayer) const
void LayerPair(PCB_LAYER_ID *top_layer, PCB_LAYER_ID *bottom_layer) const
Return the 2 layers used by the via (the via actually uses all layers between these 2 layers)
bool HasValidLayerPair(int aCopperLayerCount)
void SetPadstack(const PADSTACK &aPadstack)
Definition pcb_track.h:408
void SetFrontPostMachiningMode(PAD_DRILL_POST_MACHINING_MODE aMode)
Definition pcb_track.h:682
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
bool GetPrimaryDrillCappedFlag() const
Definition pcb_track.h:746
void SetBackPostMachiningSize(int aSize)
Definition pcb_track.h:712
void SetPrimaryDrillEndLayer(PCB_LAYER_ID aLayer)
void SetPrimaryDrillStartLayer(PCB_LAYER_ID aLayer)
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.
INSPECT_RESULT
Definition eda_item.h:45
const INSPECTOR_FUNC & INSPECTOR
std::function passed to nested users by ref, avoids copying std::function.
Definition eda_item.h:92
std::uint32_t EDA_ITEM_FLAGS
FLASHING
Enum used during connectivity building to ensure we do not query connectivity while building the data...
Definition layer_ids.h:184
@ DEFAULT
Flashing follows connectivity.
Definition layer_ids.h:185
PCB_LAYER_ID
A quick note on layer IDs:
Definition layer_ids.h:60
@ UNDEFINED_LAYER
Definition layer_ids.h:61
@ F_Cu
Definition layer_ids.h:64
FLIP_DIRECTION
Definition mirror.h:27
EDA_ANGLE abs(const EDA_ANGLE &aAngle)
Definition eda_angle.h:400
PAD_DRILL_POST_MACHINING_MODE
Definition padstack.h:76
PAD_DRILL_SHAPE
The set of pad drill shapes, used with PAD::{Set,Get}DrillShape()
Definition padstack.h:69
BACKDRILL_MODE
Definition padstack.h:84
Declarations of types for tracks and vias.
FILLING_MODE
VIATYPE
TENTING_MODE
COVERING_MODE
ENDPOINT_T
@ ENDPOINT_START
PLUGGING_MODE
#define UNDEFINED_DRILL_DIAMETER
CAPPING_MODE
bool operator()(const PCB_TRACK *aFirst, const PCB_TRACK *aSecond) const
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
Definition typeinfo.h:78
@ PCB_VIA_T
class PCB_VIA, a via (like a track segment on a copper layer)
Definition typeinfo.h:97
@ PCB_LOCATE_BLINDVIA_T
Definition typeinfo.h:128
@ PCB_LOCATE_STDVIA_T
Definition typeinfo.h:126
@ PCB_LOCATE_BURIEDVIA_T
Definition typeinfo.h:129
@ PCB_ARC_T
class PCB_ARC, an arc track segment on a copper layer
Definition typeinfo.h:98
@ PCB_LOCATE_UVIA_T
Definition typeinfo.h:127
@ PCB_TRACE_T
class PCB_TRACK, a track segment (segment on a copper layer)
Definition typeinfo.h:96
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:695