KiCad PCB EDA Suite
Loading...
Searching...
No Matches
zone.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) 2019 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 ZONE_H
22#define ZONE_H
23
24
25#include <atomic>
26#include <mutex>
27#include <vector>
28#include <map>
29#include <board_item.h>
31#include <layer_ids.h>
32#include <lset.h>
34#include <zone_settings.h>
36
37
38class LINE_READER;
39class PCB_EDIT_FRAME;
40class BOARD;
41class ZONE;
42class MSG_PANEL_ITEM;
43
44
57{
58 std::vector<int> m_IsolatedOutlines;
60};
61
62
70{
71public:
72 ZONE( BOARD_ITEM_CONTAINER* parent );
73
74 ZONE( const ZONE& aZone );
75 ZONE& operator=( const ZONE &aOther );
76
77 ~ZONE();
78
79 void CopyFrom( const BOARD_ITEM* aOther ) override;
80
81 static inline bool ClassOf( const EDA_ITEM* aItem )
82 {
83 return aItem && aItem->Type() == PCB_ZONE_T;
84 }
85
86 void Serialize( google::protobuf::Any &aContainer ) const override;
87 bool Deserialize( const google::protobuf::Any &aContainer ) override;
88
92 bool IsConnected() const override
93 {
94 return !GetIsRuleArea();
95 }
96
100 void InitDataFromSrcInCopyCtor( const ZONE& aZone, PCB_LAYER_ID aLayer = UNDEFINED_LAYER );
101
106 bool IsConflicting() const;
107
111 VECTOR2I GetPosition() const override;
112 void SetPosition( const VECTOR2I& aPos ) override {}
113
117 void SetAssignedPriority( unsigned aPriority ) { m_priority = aPriority; }
118
122 unsigned GetAssignedPriority() const { return m_priority; }
123
124 bool HigherPriority( const ZONE* aOther ) const;
125
126 bool SameNet( const ZONE* aOther ) const;
127
128 void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList ) override;
129 wxString GetFriendlyName() const override;
130
131 void SetLayerSet( const LSET& aLayerSet ) override;
132
133 virtual LSET GetLayerSet() const override
134 {
135 std::lock_guard<std::mutex> lock( m_layerSetMutex );
136 return m_layerSet;
137 }
138
144 void SetLayerSetAndRemoveUnusedFills( const LSET& aLayerSet );
145
147 {
148 return m_layerProperties[aLayer];
149 }
150
151 std::map<PCB_LAYER_ID, ZONE_LAYER_PROPERTIES>& LayerProperties() { return m_layerProperties; }
152
153 const std::map<PCB_LAYER_ID, ZONE_LAYER_PROPERTIES>& LayerProperties() const
154 {
155 return m_layerProperties;
156 }
157
158 void SetLayerProperties( const std::map<PCB_LAYER_ID, ZONE_LAYER_PROPERTIES>& aOther );
159
160 const wxString& GetZoneName() const { return m_zoneName; }
161 void SetZoneName( const wxString& aName ) { m_zoneName = aName; }
162
163 bool Matches( const EDA_SEARCH_DATA& aSearchData, void* aAuxData ) const override
164 {
165 return BOARD_ITEM::Matches( GetZoneName(), aSearchData );
166 }
167
171 const BOX2I GetBoundingBox() const override;
172
177 void CacheBoundingBox();
178
182 std::optional<int> GetLocalClearance() const override;
183 void SetLocalClearance( std::optional<int> aClearance ) { m_ZoneClearance = aClearance.value_or( 0 ); };
184
191 std::optional<int> GetLocalClearance( wxString* aSource ) const override
192 {
193 if( m_isRuleArea )
194 return std::optional<int>();
195
196 if( aSource )
197 *aSource = _( "zone" );
198
199 return GetLocalClearance();
200 }
201
205 bool IsOnCopperLayer() const override;
206
207 virtual void SetLayer( PCB_LAYER_ID aLayer ) override;
208
215 bool SetNetCode( int aNetCode, bool aNoAssert ) override;
217
223 void SetNet( NETINFO_ITEM* aNetInfo ) override;
224
225 virtual PCB_LAYER_ID GetLayer() const override;
226
227 // Return the first layer in GUI sequence.
229
230 virtual bool IsOnLayer( PCB_LAYER_ID ) const override;
231
232 virtual std::vector<int> ViewGetLayers() const override;
233
234 double ViewGetLOD( int aLayer, const KIGFX::VIEW* aView ) const override;
235
236 void SetFillMode( ZONE_FILL_MODE aFillMode );
237
239
240 void SetThermalReliefGap( int aThermalReliefGap )
241 {
242 if( m_thermalReliefGap != aThermalReliefGap )
243 SetNeedRefill( true );
244
245 m_thermalReliefGap = aThermalReliefGap;
246 }
247
249 int GetThermalReliefGap( PAD* aPad, wxString* aSource = nullptr ) const;
250
251 void SetThermalReliefSpokeWidth( int aThermalReliefSpokeWidth )
252 {
253 if( m_thermalReliefSpokeWidth != aThermalReliefSpokeWidth )
254 SetNeedRefill( true );
255
256 m_thermalReliefSpokeWidth = aThermalReliefSpokeWidth;
257 }
258
260
266 double CalculateFilledArea();
267
272 double CalculateOutlineArea();
273
280 {
281 return m_area;
282 }
283
290 {
291 return m_outlinearea;
292 }
293
295 {
296 std::lock_guard<std::mutex> lock( m_fillFlagsMutex );
297 return m_fillFlags.test( aLayer );
298 }
299
300 void SetFillFlag( PCB_LAYER_ID aLayer, bool aFlag )
301 {
302 std::lock_guard<std::mutex> lock( m_fillFlagsMutex );
303 m_fillFlags.set( aLayer, aFlag );
304 }
305
306 bool IsFilled() const { return m_isFilled; }
307 void SetIsFilled( bool isFilled ) { m_isFilled = isFilled; }
308
309 bool NeedRefill() const { return m_needRefill; }
310 void SetNeedRefill( bool aNeedRefill ) { m_needRefill = aNeedRefill; }
311
313 void SetPadConnection( ZONE_CONNECTION aPadConnection ) { m_PadConnection = aPadConnection; }
314
315 int GetMinThickness() const { return m_ZoneMinThickness; }
316 void SetMinThickness( int aMinThickness )
317 {
318 m_ZoneMinThickness = aMinThickness;
319 m_hatchThickness = std::max( m_hatchThickness, aMinThickness );
320 m_hatchGap = std::max( m_hatchGap, aMinThickness );
321 m_thievingSettings.line_width = std::max( m_thievingSettings.line_width, aMinThickness );
322 SetNeedRefill( true );
323 }
324
325 int GetHatchThickness() const { return m_hatchThickness; }
326 void SetHatchThickness( int aThickness ) { m_hatchThickness = aThickness; }
327
328 int GetHatchGap() const { return m_hatchGap; }
329 void SetHatchGap( int aStep ) { m_hatchGap = aStep; }
330
332 void SetHatchOrientation( const EDA_ANGLE& aStep ) { m_hatchOrientation = aStep; }
333
335 void SetHatchSmoothingLevel( int aLevel ) { m_hatchSmoothingLevel = aLevel; }
336
338 void SetHatchSmoothingValue( double aValue ) { m_hatchSmoothingValue = aValue; }
339
340 double GetHatchHoleMinArea() const { return m_hatchHoleMinArea; }
341 void SetHatchHoleMinArea( double aPct ) { m_hatchHoleMinArea = aPct; }
342
344 void SetHatchBorderAlgorithm( int aAlgo ) { m_hatchBorderAlgorithm = aAlgo; }
345
350
352 void SetThievingSettings( const THIEVING_SETTINGS& aSettings )
353 {
354 if( m_thievingSettings != aSettings )
355 SetNeedRefill( true );
356
357 m_thievingSettings = aSettings;
358 }
359
362 {
363 if( m_thievingSettings.pattern != aPattern )
364 SetNeedRefill( true );
365
366 m_thievingSettings.pattern = aPattern;
367 }
368
369 int GetThievingElementSize() const { return m_thievingSettings.element_size; }
370 void SetThievingElementSize( int aSize )
371 {
372 if( m_thievingSettings.element_size != aSize )
373 SetNeedRefill( true );
374
375 m_thievingSettings.element_size = aSize;
376 }
377
378 int GetThievingGap() const { return m_thievingSettings.gap; }
379 void SetThievingGap( int aGap )
380 {
381 if( m_thievingSettings.gap != aGap )
382 SetNeedRefill( true );
383
384 m_thievingSettings.gap = aGap;
385 }
386
387 int GetThievingLineWidth() const { return m_thievingSettings.line_width; }
388 void SetThievingLineWidth( int aWidth )
389 {
390 if( m_thievingSettings.line_width != aWidth )
391 SetNeedRefill( true );
392
393 m_thievingSettings.line_width = aWidth;
394 }
395
396 bool GetThievingStagger() const { return m_thievingSettings.stagger; }
397 void SetThievingStagger( bool aStagger )
398 {
399 if( m_thievingSettings.stagger != aStagger )
400 SetNeedRefill( true );
401
402 m_thievingSettings.stagger = aStagger;
403 }
404
406 void SetThievingOrientation( const EDA_ANGLE& aOrientation )
407 {
408 if( m_thievingSettings.orientation != aOrientation )
409 SetNeedRefill( true );
410
411 m_thievingSettings.orientation = aOrientation;
412 }
413
415 int GetLocalFlags() const { return m_localFlgs; }
416 void SetLocalFlags( int aFlags ) { m_localFlgs = aFlags; }
417
419 const SHAPE_POLY_SET* Outline() const { return m_Poly; }
420
421 void SetOutline( SHAPE_POLY_SET* aOutline ) { m_Poly = aOutline; }
422
424
426
427 // @copydoc BOARD_ITEM::GetEffectiveShape
428 virtual std::shared_ptr<SHAPE>
430 FLASHING aFlash = FLASHING::DEFAULT ) const override;
431
438 bool HitTest( const VECTOR2I& aPosition, int aAccuracy = 0 ) const override;
439
448 bool HitTestFilledArea( PCB_LAYER_ID aLayer, const VECTOR2I& aRefPos, int aAccuracy = 0 ) const;
449
458 bool HitTestCutout( const VECTOR2I& aRefPos, int* aOutlineIdx = nullptr,
459 int* aHoleIdx = nullptr ) const;
460
466 void GetInteractingZones( PCB_LAYER_ID aLayer, std::vector<ZONE*>* aSameNetCollidingZones,
467 std::vector<ZONE*>* aOtherNetIntersectingZones ) const;
468
480
492 void TransformSmoothedOutlineToPolygon( SHAPE_POLY_SET& aBuffer, int aClearance,
493 int aError, ERROR_LOC aErrorLoc,
494 SHAPE_POLY_SET* aBoardOutline ) const;
495
509 int aClearance, int aError, ERROR_LOC aErrorLoc,
510 bool ignoreLineWidth = false ) const override;
511
522 bool HitTestForCorner( const VECTOR2I& refPos, int aAccuracy,
523 SHAPE_POLY_SET::VERTEX_INDEX* aCornerHit = nullptr ) const;
524
534 bool HitTestForEdge( const VECTOR2I& refPos, int aAccuracy,
535 SHAPE_POLY_SET::VERTEX_INDEX* aCornerHit = nullptr ) const;
536
540 bool HitTest( const BOX2I& aRect, bool aContained = true, int aAccuracy = 0 ) const override;
541
545 bool HitTest( const SHAPE_LINE_CHAIN& aPoly, bool aContained ) const override;
546
552 bool UnFill();
553
554 /* Geometric transformations: */
555
561 void Move( const VECTOR2I& offset ) override;
562
569 void MoveEdge( const VECTOR2I& offset, int aEdge );
570
576 void Rotate( const VECTOR2I& aCentre, const EDA_ANGLE& aAngle ) override;
577
585 virtual void Flip( const VECTOR2I& aCentre, FLIP_DIRECTION aFlipDirection ) override;
586
587 void OnFootprintRescaled( double aRatioX, double aRatioY, double aLinearFactor, const VECTOR2I& aAnchor,
588 const EDA_ANGLE& aParentRotate ) override;
589
591 {
592 SetNeedRefill( true );
593 UnFill();
594 }
595
602 void Mirror( const VECTOR2I& aMirrorRef, FLIP_DIRECTION aFlipDirection ) override;
603
607 wxString GetClass() const override
608 {
609 return wxT( "ZONE" );
610 }
611
615 int GetNumCorners( void ) const
616 {
617 return m_Poly->TotalVertices();
618 }
619
626 {
627 return m_Poly->Iterate();
628 }
629
636 {
637 return m_Poly->IterateWithHoles();
638 }
639
646 {
647 return m_Poly->CIterateWithHoles();
648 }
649
650 void RemoveAllContours( void )
651 {
652 m_Poly->RemoveAllContours();
653 }
654
655 const VECTOR2I& GetCornerPosition( int aCornerIndex ) const
656 {
658
659 // Convert global to relative indices
660 if( !m_Poly->GetRelativeIndices( aCornerIndex, &index ) )
661 throw( std::out_of_range( "aCornerIndex-th vertex does not exist" ) );
662
663 return m_Poly->CVertex( index );
664 }
665
669 void NewHole()
670 {
671 m_Poly->NewHole();
672 }
673
683 bool AppendCorner( VECTOR2I aPosition, int aHoleIdx, bool aAllowDuplication = false );
684
687
689 {
690 std::lock_guard<std::mutex> lock( m_filledPolysListMutex );
691 return m_FilledPolysList.count( aLayer ) > 0;
692 }
693
697 std::shared_ptr<SHAPE_POLY_SET> GetFilledPolysList( PCB_LAYER_ID aLayer ) const
698 {
699 std::lock_guard<std::mutex> lock( m_filledPolysListMutex );
700 wxASSERT( m_FilledPolysList.count( aLayer ) );
701 return m_FilledPolysList.at( aLayer );
702 }
703
705 {
706 std::lock_guard<std::mutex> lock( m_filledPolysListMutex );
707
708 auto it = m_FilledPolysList.find( aLayer );
709
710 if( it == m_FilledPolysList.end() )
711 return nullptr;
712
713 return it->second.get();
714 }
715
721 const SHAPE_POLY_SET::TASK_SUBMITTER& aSubmitter = {} );
722
726 void SetFilledPolysList( PCB_LAYER_ID aLayer, const SHAPE_POLY_SET& aPolysList )
727 {
728 std::lock_guard<std::mutex> lock( m_filledPolysListMutex );
729 m_FilledPolysList[aLayer] = std::make_shared<SHAPE_POLY_SET>( aPolysList );
730 }
731
739 bool IsIsland( PCB_LAYER_ID aLayer, int aPolyIdx ) const;
740
741 void SetIsIsland( PCB_LAYER_ID aLayer, int aPolyIdx )
742 {
743 m_insulatedIslands[aLayer].insert( aPolyIdx );
744 }
745
746 bool BuildSmoothedPoly( SHAPE_POLY_SET& aSmoothedPoly, PCB_LAYER_ID aLayer,
747 SHAPE_POLY_SET* aBoardOutline,
748 SHAPE_POLY_SET* aSmoothedPolyWithApron = nullptr ) const;
749
750 void SetCornerSmoothingType( int aType ) { m_cornerSmoothingType = aType; };
751
753
754 void SetCornerRadius( unsigned int aRadius );
755
756 unsigned int GetCornerRadius() const { return m_cornerRadius; }
757
764 void RemoveCutout( int aOutlineIdx, int aHoleIdx );
765
772 void AddPolygon( std::vector<VECTOR2I>& aPolygon );
773
774 void AddPolygon( const SHAPE_LINE_CHAIN& aPolygon );
775
776 wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider, bool aFull ) const override;
777
778 BITMAPS GetMenuImage() const override;
779
780 EDA_ITEM* Clone() const override;
781 ZONE* Clone( PCB_LAYER_ID aLayer ) const;
782
787
793
798
807
811 bool GetIsRuleArea() const { return m_isRuleArea; }
812 void SetIsRuleArea( bool aEnable ) { m_isRuleArea = aEnable; }
814 void SetPlacementAreaEnabled( bool aEnabled ) { m_placementAreaEnabled = aEnabled; }
815
817 void SetPlacementAreaSource( const wxString& aSource ) { m_placementAreaSource = aSource; }
820
822 bool GetDoNotAllowVias() const { return m_doNotAllowVias; }
824 bool GetDoNotAllowPads() const { return m_doNotAllowPads; }
826
827 void SetDoNotAllowZoneFills( bool aEnable ) { m_doNotAllowZoneFills = aEnable; }
828 void SetDoNotAllowVias( bool aEnable ) { m_doNotAllowVias = aEnable; }
829 void SetDoNotAllowTracks( bool aEnable ) { m_doNotAllowTracks = aEnable; }
830 void SetDoNotAllowPads( bool aEnable ) { m_doNotAllowPads = aEnable; }
831 void SetDoNotAllowFootprints( bool aEnable ) { m_doNotAllowFootprints = aEnable; }
832
835
836 long long int GetMinIslandArea() const { return m_minIslandArea; }
837 void SetMinIslandArea( long long int aArea ) { m_minIslandArea = aArea; }
838
842
847 void SetBorderHatchPitch( int aPitch ) { m_borderHatchPitch = aPitch; }
848
852 static int GetDefaultHatchPitch();
853
863 void SetBorderDisplayStyle( ZONE_BORDER_DISPLAY_STYLE aBorderHatchStyle, int aBorderHatchPitch,
864 bool aRebuilBorderdHatch );
865
869 void UnHatchBorder();
870
875 void HatchBorder();
876
877 std::vector<SEG> GetHatchLines() const;
878
883 void BuildHashValue( PCB_LAYER_ID aLayer );
884
889
890 double Similarity( const BOARD_ITEM& aOther ) const override;
891
892 bool operator==( const ZONE& aOther ) const;
893 bool operator==( const BOARD_ITEM& aOther ) const override;
894
895#if defined(DEBUG)
896 virtual void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
897
898 void SetFillPoly( PCB_LAYER_ID aLayer, SHAPE_POLY_SET* aPoly )
899 {
900 {
901 std::lock_guard<std::mutex> lock( m_filledPolysListMutex );
902 m_FilledPolysList[ aLayer ] = std::make_shared<SHAPE_POLY_SET>( *aPoly );
903 }
904
905 SetFillFlag( aLayer, true );
906 }
907
908#endif
909
910private:
916 bool unFillLocked();
917
918protected:
919 virtual void swapData( BOARD_ITEM* aImage ) override;
920
921protected:
924 unsigned int m_cornerRadius;
925
927 wxString m_zoneName;
928
929 mutable std::mutex m_layerSetMutex;
931
932 std::map<PCB_LAYER_ID, ZONE_LAYER_PROPERTIES> m_layerProperties;
933
934 /* Priority: when a zone outline is inside and other zone, if its priority is higher
935 * the other zone priority, it will be created inside.
936 * if priorities are equal, a DRC error is set
937 */
938 unsigned m_priority;
939
940 /* A zone outline can be a keepout zone.
941 * It will be never filled, and DRC should test for pads, tracks and vias
942 */
944
951
952 /* A zone outline can be a teardrop zone with different rules for priority
953 * (always bigger priority than copper zones) and never removed from a
954 * copper zone having the same netcode
955 */
957
958 /* For keepout zones only:
959 * what is not allowed inside the keepout ( pads, tracks and vias )
960 */
966
968 int m_ZoneClearance; // Clearance value in internal units.
969 int m_ZoneMinThickness; // Minimum thickness value in filled areas.
970 int m_fillVersion; // See BOARD_DESIGN_SETTINGS for version
971 // differences.
973
978 long long int m_minIslandArea;
979
982
988 std::atomic<bool> m_needRefill;
989
990 int m_thermalReliefGap; // Width of the gap in thermal reliefs.
991 int m_thermalReliefSpokeWidth; // Width of the copper bridge in thermal reliefs.
992
993 ZONE_FILL_MODE m_fillMode; // fill with POLYGONS vs HATCH_PATTERN
994 int m_hatchThickness; // thickness of lines (if 0 -> solid shape)
995 int m_hatchGap; // gap between lines (0 -> solid shape
996 EDA_ANGLE m_hatchOrientation; // orientation of grid lines
997 int m_hatchSmoothingLevel; // 0 = no smoothing
998 // 1 = fillet
999 // 2 = arc low def
1000 // 3 = arc high def
1001 double m_hatchSmoothingValue; // hole chamfer/fillet size (ratio of hole size)
1002 double m_hatchHoleMinArea; // min size before holes are dropped (ratio)
1003 int m_hatchBorderAlgorithm; // 0 = use min zone thickness
1004 // 1 = use hatch thickness
1005
1006 THIEVING_SETTINGS m_thievingSettings; // valid when m_fillMode == COPPER_THIEVING
1007
1008 int m_localFlgs; // Variable used in polygon calculations.
1009
1010 /* set of filled polygons used to draw a zone as a filled area.
1011 * from outlines (m_Poly) but unlike m_Poly these filled polygons have no hole
1012 * (they are all in one piece) In very simple cases m_FilledPolysList is same
1013 * as m_Poly. In less simple cases (when m_Poly has holes) m_FilledPolysList is
1014 * a polygon equivalent to m_Poly, without holes but with extra outline segment
1015 * connecting "holes" with external main outline. In complex cases an outline
1016 * described by m_Poly can have many filled areas
1017 */
1018 mutable std::mutex m_filledPolysListMutex;
1019 std::map<PCB_LAYER_ID, std::shared_ptr<SHAPE_POLY_SET>> m_FilledPolysList;
1020
1022 mutable std::mutex m_fillFlagsMutex;
1024
1026 std::map<PCB_LAYER_ID, HASH_128> m_filledPolysHash;
1027
1028 ZONE_BORDER_DISPLAY_STYLE m_borderStyle; // border display style, see enum above
1029 int m_borderHatchPitch; // for DIAGONAL_EDGE, distance between 2 lines
1030 std::vector<SEG> m_borderHatchLines; // hatch lines
1031
1033 std::map<PCB_LAYER_ID, std::set<int>> m_insulatedIslands;
1034
1035 double m_area; // The filled zone area
1036 double m_outlinearea; // The outline zone area
1037
1038};
1039
1040
1046
1047#endif // ZONE_H
int index
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:918
virtual bool SetNetCode(int aNetCode, bool aNoAssert)
Set net using a net code.
BOARD_CONNECTED_ITEM(BOARD_ITEM *aParent, KICAD_T idtype)
Abstract interface for BOARD_ITEMs capable of storing other items inside.
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Definition board_item.h:81
BOARD_ITEM(BOARD_ITEM *aParent, KICAD_T idtype, PCB_LAYER_ID aLayer=F_Cu)
Definition board_item.h:83
Information pertinent to a Pcbnew printed circuit board.
Definition board.h:372
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:96
KICAD_T Type() const
Returns the type of object.
Definition eda_item.h:108
virtual bool Matches(const EDA_SEARCH_DATA &aSearchData, void *aAuxData) const
Compare the item against the search criteria in aSearchData.
Definition eda_item.h:416
EDA_ITEM(EDA_ITEM *parent, KICAD_T idType, bool isSCH_ITEM=false, bool isBOARD_ITEM=false)
Definition eda_item.cpp:37
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
Definition view.h:63
An abstract class from which implementation specific LINE_READERs may be derived to read single lines...
Definition richio.h:62
LSET is a set of PCB_LAYER_IDs.
Definition lset.h:37
EDA_MSG_PANEL items for displaying messages.
Definition msgpanel.h:50
Handle the data for a net.
Definition netinfo.h:46
Definition pad.h:61
The main frame for Pcbnew.
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.
ITERATOR_TEMPLATE< VECTOR2I > ITERATOR
ITERATOR_TEMPLATE< const VECTOR2I > CONST_ITERATOR
std::function< void(std::function< void()>)> TASK_SUBMITTER
Callback that submits a unit of work for asynchronous execution.
Handle a list of polygons defining a copper zone.
Definition zone.h:70
void SetHatchThickness(int aThickness)
Definition zone.h:326
void CacheTriangulation(PCB_LAYER_ID aLayer=UNDEFINED_LAYER, const SHAPE_POLY_SET::TASK_SUBMITTER &aSubmitter={})
Create a list of triangles that "fill" the solid areas used for instance to draw these solid areas on...
Definition zone.cpp:1555
void SetNeedRefill(bool aNeedRefill)
Definition zone.h:310
double GetOutlineArea()
This area is cached from the most recent call to CalculateOutlineArea().
Definition zone.h:289
bool HitTest(const VECTOR2I &aPosition, int aAccuracy=0) const override
Test if a point is near an outline edge or a corner of this zone.
Definition zone.cpp:851
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider, bool aFull) const override
Return a user-visible description string of this item.
Definition zone.cpp:1387
void SetHatchBorderAlgorithm(int aAlgo)
Definition zone.h:344
int m_borderHatchPitch
Definition zone.h:1029
wxString m_placementAreaSource
Definition zone.h:950
const SHAPE_POLY_SET * Outline() const
Definition zone.h:419
bool m_isRuleArea
Definition zone.h:943
void SetDoNotAllowPads(bool aEnable)
Definition zone.h:830
void SetLayerProperties(const std::map< PCB_LAYER_ID, ZONE_LAYER_PROPERTIES > &aOther)
Definition zone.cpp:666
int GetHatchBorderAlgorithm() const
Definition zone.h:343
ZONE & operator=(const ZONE &aOther)
Definition zone.cpp:101
int m_cornerSmoothingType
Definition zone.h:923
bool GetIsRuleArea() const
Accessors to parameters used in Rule Area zones:
Definition zone.h:811
PLACEMENT_SOURCE_T m_placementAreaSourceType
Definition zone.h:949
std::optional< int > GetLocalClearance() const override
Definition zone.cpp:973
const THIEVING_SETTINGS & GetThievingSettings() const
Definition zone.h:351
void SetLocalClearance(std::optional< int > aClearance)
Definition zone.h:183
bool m_doNotAllowVias
Definition zone.h:962
bool UnFill()
Removes the zone filling.
Definition zone.cpp:487
bool NeedRefill() const
Definition zone.h:309
bool GetDoNotAllowVias() const
Definition zone.h:822
void TransformSolidAreasShapesToPolygon(PCB_LAYER_ID aLayer, SHAPE_POLY_SET &aBuffer) const
Convert solid areas full shapes to polygon set (the full shape is the polygon area with a thick outli...
Definition zone.cpp:1894
void SetCornerRadius(unsigned int aRadius)
Definition zone.cpp:797
ZONE_FILL_MODE m_fillMode
Definition zone.h:993
THIEVING_SETTINGS m_thievingSettings
Definition zone.h:1006
void SetPosition(const VECTOR2I &aPos) override
Definition zone.h:112
bool m_doNotAllowFootprints
Definition zone.h:965
bool unFillLocked()
Internal implementation of UnFill() that assumes the caller already holds m_filledPolysListMutex.
Definition zone.cpp:495
int m_ZoneMinThickness
Definition zone.h:969
int GetThievingLineWidth() const
Definition zone.h:387
void AddPolygon(std::vector< VECTOR2I > &aPolygon)
Add a polygon to the zone outline.
Definition zone.cpp:1350
ZONE_LAYER_PROPERTIES & LayerProperties(PCB_LAYER_ID aLayer)
Definition zone.h:146
double m_hatchSmoothingValue
Definition zone.h:1001
void SetLocalFlags(int aFlags)
Definition zone.h:416
void TransformSmoothedOutlineToPolygon(SHAPE_POLY_SET &aBuffer, int aClearance, int aError, ERROR_LOC aErrorLoc, SHAPE_POLY_SET *aBoardOutline) const
Convert the outlines shape to a polygon with no holes inflated (optional) by max( aClearanceValue,...
Definition zone.cpp:1816
void SetCornerSmoothingType(int aType)
Definition zone.h:750
int m_thermalReliefSpokeWidth
Definition zone.h:991
wxString GetPlacementAreaSource() const
Definition zone.h:816
bool HitTestCutout(const VECTOR2I &aRefPos, int *aOutlineIdx=nullptr, int *aHoleIdx=nullptr) const
Test if the given point is contained within a cutout of the zone.
Definition zone.cpp:1008
EDA_ANGLE m_hatchOrientation
Definition zone.h:996
void Mirror(const VECTOR2I &aMirrorRef, FLIP_DIRECTION aFlipDirection) override
Mirror the outlines relative to a given horizontal axis the layer is not changed.
Definition zone.cpp:1305
std::map< PCB_LAYER_ID, std::set< int > > m_insulatedIslands
For each layer, a set of insulated islands that were not removed.
Definition zone.h:1033
wxString m_zoneName
An optional unique name for this zone, used for identifying it in DRC checking.
Definition zone.h:927
void HatchBorder()
Compute the hatch lines depending on the hatch parameters and stores it in the zone's attribute m_bor...
Definition zone.cpp:1477
std::map< PCB_LAYER_ID, std::shared_ptr< SHAPE_POLY_SET > > m_FilledPolysList
Definition zone.h:1019
std::optional< int > GetLocalClearance(wxString *aSource) const override
Return any local clearances set in the "classic" (ie: pre-rule) system.
Definition zone.h:191
void SetBorderDisplayStyle(ZONE_BORDER_DISPLAY_STYLE aBorderHatchStyle, int aBorderHatchPitch, bool aRebuilBorderdHatch)
Set all hatch parameters for the zone.
Definition zone.cpp:1458
std::shared_ptr< SHAPE_POLY_SET > GetFilledPolysList(PCB_LAYER_ID aLayer) const
Definition zone.h:697
bool GetDoNotAllowPads() const
Definition zone.h:824
const BOX2I GetBoundingBox() const override
Definition zone.cpp:737
void SetMinThickness(int aMinThickness)
Definition zone.h:316
void SetPlacementAreaSource(const wxString &aSource)
Definition zone.h:817
void SetThievingOrientation(const EDA_ANGLE &aOrientation)
Definition zone.h:406
double ViewGetLOD(int aLayer, const KIGFX::VIEW *aView) const override
Return the level of detail (LOD) of the item.
Definition zone.cpp:692
double GetFilledArea()
This area is cached from the most recent call to CalculateFilledArea().
Definition zone.h:279
PLACEMENT_SOURCE_T GetPlacementAreaSourceType() const
Definition zone.h:818
bool Matches(const EDA_SEARCH_DATA &aSearchData, void *aAuxData) const override
Compare the item against the search criteria in aSearchData.
Definition zone.h:163
double m_outlinearea
Definition zone.h:1036
std::mutex m_filledPolysListMutex
Definition zone.h:1018
void SetThievingPattern(THIEVING_PATTERN aPattern)
Definition zone.h:361
wxString GetFriendlyName() const override
Definition zone.cpp:1208
bool GetDoNotAllowTracks() const
Definition zone.h:823
std::mutex m_fillFlagsMutex
Temp variables used while filling.
Definition zone.h:1022
int GetLocalFlags() const
Definition zone.h:415
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
Definition zone.cpp:215
void SetHatchOrientation(const EDA_ANGLE &aStep)
Definition zone.h:332
wxString GetClass() const override
Definition zone.h:607
void SetThievingElementSize(int aSize)
Definition zone.h:370
void SetHatchSmoothingValue(double aValue)
Definition zone.h:338
SHAPE_POLY_SET::ITERATOR IterateWithHoles()
Return an iterator to visit all points of the zone's main outline with holes.
Definition zone.h:635
std::map< PCB_LAYER_ID, ZONE_LAYER_PROPERTIES > m_layerProperties
Definition zone.h:932
void OnFootprintTransformed() override
Hook for items inside a footprint to refresh after the FP transform changes (translate,...
Definition zone.h:590
bool IsFilled() const
Definition zone.h:306
bool HitTestForCorner(const VECTOR2I &refPos, int aAccuracy, SHAPE_POLY_SET::VERTEX_INDEX *aCornerHit=nullptr) const
Test if the given VECTOR2I is near a corner.
Definition zone.cpp:861
void SetHatchSmoothingLevel(int aLevel)
Definition zone.h:335
bool m_doNotAllowTracks
Definition zone.h:963
bool IsConnected() const override
Not all ZONEs are really BOARD_CONNECTED_ITEMs....
Definition zone.h:92
void SetThermalReliefSpokeWidth(int aThermalReliefSpokeWidth)
Definition zone.h:251
virtual PCB_LAYER_ID GetLayer() const override
Return the primary layer this item is on.
Definition zone.cpp:532
void SetPlacementAreaSourceType(PLACEMENT_SOURCE_T aType)
Definition zone.h:819
virtual void SetLayer(PCB_LAYER_ID aLayer) override
Set the layer this item is on.
Definition zone.cpp:599
ISLAND_REMOVAL_MODE GetIslandRemovalMode() const
Definition zone.h:833
LSET m_fillFlags
Definition zone.h:1023
SHAPE_POLY_SET * Outline()
Definition zone.h:418
void SetHatchStyle(ZONE_BORDER_DISPLAY_STYLE aStyle)
Definition zone.h:686
bool m_doNotAllowPads
Definition zone.h:964
void NewHole()
Create a new hole on the zone; i.e., a new contour on the zone's outline.
Definition zone.h:669
ZONE(BOARD_ITEM_CONTAINER *parent)
Definition zone.cpp:52
void SetFillFlag(PCB_LAYER_ID aLayer, bool aFlag)
Definition zone.h:300
void Serialize(google::protobuf::Any &aContainer) const override
Serializes this object to the given Any message.
Definition zone.cpp:229
bool SetNetCode(int aNetCode, bool aNoAssert) override
Override that clamps the netcode to 0 when this zone is in copper-thieving fill mode.
Definition zone.cpp:581
void Move(const VECTOR2I &offset) override
Move the outlines.
Definition zone.cpp:1167
bool IsIsland(PCB_LAYER_ID aLayer, int aPolyIdx) const
Check if a given filled polygon is an insulated island.
Definition zone.cpp:1588
bool IsCopperThieving() const
Definition zone.h:349
SHAPE_POLY_SET * m_Poly
Outline of the zone.
Definition zone.h:922
TEARDROP_TYPE m_teardropType
Definition zone.h:956
std::map< PCB_LAYER_ID, HASH_128 > m_filledPolysHash
A hash value used in zone filling calculations to see if the filled areas are up to date.
Definition zone.h:1026
~ZONE()
Definition zone.cpp:118
long long int GetMinIslandArea() const
Definition zone.h:836
int m_hatchSmoothingLevel
Definition zone.h:997
void SetThievingStagger(bool aStagger)
Definition zone.h:397
double Similarity(const BOARD_ITEM &aOther) const override
Return a measure of how likely the other object is to represent the same object.
Definition zone.cpp:2007
SHAPE_POLY_SET * GetFill(PCB_LAYER_ID aLayer)
Definition zone.h:704
LSET m_layerSet
Definition zone.h:930
void SetIsRuleArea(bool aEnable)
Definition zone.h:812
std::map< PCB_LAYER_ID, ZONE_LAYER_PROPERTIES > & LayerProperties()
Definition zone.h:151
int m_ZoneClearance
Definition zone.h:968
void CopyFrom(const BOARD_ITEM *aOther) override
Definition zone.cpp:111
void SetThievingGap(int aGap)
Definition zone.h:379
void SetDoNotAllowTracks(bool aEnable)
Definition zone.h:829
void SetFilledPolysList(PCB_LAYER_ID aLayer, const SHAPE_POLY_SET &aPolysList)
Set the list of filled polygons.
Definition zone.h:726
bool m_placementAreaEnabled
Placement rule area data.
Definition zone.h:948
const wxString & GetZoneName() const
Definition zone.h:160
void CacheBoundingBox()
Used to preload the zone bounding box cache so we don't have to worry about mutex-locking it each tim...
Definition zone.cpp:774
int GetMinThickness() const
Definition zone.h:315
virtual void swapData(BOARD_ITEM *aImage) override
Definition zone.cpp:1547
bool HitTestForEdge(const VECTOR2I &refPos, int aAccuracy, SHAPE_POLY_SET::VERTEX_INDEX *aCornerHit=nullptr) const
Test if the given VECTOR2I is near a segment defined by 2 corners.
Definition zone.cpp:873
static bool ClassOf(const EDA_ITEM *aItem)
Definition zone.h:81
SHAPE_POLY_SET GetBoardOutline() const
Definition zone.cpp:835
void RemoveCutout(int aOutlineIdx, int aHoleIdx)
Remove a cutout from the zone.
Definition zone.cpp:1321
void Rotate(const VECTOR2I &aCentre, const EDA_ANGLE &aAngle) override
Rotate the outlines.
Definition zone.cpp:1244
bool HigherPriority(const ZONE *aOther) const
Definition zone.cpp:467
bool HitTestFilledArea(PCB_LAYER_ID aLayer, const VECTOR2I &aRefPos, int aAccuracy=0) const
Test if the given VECTOR2I is within the bounds of a filled area of this zone.
Definition zone.cpp:979
void SetIsFilled(bool isFilled)
Definition zone.h:307
std::mutex m_layerSetMutex
Definition zone.h:929
void SetFillMode(ZONE_FILL_MODE aFillMode)
Definition zone.cpp:605
int GetFillFlag(PCB_LAYER_ID aLayer)
Definition zone.h:294
BITMAPS GetMenuImage() const override
Return a pointer to an image to be used in menus.
Definition zone.cpp:1541
int m_hatchGap
Definition zone.h:995
ZONE_CONNECTION GetPadConnection() const
Definition zone.h:312
bool HasFilledPolysForLayer(PCB_LAYER_ID aLayer) const
Definition zone.h:688
int GetHatchThickness() const
Definition zone.h:325
double GetHatchHoleMinArea() const
Definition zone.h:340
void SetThievingSettings(const THIEVING_SETTINGS &aSettings)
Definition zone.h:352
void SetLayerSet(const LSET &aLayerSet) override
Definition zone.cpp:624
void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) override
Populate aList of MSG_PANEL_ITEM objects with it's internal state for display purposes.
Definition zone.cpp:1038
virtual bool IsOnLayer(PCB_LAYER_ID) const override
Test to see if this object is on the given layer.
Definition zone.cpp:730
int m_hatchBorderAlgorithm
Definition zone.h:1003
bool GetPlacementAreaEnabled() const
Definition zone.h:813
void SetDoNotAllowVias(bool aEnable)
Definition zone.h:828
bool IsTeardropArea() const
Definition zone.h:786
std::vector< SEG > m_borderHatchLines
Definition zone.h:1030
VECTOR2I GetPosition() const override
Definition zone.cpp:523
int GetThermalReliefSpokeWidth() const
Definition zone.h:259
int GetBorderHatchPitch() const
HatchBorder related methods.
Definition zone.h:846
void SetNet(NETINFO_ITEM *aNetInfo) override
Override that drops aNetInfo when this zone is in copper-thieving fill mode.
Definition zone.cpp:590
virtual void Flip(const VECTOR2I &aCentre, FLIP_DIRECTION aFlipDirection) override
Flip this object, i.e.
Definition zone.cpp:1273
ZONE_BORDER_DISPLAY_STYLE GetHatchStyle() const
Definition zone.h:685
void BuildHashValue(PCB_LAYER_ID aLayer)
Build the hash value of m_FilledPolysList, and store it internally in m_filledPolysHash.
Definition zone.cpp:818
void SetThermalReliefGap(int aThermalReliefGap)
Definition zone.h:240
EDA_ANGLE GetHatchOrientation() const
Definition zone.h:331
bool BuildSmoothedPoly(SHAPE_POLY_SET &aSmoothedPoly, PCB_LAYER_ID aLayer, SHAPE_POLY_SET *aBoardOutline, SHAPE_POLY_SET *aSmoothedPolyWithApron=nullptr) const
Definition zone.cpp:1638
int m_fillVersion
Definition zone.h:970
const VECTOR2I & GetCornerPosition(int aCornerIndex) const
Definition zone.h:655
bool GetDoNotAllowFootprints() const
Definition zone.h:825
ZONE_FILL_MODE GetFillMode() const
Definition zone.h:238
double m_hatchHoleMinArea
Definition zone.h:1002
SHAPE_POLY_SET::CONST_ITERATOR CIterateWithHoles() const
Return an iterator to visit all points of the zone's main outline with holes.
Definition zone.h:645
SHAPE_POLY_SET::ITERATOR Iterate()
Return an iterator to visit all points of the zone's main outline without holes.
Definition zone.h:625
virtual LSET GetLayerSet() const override
Return a std::bitset of all layers on which the item physically resides.
Definition zone.h:133
bool GetThievingStagger() const
Definition zone.h:396
void SetDoNotAllowFootprints(bool aEnable)
Definition zone.h:831
bool HasKeepoutParametersSet() const
Accessor to determine if any keepout parameters are set.
Definition zone.h:802
void SetBorderHatchPitch(int aPitch)
Definition zone.h:847
void SetThievingLineWidth(int aWidth)
Definition zone.h:388
void GetInteractingZones(PCB_LAYER_ID aLayer, std::vector< ZONE * > *aSameNetCollidingZones, std::vector< ZONE * > *aOtherNetIntersectingZones) const
Some intersecting zones, despite being on the same layer with the same net, cannot be merged due to o...
Definition zone.cpp:1600
void SetLayerSetAndRemoveUnusedFills(const LSET &aLayerSet)
Set the zone to be on the aLayerSet layers and only remove the fill polygons from the unused layers,...
Definition zone.cpp:1903
int GetHatchGap() const
Definition zone.h:328
double CalculateOutlineArea()
Compute the area of the zone outline (not the filled area).
Definition zone.cpp:1809
int GetThievingGap() const
Definition zone.h:378
void SetHatchHoleMinArea(double aPct)
Definition zone.h:341
unsigned m_priority
Definition zone.h:938
TEARDROP_TYPE GetTeardropAreaType() const
Definition zone.h:797
bool Deserialize(const google::protobuf::Any &aContainer) override
Deserializes the given protobuf message into this object.
Definition zone.cpp:341
bool IsConflicting() const
For rule areas which exclude footprints (and therefore participate in courtyard conflicts during move...
Definition zone.cpp:517
bool m_doNotAllowZoneFills
Definition zone.h:961
ISLAND_REMOVAL_MODE m_islandRemovalMode
Definition zone.h:972
std::vector< SEG > GetHatchLines() const
Definition zone.cpp:1517
bool m_isFilled
True when a zone was filled, false after deleting the filled areas.
Definition zone.h:981
double GetHatchSmoothingValue() const
Definition zone.h:337
bool AppendCorner(VECTOR2I aPosition, int aHoleIdx, bool aAllowDuplication=false)
Add a new corner to the zone outline (to the main outline or a hole)
Definition zone.cpp:1367
std::atomic< bool > m_needRefill
False when a zone was refilled, true after changes in zone params.
Definition zone.h:988
THIEVING_PATTERN GetThievingPattern() const
Definition zone.h:360
bool GetDoNotAllowZoneFills() const
Definition zone.h:821
void MoveEdge(const VECTOR2I &offset, int aEdge)
Move the outline Edge.
Definition zone.cpp:1221
int GetHatchSmoothingLevel() const
Definition zone.h:334
unsigned int GetCornerRadius() const
Definition zone.h:756
int GetCornerSmoothingType() const
Definition zone.h:752
int m_thermalReliefGap
Definition zone.h:990
void SetIsIsland(PCB_LAYER_ID aLayer, int aPolyIdx)
Definition zone.h:741
int GetThievingElementSize() const
Definition zone.h:369
int m_localFlgs
Definition zone.h:1008
SHAPE_POLY_SET GetLibraryOutline() const
Definition zone.cpp:829
bool IsOnCopperLayer() const override
Definition zone.cpp:574
double CalculateFilledArea()
Compute the area currently occupied by the zone fill.
Definition zone.cpp:1798
void SetDoNotAllowZoneFills(bool aEnable)
Definition zone.h:827
int m_hatchThickness
Definition zone.h:994
void OnFootprintRescaled(double aRatioX, double aRatioY, double aLinearFactor, const VECTOR2I &aAnchor, const EDA_ANGLE &aParentRotate) override
Apply a parent footprint scale to this item.
Definition zone.cpp:1260
void TransformShapeToPolygon(SHAPE_POLY_SET &aBuffer, PCB_LAYER_ID aLayer, int aClearance, int aError, ERROR_LOC aErrorLoc, bool ignoreLineWidth=false) const override
Convert the zone shape to a closed polygon Used in filling zones calculations Circles and arcs are ap...
Definition zone.cpp:1857
void SetAssignedPriority(unsigned aPriority)
Definition zone.h:117
double m_area
Definition zone.h:1035
unsigned int m_cornerRadius
Definition zone.h:924
void SetPadConnection(ZONE_CONNECTION aPadConnection)
Definition zone.h:313
void SetZoneName(const wxString &aName)
Definition zone.h:161
bool operator==(const ZONE &aOther) const
Definition zone.cpp:1939
void SetTeardropAreaType(TEARDROP_TYPE aType)
Set the type of teardrop if the zone is a teardrop area for non teardrop area, the type must be TEARD...
Definition zone.h:792
void UnHatchBorder()
Clear the zone's hatch.
Definition zone.cpp:1471
void SetIslandRemovalMode(ISLAND_REMOVAL_MODE aRemove)
Definition zone.h:834
EDA_ANGLE GetThievingOrientation() const
Definition zone.h:405
void SetOutline(SHAPE_POLY_SET *aOutline)
Definition zone.h:421
PCB_LAYER_ID GetFirstLayer() const
Definition zone.cpp:554
void SetMinIslandArea(long long int aArea)
Definition zone.h:837
virtual std::vector< int > ViewGetLayers() const override
Return the all the layers within the VIEW the object is painted on.
Definition zone.cpp:672
HASH_128 GetHashValue(PCB_LAYER_ID aLayer)
Definition zone.cpp:809
ZONE_CONNECTION m_PadConnection
Definition zone.h:967
void InitDataFromSrcInCopyCtor(const ZONE &aZone, PCB_LAYER_ID aLayer=UNDEFINED_LAYER)
Copy aZone data to me.
Definition zone.cpp:127
const std::map< PCB_LAYER_ID, ZONE_LAYER_PROPERTIES > & LayerProperties() const
Definition zone.h:153
int GetThermalReliefGap() const
Definition zone.h:248
void RemoveAllContours(void)
Definition zone.h:650
void SetHatchGap(int aStep)
Definition zone.h:329
static int GetDefaultHatchPitch()
Definition zone.cpp:1535
void SetPlacementAreaEnabled(bool aEnabled)
Definition zone.h:814
unsigned GetAssignedPriority() const
Definition zone.h:122
int GetNumCorners(void) const
Access to m_Poly parameters.
Definition zone.h:615
bool SameNet(const ZONE *aOther) const
Definition zone.cpp:481
virtual std::shared_ptr< SHAPE > GetEffectiveShape(PCB_LAYER_ID aLayer=UNDEFINED_LAYER, FLASHING aFlash=FLASHING::DEFAULT) const override
Some pad shapes can be complex (rounded/chamfered rectangle), even without considering custom shapes.
Definition zone.cpp:1841
ZONE_BORDER_DISPLAY_STYLE m_borderStyle
Definition zone.h:1028
long long int m_minIslandArea
When island removal mode is set to AREA, islands below this area will be removed.
Definition zone.h:978
#define _(s)
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
@ UNDEFINED_LAYER
Definition layer_ids.h:57
FLIP_DIRECTION
Definition mirror.h:23
#define DECLARE_ENUM_TO_WXANY(type)
Definition property.h:789
A storage class for 128-bit hash value.
Definition hash_128.h:32
A struct recording the isolated and single-pad islands within a zone.
Definition zone.h:57
std::vector< int > m_SingleConnectionOutlines
Definition zone.h:59
std::vector< int > m_IsolatedOutlines
Definition zone.h:58
Structure to hold the necessary information in order to index a vertex on a SHAPE_POLY_SET object: th...
Parameters that drive copper-thieving fill generation.
TEARDROP_TYPE
define the type of a teardrop: on a via or pad, or a track end
@ PCB_ZONE_T
class ZONE, a copper pour area
Definition typeinfo.h:101
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:683
Class ZONE_SETTINGS used to handle zones parameters in dialogs.
THIEVING_PATTERN
Shape stamped onto the grid for a copper-thieving fill.
ISLAND_REMOVAL_MODE
Whether or not to remove isolated islands from a zone.
ZONE_FILL_MODE
ZONE_BORDER_DISPLAY_STYLE
Zone border styles.
PLACEMENT_SOURCE_T
ZONE_CONNECTION
How pads are covered by copper in zone.
Definition zones.h:43