You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

528 lines
17 KiB

8 years ago
5 years ago
14 years ago
14 years ago
18 years ago
4 years ago
4 years ago
* KIWAY Milestone A): Make major modules into DLL/DSOs. ! The initial testing of this commit should be done using a Debug build so that all the wxASSERT()s are enabled. Also, be sure and keep enabled the USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it off is senseless anyways. If you want stable code, go back to a prior version, the one tagged with "stable". * Relocate all functionality out of the wxApp derivative into more finely targeted purposes: a) DLL/DSO specific b) PROJECT specific c) EXE or process specific d) configuration file specific data e) configuration file manipulations functions. All of this functionality was blended into an extremely large wxApp derivative and that was incompatible with the desire to support multiple concurrently loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects. An amazing amount of organization come from simply sorting each bit of functionality into the proper box. * Switch to wxConfigBase from wxConfig everywhere except instantiation. * Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD, PGM_SINGLE_TOP, * Remove "Return" prefix on many function names. * Remove obvious comments from CMakeLists.txt files, and from else() and endif()s. * Fix building boost for use in a DSO on linux. * Remove some of the assumptions in the CMakeLists.txt files that windows had to be the host platform when building windows binaries. * Reduce the number of wxStrings being constructed at program load time via static construction. * Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that these functions are useful even when the wxConfigBase comes from another source, as is the case in the KICAD_MANAGER_FRAME. * Move the setting of the KIPRJMOD environment variable into class PROJECT, so that it can be moved into a project variable soon, and out of FP_LIB_TABLE. * Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all its child wxFrames and wxDialogs now have a Kiway() member function which returns a KIWAY& that that window tree branch is in support of. This is like wxWindows DNA in that child windows get this member with proper value at time of construction. * Anticipate some of the needs for milestones B) and C) and make code adjustments now in an effort to reduce work in those milestones. * No testing has been done for python scripting, since milestone C) has that being largely reworked and re-thought-out.
12 years ago
Introduction of Graphics Abstraction Layer based rendering for pcbnew. New classes: - VIEW - represents view that is seen by user, takes care of layer ordering & visibility and how it is displayed (which location, how much zoomed, etc.) - VIEW_ITEM - Base class for every item that can be displayed on VIEW (the biggest change is that now it may be necessary to override ViewBBox & ViewGetLayers method for derived classes). - EDA_DRAW_PANEL_GAL - Inherits after EDA_DRAW_PANEL, displays VIEW output, right now it is not editable (in opposite to usual EDA_DRAW_PANEL). - GAL/OPENGL_GAL/CAIRO_GAL - Base Graphics Abstraction Layer class + two different flavours (Cairo is not fully supported yet), that offers methods to draw primitives using different libraries. - WX_VIEW_CONTROLS - Controller for VIEW, handles user events, allows zooming, panning, etc. - PAINTER/PCB_PAINTER - Classes that uses GAL interface to draw items (as you may have already guessed - PCB_PAINTER is a class for drawing PCB specific object, PAINTER is an abstract class). Its methods are invoked by VIEW, when an item has to be drawn. To display a new type of item - you need to implement draw(ITEM_TYPE*) method that draws it using GAL methods. - STROKE_FONT - Implements stroke font drawing using GAL methods. Most important changes to Kicad original code: * EDA_ITEM now inherits from VIEW_ITEM, which is a base class for all drawable objects. * EDA_DRAW_FRAME contains both usual EDA_DRAW_PANEL and new EDA_DRAW_PANEL_GAL, that can be switched anytime. * There are some new layers for displaying multilayer pads, vias & pads holes (these are not shown yet on the right sidebar in pcbnew) * Display order of layers is different than in previous versions (if you are curious - you may check m_galLayerOrder@pcbnew/basepcbframe.cpp). Preserving usual order would result in not very natural display, such as showing silkscreen texts on the bottom. * Introduced new hotkey (Alt+F12) and new menu option (View->Switch canvas) for switching canvas during runtime. * Some of classes (mostly derived from BOARD_ITEM) now includes ViewBBox & ViewGetLayers methods. * Removed tools/class_painter.h, as now it is extended and included in source code. Build changes: * GAL-based rendering option is turned on by a new compilation CMake option KICAD_GAL. * When compiling with CMake option KICAD_GAL=ON, GLEW and Cairo libraries are required. * GAL-related code is compiled into a static library (common/libgal). * Build with KICAD_GAL=OFF should not need any new libraries and should come out as a standard version of Kicad Currently most of items in pcbnew can be displayed using OpenGL (to be done are DIMENSIONS and MARKERS). More details about GAL can be found in: http://www.ohwr.org/attachments/1884/view-spec.pdf
13 years ago
  1. /*
  2. * This program source code file is part of KiCad, a free EDA CAD application.
  3. *
  4. * Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
  5. * Copyright (C) 1992-2022 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. /**
  25. * @brief A single base class (PCB_TRACK) represents both tracks and vias, with subclasses
  26. * for curved tracks (PCB_ARC) and vias (PCB_VIA). All told there are three KICAD_Ts:
  27. * PCB_TRACK_T, PCB_ARC_T, and PCB_VIA_T.
  28. *
  29. * For vias there is a further VIATYPE which indicates THROUGH, BLIND_BURIED, or
  30. * MICROVIA, which are supported by the synthetic KICAD_Ts PCB_LOCATE_STDVIA_T,
  31. * PCB_LOCATE_BBVIA_T, and PCB_LOCATE_UVIA_T.
  32. */
  33. #ifndef CLASS_TRACK_H
  34. #define CLASS_TRACK_H
  35. #include <board_connected_item.h>
  36. #include <convert_to_biu.h>
  37. #include <geometry/shape_segment.h>
  38. #include "core/minoptmax.h"
  39. class PCB_TRACK;
  40. class PCB_VIA;
  41. class PAD;
  42. class MSG_PANEL_ITEM;
  43. class SHAPE_POLY_SET;
  44. class SHAPE_ARC;
  45. // Flag used in locate routines (from which endpoint work)
  46. enum ENDPOINT_T : int
  47. {
  48. ENDPOINT_START = 0,
  49. ENDPOINT_END = 1
  50. };
  51. // Via types
  52. // Note that this enum must be synchronized to GAL_LAYER_ID
  53. enum class VIATYPE : int
  54. {
  55. THROUGH = 3, /* Always a through hole via */
  56. BLIND_BURIED = 2, /* this via can be on internal layers */
  57. MICROVIA = 1, /* this via which connect from an external layer
  58. * to the near neighbor internal layer */
  59. NOT_DEFINED = 0 /* not yet used */
  60. };
  61. #define UNDEFINED_DRILL_DIAMETER -1 //< Undefined via drill diameter.
  62. // Used for tracks and vias for algorithmic safety, not to enforce constraints
  63. #define GEOMETRY_MIN_SIZE ( int )( 0.001 * IU_PER_MM )
  64. class PCB_TRACK : public BOARD_CONNECTED_ITEM
  65. {
  66. public:
  67. static inline bool ClassOf( const EDA_ITEM* aItem )
  68. {
  69. return aItem && PCB_TRACE_T == aItem->Type();
  70. }
  71. PCB_TRACK( BOARD_ITEM* aParent, KICAD_T idtype = PCB_TRACE_T );
  72. // Do not create a copy constructor. The one generated by the compiler is adequate.
  73. void Move( const VECTOR2I& aMoveVector ) override
  74. {
  75. m_Start += aMoveVector;
  76. m_End += aMoveVector;
  77. }
  78. void Rotate( const VECTOR2I& aRotCentre, const EDA_ANGLE& aAngle ) override;
  79. void Flip( const VECTOR2I& aCentre, bool aFlipLeftRight ) override;
  80. void SetPosition( const VECTOR2I& aPos ) override { m_Start = aPos; }
  81. VECTOR2I GetPosition() const override { return m_Start; }
  82. const VECTOR2I GetFocusPosition() const override { return ( m_Start + m_End ) / 2; }
  83. void SetWidth( int aWidth ) { m_Width = aWidth; }
  84. int GetWidth() const { return m_Width; }
  85. void SetEnd( const VECTOR2I& aEnd ) { m_End = aEnd; }
  86. const VECTOR2I& GetEnd() const { return m_End; }
  87. void SetStart( const VECTOR2I& aStart ) { m_Start = aStart; }
  88. const VECTOR2I& GetStart() const { return m_Start; }
  89. void SetEndX( int aX ) { m_End.x = aX; }
  90. void SetEndY( int aY ) { m_End.y = aY; }
  91. int GetEndX() const { return m_End.x; }
  92. int GetEndY() const { return m_End.y; }
  93. /// Return the selected endpoint (start or end)
  94. const VECTOR2I& GetEndPoint( ENDPOINT_T aEndPoint ) const
  95. {
  96. if( aEndPoint == ENDPOINT_START )
  97. return m_Start;
  98. else
  99. return m_End;
  100. }
  101. // Virtual function
  102. const EDA_RECT GetBoundingBox() const override;
  103. /**
  104. * Function GetLength
  105. * returns the length of the track using the hypotenuse calculation.
  106. * @return double - the length of the track
  107. */
  108. virtual double GetLength() const;
  109. /**
  110. * Function TransformShapeWithClearanceToPolygon
  111. * Convert the track shape to a closed polygon
  112. * Used in filling zones calculations
  113. * Circles (vias) and arcs (ends of tracks) are approximated by segments
  114. * @param aCornerBuffer = a buffer to store the polygon
  115. * @param aClearanceValue = the clearance around the pad
  116. * @param aError = the maximum deviation from true circle
  117. * @param ignoreLineWidth = used for edge cut items where the line width is only
  118. * for visualization
  119. */
  120. void TransformShapeWithClearanceToPolygon( SHAPE_POLY_SET& aCornerBuffer,
  121. PCB_LAYER_ID aLayer, int aClearanceValue,
  122. int aError, ERROR_LOC aErrorLoc,
  123. bool ignoreLineWidth = false ) const override;
  124. // @copydoc BOARD_ITEM::GetEffectiveShape
  125. virtual std::shared_ptr<SHAPE> GetEffectiveShape( PCB_LAYER_ID aLayer = UNDEFINED_LAYER,
  126. FLASHING aFlash = FLASHING::DEFAULT ) const override;
  127. /**
  128. * Function IsPointOnEnds
  129. * returns STARTPOINT if point if near (dist = min_dist) start point, ENDPOINT if
  130. * point if near (dist = min_dist) end point,STARTPOINT|ENDPOINT if point if near
  131. * (dist = min_dist) both ends, or 0 if none of the above.
  132. * if min_dist < 0: min_dist = track_width/2
  133. */
  134. EDA_ITEM_FLAGS IsPointOnEnds( const VECTOR2I& point, int min_dist = 0 ) const;
  135. /**
  136. * Function IsNull
  137. * returns true if segment length is zero.
  138. */
  139. bool IsNull() const
  140. {
  141. return ( Type() == PCB_VIA_T ) || ( m_Start == m_End );
  142. }
  143. void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList ) override;
  144. INSPECT_RESULT Visit( INSPECTOR inspector, void* testData,
  145. const std::vector<KICAD_T>& aScanTypes ) override;
  146. bool HitTest( const VECTOR2I& aPosition, int aAccuracy = 0 ) const override;
  147. bool HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy = 0 ) const override;
  148. bool ApproxCollinear( const PCB_TRACK& aTrack );
  149. wxString GetClass() const override
  150. {
  151. return wxT( "PCB_TRACK" );
  152. }
  153. /**
  154. * Function GetLocalClearance
  155. * returns any local clearance overrides set in the "classic" (ie: pre-rule) system.
  156. * @param aSource [out] optionally reports the source as a user-readable string
  157. * @return int - the clearance in internal units.
  158. */
  159. int GetLocalClearance( wxString* aSource ) const override;
  160. MINOPTMAX<int> GetWidthConstraint( wxString* aSource ) const;
  161. wxString GetSelectMenuText( EDA_UNITS aUnits ) const override;
  162. BITMAPS GetMenuImage() const override;
  163. virtual EDA_ITEM* Clone() const override;
  164. virtual void ViewGetLayers( int aLayers[], int& aCount ) const override;
  165. double ViewGetLOD( int aLayer, KIGFX::VIEW* aView ) const override;
  166. const BOX2I ViewBBox() const override;
  167. virtual void SwapData( BOARD_ITEM* aImage ) override;
  168. /**
  169. * @return true because a track or a via is always on a copper layer.
  170. */
  171. bool IsOnCopperLayer() const override
  172. {
  173. return true;
  174. }
  175. struct cmp_tracks
  176. {
  177. bool operator()( const PCB_TRACK* aFirst, const PCB_TRACK* aSecond ) const;
  178. };
  179. #if defined (DEBUG)
  180. virtual void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
  181. /**
  182. * Function ShowState
  183. * converts a set of state bits to a wxString
  184. * @param stateBits Is an OR-ed together set of bits like IN_EDIT, etc.
  185. */
  186. static wxString ShowState( int stateBits );
  187. #endif
  188. protected:
  189. void GetMsgPanelInfoBase_Common( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList ) const;
  190. public:
  191. mutable VECTOR2I m_LastNetnamePosition;
  192. protected:
  193. int m_Width; ///< Thickness of track, or via diameter
  194. VECTOR2I m_Start; ///< Line start point
  195. VECTOR2I m_End; ///< Line end point
  196. };
  197. class PCB_ARC : public PCB_TRACK
  198. {
  199. public:
  200. PCB_ARC( BOARD_ITEM* aParent ) :
  201. PCB_TRACK( aParent, PCB_ARC_T )
  202. {
  203. };
  204. PCB_ARC( BOARD_ITEM* aParent, const SHAPE_ARC* aArc );
  205. static inline bool ClassOf( const EDA_ITEM *aItem )
  206. {
  207. return aItem && PCB_ARC_T == aItem->Type();
  208. }
  209. virtual void Move( const VECTOR2I& aMoveVector ) override
  210. {
  211. m_Start += aMoveVector;
  212. m_Mid += aMoveVector;
  213. m_End += aMoveVector;
  214. }
  215. virtual void Rotate( const VECTOR2I& aRotCentre, const EDA_ANGLE& aAngle ) override;
  216. virtual void Flip( const VECTOR2I& aCentre, bool aFlipLeftRight ) override;
  217. void SetMid( const VECTOR2I& aMid ) { m_Mid = aMid; }
  218. const VECTOR2I& GetMid() const { return m_Mid; }
  219. void SetPosition( const VECTOR2I& aPos ) override
  220. {
  221. m_Start = aPos;
  222. }
  223. virtual VECTOR2I GetPosition() const override;
  224. virtual VECTOR2I GetCenter() const override { return GetPosition(); }
  225. double GetRadius() const;
  226. EDA_ANGLE GetAngle() const;
  227. EDA_ANGLE GetArcAngleStart() const;
  228. EDA_ANGLE GetArcAngleEnd() const;
  229. virtual bool HitTest( const VECTOR2I& aPosition, int aAccuracy = 0 ) const override;
  230. virtual bool HitTest( const EDA_RECT& aRect, bool aContained = true, int aAccuracy = 0 ) const override;
  231. bool IsCCW() const;
  232. wxString GetClass() const override
  233. {
  234. return wxT( "PCB_ARC" );
  235. }
  236. // @copydoc BOARD_ITEM::GetEffectiveShape
  237. virtual std::shared_ptr<SHAPE> GetEffectiveShape( PCB_LAYER_ID aLayer = UNDEFINED_LAYER,
  238. FLASHING aFlash = FLASHING::DEFAULT ) const override;
  239. /**
  240. * Function GetLength
  241. * returns the length of the arc track
  242. * @return double - the length of the track
  243. */
  244. virtual double GetLength() const override
  245. {
  246. return GetRadius() * std::abs( GetAngle().AsRadians() );
  247. }
  248. EDA_ITEM* Clone() const override;
  249. virtual void SwapData( BOARD_ITEM* aImage ) override;
  250. private:
  251. VECTOR2I m_Mid; ///< Arc mid point, halfway between start and end
  252. };
  253. class PCB_VIA : public PCB_TRACK
  254. {
  255. public:
  256. PCB_VIA( BOARD_ITEM* aParent );
  257. static inline bool ClassOf( const EDA_ITEM *aItem )
  258. {
  259. return aItem && PCB_VIA_T == aItem->Type();
  260. }
  261. // Do not create a copy constructor. The one generated by the compiler is adequate.
  262. bool IsType( const std::vector<KICAD_T>& aScanTypes ) const override
  263. {
  264. if( BOARD_CONNECTED_ITEM::IsType( aScanTypes ) )
  265. return true;
  266. for( KICAD_T scanType : aScanTypes )
  267. {
  268. if( scanType == PCB_LOCATE_STDVIA_T && m_viaType == VIATYPE::THROUGH )
  269. return true;
  270. else if( scanType == PCB_LOCATE_UVIA_T && m_viaType == VIATYPE::MICROVIA )
  271. return true;
  272. else if( scanType == PCB_LOCATE_BBVIA_T && m_viaType == VIATYPE::BLIND_BURIED )
  273. return true;
  274. }
  275. return false;
  276. }
  277. VIATYPE GetViaType() const { return m_viaType; }
  278. void SetViaType( VIATYPE aViaType ) { m_viaType = aViaType; }
  279. bool HasHole() const override
  280. {
  281. return true;
  282. }
  283. std::shared_ptr<SHAPE_SEGMENT> GetEffectiveHoleShape() const override;
  284. bool IsTented() const override;
  285. int GetSolderMaskExpansion() const;
  286. bool IsOnLayer( PCB_LAYER_ID aLayer ) const override;
  287. virtual LSET GetLayerSet() const override;
  288. virtual void SetLayerSet( LSET aLayers ) override;
  289. /**
  290. * Function SetLayerPair
  291. * For a via m_layer contains the top layer, the other layer is in m_bottomLayer
  292. * @param aTopLayer = first layer connected by the via
  293. * @param aBottomLayer = last layer connected by the via
  294. */
  295. void SetLayerPair( PCB_LAYER_ID aTopLayer, PCB_LAYER_ID aBottomLayer );
  296. void SetBottomLayer( PCB_LAYER_ID aLayer );
  297. void SetTopLayer( PCB_LAYER_ID aLayer );
  298. /**
  299. * Function LayerPair
  300. * Return the 2 layers used by the via (the via actually uses
  301. * all layers between these 2 layers)
  302. * @param top_layer = pointer to the first layer (can be null)
  303. * @param bottom_layer = pointer to the last layer (can be null)
  304. */
  305. void LayerPair( PCB_LAYER_ID* top_layer, PCB_LAYER_ID* bottom_layer ) const;
  306. PCB_LAYER_ID TopLayer() const;
  307. PCB_LAYER_ID BottomLayer() const;
  308. /**
  309. * Function SanitizeLayers
  310. * Check so that the layers are correct dependin on the type of via, and
  311. * so that the top actually is on top.
  312. */
  313. void SanitizeLayers();
  314. VECTOR2I GetPosition() const override { return m_Start; }
  315. void SetPosition( const VECTOR2I& aPoint ) override { m_Start = aPoint; m_End = aPoint; }
  316. void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList ) override;
  317. bool HitTest( const VECTOR2I& aPosition, int aAccuracy = 0 ) const override;
  318. bool HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy = 0 ) const override;
  319. wxString GetClass() const override
  320. {
  321. return wxT( "PCB_VIA" );
  322. }
  323. wxString GetSelectMenuText( EDA_UNITS aUnits ) const override;
  324. BITMAPS GetMenuImage() const override;
  325. EDA_ITEM* Clone() const override;
  326. void ViewGetLayers( int aLayers[], int& aCount ) const override;
  327. double ViewGetLOD( int aLayer, KIGFX::VIEW* aView ) const override;
  328. void Flip( const VECTOR2I& aCentre, bool aFlipLeftRight ) override;
  329. #if defined (DEBUG)
  330. void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
  331. #endif
  332. int GetMinAnnulus( PCB_LAYER_ID aLayer, wxString* aSource ) const;
  333. /**
  334. * Sets the unconnected removal property. If true, the copper is removed on zone fill
  335. * or when specifically requested when the via is not connected on a layer.
  336. */
  337. void SetRemoveUnconnected( bool aSet ) { m_removeUnconnectedLayer = aSet; }
  338. bool GetRemoveUnconnected() const { return m_removeUnconnectedLayer; }
  339. /**
  340. * Sets whether we keep the top and bottom connections even if they are not connected
  341. */
  342. void SetKeepTopBottom( bool aSet ) { m_keepTopBottomLayer = aSet; }
  343. bool GetKeepTopBottom() const { return m_keepTopBottomLayer; }
  344. /**
  345. * Checks to see whether the via should have a pad on the specific layer
  346. * @param aLayer Layer to check for connectivity
  347. * @return true if connected by pad or track (or optionally zone)
  348. */
  349. bool FlashLayer( int aLayer ) const;
  350. /**
  351. * Checks to see if the via is present on any of the layers in the set
  352. * @param aLayers set of layers to check the via against
  353. * @return true if connected by pad or track (or optionally zone) on any of the associated layers
  354. */
  355. bool FlashLayer( LSET aLayers ) const;
  356. /**
  357. * Function SetDrill
  358. * sets the drill value for vias.
  359. * @param aDrill is the new drill diameter
  360. */
  361. void SetDrill( int aDrill ) { m_drill = aDrill; }
  362. /**
  363. * Function GetDrill
  364. * returns the local drill setting for this PCB_VIA. If you want the calculated value,
  365. * use GetDrillValue() instead.
  366. */
  367. int GetDrill() const { return m_drill; }
  368. /**
  369. * Function GetDrillValue
  370. * "calculates" the drill value for vias (m-Drill if > 0, or default
  371. * drill value for the board.
  372. * @return real drill_value
  373. */
  374. int GetDrillValue() const;
  375. /**
  376. * Function SetDrillDefault
  377. * sets the drill value for vias to the default value #UNDEFINED_DRILL_DIAMETER.
  378. */
  379. void SetDrillDefault() { m_drill = UNDEFINED_DRILL_DIAMETER; }
  380. /**
  381. * Checks if the via is a free via (as opposed to one created on a track by the router).
  382. * Free vias don't have their nets automatically updated by the connectivity algorithm.
  383. * @return true if the via is a free via
  384. */
  385. bool GetIsFree() const { return m_isFree; }
  386. void SetIsFree( bool aFree = true ) { m_isFree = aFree; }
  387. /**
  388. * Function IsDrillDefault
  389. * @return true if the drill value is default value (-1)
  390. */
  391. bool IsDrillDefault() const { return m_drill <= 0; }
  392. void SwapData( BOARD_ITEM* aImage ) override;
  393. // @copydoc BOARD_ITEM::GetEffectiveShape
  394. std::shared_ptr<SHAPE> GetEffectiveShape( PCB_LAYER_ID aLayer = UNDEFINED_LAYER,
  395. FLASHING aFlash = FLASHING::DEFAULT ) const override;
  396. protected:
  397. wxString layerMaskDescribe() const override;
  398. private:
  399. /// The bottom layer of the via (the top layer is in m_layer)
  400. PCB_LAYER_ID m_bottomLayer;
  401. VIATYPE m_viaType; ///< through, blind/buried or micro
  402. int m_drill; ///< for vias: via drill (- 1 for default value)
  403. bool m_removeUnconnectedLayer; ///< Remove unconnected copper on a via
  404. bool m_keepTopBottomLayer; ///< Keep the top and bottom annular rings
  405. bool m_isFree; ///< "Free" vias don't get their nets auto-updated
  406. };
  407. #endif // CLASS_TRACK_H