KiCad PCB EDA Suite
Loading...
Searching...
No Matches
pcb_shape.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 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#pragma once
22
24#include <eda_shape.h>
25
26
27class LINE_READER;
28class EDA_DRAW_FRAME;
29class FOOTPRINT;
30class MSG_PANEL_ITEM;
31class TRANSFORM_TRS;
32
33
35{
36public:
37 PCB_SHAPE( BOARD_ITEM* aParent, KICAD_T aItemType, SHAPE_T aShapeType );
38
39 PCB_SHAPE( BOARD_ITEM* aParent = nullptr, SHAPE_T aShapeType = SHAPE_T::SEGMENT );
40
41 // Do not create a copy constructor & operator=.
42 // The ones generated by the compiler are adequate.
43
44 ~PCB_SHAPE() override;
45
46 void CopyFrom( const BOARD_ITEM* aOther ) override;
47
48 static bool ClassOf( const EDA_ITEM* aItem )
49 {
50 return aItem && PCB_SHAPE_T == aItem->Type();
51 }
52
53 wxString GetClass() const override
54 {
55 return wxT( "PCB_SHAPE" );
56 }
57
58 void Serialize( google::protobuf::Any &aContainer ) const override;
59 bool Deserialize( const google::protobuf::Any &aContainer ) override;
60
61 bool IsConnected() const override;
62
63 wxString GetFriendlyName() const override { return getFriendlyName(); }
64
65 bool IsType( const std::vector<KICAD_T>& aScanTypes ) const override;
66
67 void SetLayer( PCB_LAYER_ID aLayer ) override;
68 PCB_LAYER_ID GetLayer() const override { return m_layer; }
69
70 bool IsOnLayer( PCB_LAYER_ID aLayer ) const override;
71
72 virtual LSET GetLayerSet() const override;
73 virtual void SetLayerSet( const LSET& aLayers ) override;
74
75 void SetPosition( const VECTOR2I& aPos ) override { setPosition( aPos ); }
76 VECTOR2I GetPosition() const override { return getPosition(); }
77
78 VECTOR2I GetCenter() const override { return getCenter(); }
79
80 void BeginEdit( const VECTOR2I& aStartPoint )
81 {
82 beginEdit( aStartPoint );
84 }
85
86 bool ContinueEdit( const VECTOR2I& aPosition )
87 {
88 bool result = continueEdit( aPosition );
90 return result;
91 }
92
93 void CalcEdit( const VECTOR2I& aPosition )
94 {
95 calcEdit( aPosition );
97 }
98
99 void EndEdit( bool aClosed = true )
100 {
101 endEdit( aClosed );
103 }
104
105 void SetEditState( int aState ) { setEditState( aState ); }
106
107 void SetArcAngleAndEnd( const EDA_ANGLE& aAngle, bool aCheckNegativeAngle = false )
108 {
109 EDA_SHAPE::SetArcAngleAndEnd( aAngle, aCheckNegativeAngle );
111 }
112
117 std::vector<VECTOR2I> GetConnectionPoints() const;
118
119 bool HasLineStroke() const override { return true; }
120
121 STROKE_PARAMS GetStroke() const override;
122 void SetStroke( const STROKE_PARAMS& aStroke ) override;
123
124 int GetWidth() const override;
125
126 void StyleFromSettings( const BOARD_DESIGN_SETTINGS& settings, bool aCheckSide ) override;
127
132 virtual std::vector<VECTOR2I> GetCorners() const;
133
138 const VECTOR2I GetFocusPosition() const override;
139
143 std::shared_ptr<SHAPE> GetEffectiveShape( PCB_LAYER_ID aLayer = UNDEFINED_LAYER,
144 FLASHING aFlash = FLASHING::DEFAULT ) const override;
145
146 bool IsProxyItem() const override { return m_proxyItem; }
147 void SetIsProxyItem( bool aIsProxy = true ) override;
148
149 void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList ) override;
150
151 const BOX2I GetBoundingBox() const override { return getBoundingBox(); }
152
153 bool HitTest( const VECTOR2I& aPosition, int aAccuracy = 0 ) const override
154 {
155 return hitTest( aPosition, aAccuracy );
156 }
157
158 bool HitTest( const BOX2I& aRect, bool aContained, int aAccuracy = 0 ) const override
159 {
160 return hitTest( aRect, aContained, aAccuracy );
161 }
162
163 bool HitTest( const SHAPE_LINE_CHAIN& aPoly, bool aContained ) const override
164 {
165 return hitTest( aPoly, aContained );
166 }
167
168 void Normalize() override;
169
175 void NormalizeForCompare() override;
176
177 void Move( const VECTOR2I& aMoveVector ) override;
178
179 void Rotate( const VECTOR2I& aRotCentre, const EDA_ANGLE& aAngle ) override;
180
181 void Flip( const VECTOR2I& aCentre, FLIP_DIRECTION aFlipDirection ) override;
182
183 void OnFootprintRescaled( double aRatioX, double aRatioY, double aLinearFactor, const VECTOR2I& aAnchor,
184 const EDA_ANGLE& aParentRotate ) override;
185
187
188 virtual void Mirror( const VECTOR2I& aCentre, FLIP_DIRECTION aFlipDirection ) override;
189
190 void SetStart( const VECTOR2I& aStart ) override;
191 void SetEnd( const VECTOR2I& aEnd ) override;
192
193 // Stroke width is stored in lib units. Scale-aware accessors apply the
194 // parent footprint scale on read / strip it on write so callers see the
195 // runtime width as before.
196 void SetWidth( int aWidth ) override;
197
198 void SetLibStrokeWidth( int aWidth );
199
200 void SetShape( SHAPE_T aShape ) override
201 {
202 EDA_SHAPE::SetShape( aShape );
203 m_libShape = aShape;
204 }
205
206 void SetArcGeometry( const VECTOR2I& aStart, const VECTOR2I& aMid, const VECTOR2I& aEnd );
207
208 void SetBezierC1( const VECTOR2I& aPt ) override;
209 void SetBezierC2( const VECTOR2I& aPt ) override;
210
211 void SetPolyShape( const SHAPE_POLY_SET& aShape ) override;
212
213 void SetEllipseCenter( const VECTOR2I& aPt ) override;
214 void SetEllipseMajorRadius( int aR ) override;
215 void SetEllipseMinorRadius( int aR ) override;
216 void SetEllipseRotation( const EDA_ANGLE& aA ) override;
217 void SetEllipseStartAngle( const EDA_ANGLE& aA ) override;
218 void SetEllipseEndAngle( const EDA_ANGLE& aA ) override;
219
221 VECTOR2I GetLibraryEnd() const { return m_libEnd; }
223
230
231 void SetLibraryEllipse( const VECTOR2I& aCenter, int aMajor, int aMinor, const EDA_ANGLE& aRotation,
232 const EDA_ANGLE& aStartAngle, const EDA_ANGLE& aEndAngle )
233 {
234 m_libEllipseCenter = aCenter;
237 m_libEllipseRotation = aRotation;
238 m_libEllipseStartAngle = aStartAngle;
239 m_libEllipseEndAngle = aEndAngle;
240
245 EDA_SHAPE::SetEllipseStartAngle( aStartAngle );
247 }
248
253
254 void RebakeFromLib();
255
256 void RebakeWithScale( double aScaleX, double aScaleY );
257
258 void OverrideLibCoords( const VECTOR2I& aStart, const VECTOR2I& aEnd, const VECTOR2I& aArcMid = VECTOR2I( 0, 0 ) )
259 {
260 m_libStart = aStart;
261 m_libEnd = aEnd;
262
263 if( m_libShape == SHAPE_T::ARC )
264 m_libArcMid = aArcMid;
265 }
266
267 void OverrideLibBezier( const VECTOR2I& aC1, const VECTOR2I& aC2 )
268 {
269 m_libBezierC1 = aC1;
270 m_libBezierC2 = aC2;
271 }
272
273 void OverrideLibPoly( const SHAPE_POLY_SET& aPoly ) { m_libPoly = aPoly; }
274
275 const SHAPE_POLY_SET& GetLibPoly() const { return m_libPoly; }
276
277 void Scale( double aScale );
278
279 void UpdateHatching() const override;
280
291 void TransformShapeToPolygon( SHAPE_POLY_SET& aBuffer, PCB_LAYER_ID aLayer, int aClearance,
292 int aError, ERROR_LOC aErrorLoc,
293 bool ignoreLineWidth = false ) const override;
294
307 int aClearance, int aError, ERROR_LOC aErrorLoc,
308 KIGFX::RENDER_SETTINGS* aRenderSettings = nullptr ) const override;
309
310 wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider, bool aFull ) const override;
311
312 BITMAPS GetMenuImage() const override;
313
314 EDA_ITEM* Clone() const override;
315
316 const BOX2I ViewBBox() const override;
317
318 std::vector<int> ViewGetLayers() const override;
319
321 double ViewGetLOD( int aLayer, const KIGFX::VIEW* aView ) const override;
322
323 double Similarity( const BOARD_ITEM& aBoardItem ) const override;
324
325 bool operator==( const PCB_SHAPE& aShape ) const;
326 bool operator==( const BOARD_ITEM& aBoardItem ) const override;
327
328 void SetHasSolderMask( bool aVal ) { m_hasSolderMask = aVal; }
329 bool HasSolderMask() const { return m_hasSolderMask; }
330
331 void SetLocalSolderMaskMargin( std::optional<int> aMargin ) { m_solderMaskMargin = aMargin; }
332 std::optional<int> GetLocalSolderMaskMargin() const { return m_solderMaskMargin; }
333
334 int GetSolderMaskExpansion() const;
335
336#if defined(DEBUG)
337 void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
338#endif
339
340protected:
341 void swapData( BOARD_ITEM* aImage ) override;
342
343 bool isMoving() const override { return IsMoving(); }
344
345 virtual void syncLibCoords();
346
347 // Returns the parent footprint to use for lib/board frame conversion. Pad primitives
348 // are stored pad-local so they get nullptr (the pad applies its own transform when
349 // building the effective shape).
350 const FOOTPRINT* transformFp() const;
351
352 void rebakeFromTransform( const TRANSFORM_TRS& aXform );
353
354 int getMaxError() const override;
355
356 SHAPE_POLY_SET getHatchingKnockouts() const override;
357
359 {
360 bool operator()( const BOARD_ITEM* aFirst, const BOARD_ITEM* aSecond ) const;
361 };
362
363protected:
365 std::optional<int> m_solderMaskMargin;
366
369
371
374
376
383
385};
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
BOARD_CONNECTED_ITEM(BOARD_ITEM *aParent, KICAD_T idtype)
Container for design settings for a BOARD object.
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
PCB_LAYER_ID m_layer
Definition board_item.h:508
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
bool IsMoving() const
Definition eda_item.h:130
EDA_ITEM(EDA_ITEM *parent, KICAD_T idType, bool isSCH_ITEM=false, bool isBOARD_ITEM=false)
Definition eda_item.cpp:37
bool m_proxyItem
Definition eda_shape.h:618
VECTOR2I getCenter() const
void calcEdit(const VECTOR2I &aPosition)
virtual void SetEllipseEndAngle(const EDA_ANGLE &aA)
Definition eda_shape.h:331
virtual void SetEllipseRotation(const EDA_ANGLE &aA)
Definition eda_shape.h:312
bool continueEdit(const VECTOR2I &aPosition)
bool hitTest(const VECTOR2I &aPosition, int aAccuracy=0) const
EDA_SHAPE(SHAPE_T aType, int aLineWidth, FILL_T aFill)
Definition eda_shape.cpp:53
void beginEdit(const VECTOR2I &aStartPoint)
void endEdit(bool aClosed=true)
Finish editing the shape.
virtual void SetEllipseCenter(const VECTOR2I &aPt)
Definition eda_shape.h:285
virtual void SetEllipseMinorRadius(int aR)
Definition eda_shape.h:303
virtual void SetEllipseMajorRadius(int aR)
Definition eda_shape.h:294
virtual void SetShape(SHAPE_T aShape)
Definition eda_shape.h:184
void setPosition(const VECTOR2I &aPos)
virtual void SetEllipseStartAngle(const EDA_ANGLE &aA)
Definition eda_shape.h:322
const BOX2I getBoundingBox() const
void SetArcAngleAndEnd(const EDA_ANGLE &aAngle, bool aCheckNegativeAngle=false)
Set the end point from the angle center and start.
VECTOR2I getPosition() const
void setEditState(int aState)
Definition eda_shape.h:560
wxString getFriendlyName() const
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
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
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
Definition pcb_shape.h:151
virtual void Mirror(const VECTOR2I &aCentre, FLIP_DIRECTION aFlipDirection) override
Mirror this object relative to a given horizontal axis the layer is not changed.
void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) override
Populate aList of MSG_PANEL_ITEM objects with it's internal state for display purposes.
void StyleFromSettings(const BOARD_DESIGN_SETTINGS &settings, bool aCheckSide) override
VECTOR2I m_libEllipseCenter
Definition pcb_shape.h:377
void swapData(BOARD_ITEM *aImage) override
bool IsConnected() const override
Returns information if the object is derived from BOARD_CONNECTED_ITEM.
void SetEllipseCenter(const VECTOR2I &aPt) override
EDA_ANGLE GetLibraryEllipseEndAngle() const
Definition pcb_shape.h:229
EDA_ANGLE m_libEllipseStartAngle
Definition pcb_shape.h:381
double ViewGetLOD(int aLayer, const KIGFX::VIEW *aView) const override
Return the level of detail (LOD) of the item.
VECTOR2I m_libEnd
Definition pcb_shape.h:368
VECTOR2I m_libBezierC1
Definition pcb_shape.h:372
bool HitTest(const SHAPE_LINE_CHAIN &aPoly, bool aContained) const override
Test if aPoly intersects this item.
Definition pcb_shape.h:163
virtual void syncLibCoords()
void EndEdit(bool aClosed=true)
Definition pcb_shape.h:99
SHAPE_POLY_SET getHatchingKnockouts() const override
void SetBezierC1(const VECTOR2I &aPt) override
std::optional< int > GetLocalSolderMaskMargin() const
Definition pcb_shape.h:332
VECTOR2I GetCenter() const override
This defaults to the center of the bounding box if not overridden.
Definition pcb_shape.h:78
bool isMoving() const override
Definition pcb_shape.h:343
void Rotate(const VECTOR2I &aRotCentre, const EDA_ANGLE &aAngle) override
Rotate this object.
VECTOR2I GetLibraryBezierC1() const
BITMAPS GetMenuImage() const override
Return a pointer to an image to be used in menus.
PCB_SHAPE(BOARD_ITEM *aParent, KICAD_T aItemType, SHAPE_T aShapeType)
void SetWidth(int aWidth) override
EDA_ANGLE m_libEllipseEndAngle
Definition pcb_shape.h:382
void CalcEdit(const VECTOR2I &aPosition)
Definition pcb_shape.h:93
void SetArcAngleAndEnd(const EDA_ANGLE &aAngle, bool aCheckNegativeAngle=false)
Definition pcb_shape.h:107
void SetLibraryEllipse(const VECTOR2I &aCenter, int aMajor, int aMinor, const EDA_ANGLE &aRotation, const EDA_ANGLE &aStartAngle, const EDA_ANGLE &aEndAngle)
Definition pcb_shape.h:231
void OverrideLibPoly(const SHAPE_POLY_SET &aPoly)
Definition pcb_shape.h:273
void OverrideLibBezier(const VECTOR2I &aC1, const VECTOR2I &aC2)
Definition pcb_shape.h:267
void SetLibStrokeWidth(int aWidth)
bool HasLineStroke() const override
Check if this item has line stoke properties.
Definition pcb_shape.h:119
SHAPE_T m_libShape
Definition pcb_shape.h:384
void rebakeFromTransform(const TRANSFORM_TRS &aXform)
void SetEditState(int aState)
Definition pcb_shape.h:105
int GetWidth() const override
const BOX2I ViewBBox() const override
Return the bounding box of the item covering all its layers.
bool HasSolderMask() const
Definition pcb_shape.h:329
int GetLibraryEllipseMinorRadius() const
Definition pcb_shape.h:226
void SetEllipseStartAngle(const EDA_ANGLE &aA) override
bool HitTest(const VECTOR2I &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this item.
Definition pcb_shape.h:153
std::shared_ptr< SHAPE > GetEffectiveShape(PCB_LAYER_ID aLayer=UNDEFINED_LAYER, FLASHING aFlash=FLASHING::DEFAULT) const override
Make a set of SHAPE objects representing the PCB_SHAPE.
EDA_ANGLE GetLibraryEllipseStartAngle() const
Definition pcb_shape.h:228
void SetHasSolderMask(bool aVal)
Definition pcb_shape.h:328
int GetLibraryEllipseMajorRadius() const
Definition pcb_shape.h:225
std::optional< int > m_solderMaskMargin
Definition pcb_shape.h:365
int GetSolderMaskExpansion() const
void NormalizeForCompare() override
Normalize coordinates to compare 2 similar PCB_SHAPES similat to Normalize(), but also normalize SEGM...
void SetShape(SHAPE_T aShape) override
Definition pcb_shape.h:200
void SetPosition(const VECTOR2I &aPos) override
Definition pcb_shape.h:75
EDA_ANGLE GetLibraryEllipseRotation() const
Definition pcb_shape.h:227
SHAPE_T GetLibraryShape() const
Definition pcb_shape.h:222
void TransformShapeToPolySet(SHAPE_POLY_SET &aBuffer, PCB_LAYER_ID aLayer, int aClearance, int aError, ERROR_LOC aErrorLoc, KIGFX::RENDER_SETTINGS *aRenderSettings=nullptr) const override
Convert the item shape to a polyset.
VECTOR2I m_libArcMid
Definition pcb_shape.h:370
void SetEllipseEndAngle(const EDA_ANGLE &aA) override
int m_libEllipseMinorRadius
Definition pcb_shape.h:379
const VECTOR2I GetFocusPosition() const override
Allows items to return their visual center rather than their anchor.
VECTOR2I GetLibraryEllipseCenter() const
Definition pcb_shape.h:224
virtual void SetLayerSet(const LSET &aLayers) override
void SetEnd(const VECTOR2I &aEnd) override
void Flip(const VECTOR2I &aCentre, FLIP_DIRECTION aFlipDirection) override
Flip this object, i.e.
VECTOR2I GetLibraryEnd() const
Definition pcb_shape.h:221
const SHAPE_POLY_SET & GetLibPoly() const
Definition pcb_shape.h:275
void SetArcGeometry(const VECTOR2I &aStart, const VECTOR2I &aMid, const VECTOR2I &aEnd)
void SetPolyShape(const SHAPE_POLY_SET &aShape) override
virtual std::vector< VECTOR2I > GetCorners() const
Return 4 corners for a rectangle or rotated rectangle (stored as a poly).
bool IsProxyItem() const override
Definition pcb_shape.h:146
void SetEllipseRotation(const EDA_ANGLE &aA) override
bool m_hasSolderMask
Definition pcb_shape.h:364
const FOOTPRINT * transformFp() const
VECTOR2I GetLibraryStart() const
Definition pcb_shape.h:220
void OnFootprintRescaled(double aRatioX, double aRatioY, double aLinearFactor, const VECTOR2I &aAnchor, const EDA_ANGLE &aParentRotate) override
Apply a parent footprint scale to this item.
~PCB_SHAPE() override
void BeginEdit(const VECTOR2I &aStartPoint)
Definition pcb_shape.h:80
virtual LSET GetLayerSet() const override
Return a std::bitset of all layers on which the item physically resides.
static bool ClassOf(const EDA_ITEM *aItem)
Definition pcb_shape.h:48
bool operator==(const PCB_SHAPE &aShape) const
void SetLayer(PCB_LAYER_ID aLayer) override
Set the layer this item is on.
void OverrideLibCoords(const VECTOR2I &aStart, const VECTOR2I &aEnd, const VECTOR2I &aArcMid=VECTOR2I(0, 0))
Definition pcb_shape.h:258
void SetEllipseMinorRadius(int aR) override
wxString GetFriendlyName() const override
Definition pcb_shape.h:63
void TransformShapeToPolygon(SHAPE_POLY_SET &aBuffer, PCB_LAYER_ID aLayer, int aClearance, int aError, ERROR_LOC aErrorLoc, bool ignoreLineWidth=false) const override
Convert the shape to a closed polygon.
STROKE_PARAMS GetStroke() const override
void SetIsProxyItem(bool aIsProxy=true) override
void RebakeWithScale(double aScaleX, double aScaleY)
SHAPE_POLY_SET m_libPoly
Definition pcb_shape.h:375
void SetLocalSolderMaskMargin(std::optional< int > aMargin)
Definition pcb_shape.h:331
void Move(const VECTOR2I &aMoveVector) override
Move this object.
std::vector< VECTOR2I > GetConnectionPoints() const
bool Deserialize(const google::protobuf::Any &aContainer) override
Deserializes the given protobuf message into this object.
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
int getMaxError() const override
void OnFootprintTransformed() override
Hook for items inside a footprint to refresh after the FP transform changes (translate,...
Definition pcb_shape.h:186
void SetStart(const VECTOR2I &aStart) override
bool IsOnLayer(PCB_LAYER_ID aLayer) const override
Test to see if this object is on the given layer.
void SetBezierC2(const VECTOR2I &aPt) override
void UpdateHatching() const override
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider, bool aFull) const override
Return a user-visible description string of this item.
bool ContinueEdit(const VECTOR2I &aPosition)
Definition pcb_shape.h:86
void Scale(double aScale)
bool HitTest(const BOX2I &aRect, bool aContained, int aAccuracy=0) const override
Test if aRect intersects this item.
Definition pcb_shape.h:158
void Serialize(google::protobuf::Any &aContainer) const override
Serializes this object to the given Any message.
SHAPE_POLY_SET GetLibraryPolyShape() const
void SetStroke(const STROKE_PARAMS &aStroke) override
void Normalize() override
Perform any normalization required after a user rotate and/or flip.
bool IsType(const std::vector< KICAD_T > &aScanTypes) const override
Check whether the item is one of the listed types.
void CopyFrom(const BOARD_ITEM *aOther) override
VECTOR2I GetLibraryBezierC2() const
VECTOR2I m_libBezierC2
Definition pcb_shape.h:373
std::vector< int > ViewGetLayers() const override
void RebakeFromLib()
wxString GetClass() const override
Return the class name.
Definition pcb_shape.h:53
double Similarity(const BOARD_ITEM &aBoardItem) const override
Return a measure of how likely the other object is to represent the same object.
VECTOR2I m_libStart
Definition pcb_shape.h:367
EDA_ANGLE m_libEllipseRotation
Definition pcb_shape.h:380
int m_libEllipseMajorRadius
Definition pcb_shape.h:378
VECTOR2I GetPosition() const override
Definition pcb_shape.h:76
VECTOR2I GetLibraryArcMid() const
void SetEllipseMajorRadius(int aR) override
PCB_LAYER_ID GetLayer() const override
Return the primary layer this item is on.
Definition pcb_shape.h:68
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.
Simple container to manage line stroke parameters.
SHAPE_T
Definition eda_shape.h:44
@ SEGMENT
Definition eda_shape.h:46
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
bool operator()(const BOARD_ITEM *aFirst, const BOARD_ITEM *aSecond) const
wxString result
Test unit parsing edge cases and error handling.
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
Definition typeinfo.h:71
@ PCB_SHAPE_T
class PCB_SHAPE, a segment not on copper layers
Definition typeinfo.h:81
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:683