KiCad PCB EDA Suite
class_module.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) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
5  * Copyright (C) 1992-2019 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 
31 #ifndef MODULE_H_
32 #define MODULE_H_
33 
34 #include <deque>
35 
36 #include <board_item_container.h>
37 #include <class_board_item.h>
38 #include <collectors.h>
39 #include <convert_to_biu.h>
40 #include <layers_id_colors_and_visibility.h> // ALL_LAYERS definition.
41 #include <lib_id.h>
42 #include <list>
43 
44 #include "zones.h"
45 #include <class_text_mod.h>
46 #include <class_zone.h>
47 
48 #include <core/iterators.h>
49 
50 #include <functional>
51 
52 class LINE_READER;
53 class EDA_3D_CANVAS;
54 class D_PAD;
55 class BOARD;
56 class MSG_PANEL_ITEM;
57 
58 namespace KIGFX {
59 class VIEW;
60 }
61 
63 {
65  INCLUDE_NPTH = true
66 };
67 
75 {
77  MOD_CMS = 1,
78  MOD_VIRTUAL = 2
80 };
82 
84 {
85  public:
87  // Initialize with sensible values
88  m_Scale { 1, 1, 1 },
89  m_Rotation { 0, 0, 0 },
90  m_Offset { 0, 0, 0 },
91  m_Preview( true )
92  {
93  }
94 
95  struct VECTOR3D
96  {
97  double x, y, z;
98  };
99 
103  wxString m_Filename;
104  bool m_Preview;
105 };
106 
107 DECL_DEQ_FOR_SWIG( PADS, D_PAD* )
108 DECL_DEQ_FOR_SWIG( DRAWINGS, BOARD_ITEM* )
109 DECL_VEC_FOR_SWIG( MODULE_ZONE_CONTAINERS, MODULE_ZONE_CONTAINER* )
110 DECL_DEQ_FOR_SWIG( MODULES, MODULE* )
111 
113 {
114 public:
115  MODULE( BOARD* parent );
116 
117  MODULE( const MODULE& aModule );
118 
119  ~MODULE();
120 
121  MODULE& operator=( const MODULE& aOther );
122 
123  static inline bool ClassOf( const EDA_ITEM* aItem )
124  {
125  return aItem && PCB_MODULE_T == aItem->Type();
126  }
127 
129  void Add( BOARD_ITEM* aItem, ADD_MODE aMode = ADD_INSERT ) override;
130 
132  void Remove( BOARD_ITEM* aItem ) override;
133 
141  void ClearAllNets();
142 
147  void CalculateBoundingBox();
148 
154  EDA_RECT GetFootprintRect() const;
155 
163  EDA_RECT GetFpPadsLocalBbox() const;
164 
169  SHAPE_POLY_SET GetBoundingPoly() const;
170 
171  // Virtual function
172  const EDA_RECT GetBoundingBox() const override;
173 
174  const EDA_RECT GetBoundingBox( bool aIncludeInvisibleText ) const;
175 
176  PADS& Pads()
177  {
178  return m_pads;
179  }
180 
181  const PADS& Pads() const
182  {
183  return m_pads;
184  }
185 
186  DRAWINGS& GraphicalItems()
187  {
188  return m_drawings;
189  }
190 
191  const MODULE_ZONE_CONTAINERS& Zones() const
192  {
193  return m_fp_zones;
194  }
195 
196  const DRAWINGS& GraphicalItems() const
197  {
198  return m_drawings;
199  }
200 
206  bool HasNonSMDPins() const;
207 
208  std::list<MODULE_3D_SETTINGS>& Models() { return m_3D_Drawings; }
209  const std::list<MODULE_3D_SETTINGS>& Models() const { return m_3D_Drawings; }
210 
211  void SetPosition( const wxPoint& aPos ) override;
212 
213  const wxPoint GetPosition() const override { return m_Pos; }
214 
215  void SetOrientation( double newangle );
216 
217  void SetOrientationDegrees( double aOrientation ) { SetOrientation( aOrientation * 10.0 ); }
218  double GetOrientation() const { return m_Orient; }
219  double GetOrientationDegrees() const { return m_Orient / 10.0; }
220  double GetOrientationRadians() const { return m_Orient * M_PI / 1800; }
221 
222  const LIB_ID& GetFPID() const { return m_fpid; }
223  void SetFPID( const LIB_ID& aFPID ) { m_fpid = aFPID; }
224 
225  const wxString& GetDescription() const { return m_Doc; }
226  void SetDescription( const wxString& aDoc ) { m_Doc = aDoc; }
227 
228  const wxString& GetKeywords() const { return m_KeyWord; }
229  void SetKeywords( const wxString& aKeywords ) { m_KeyWord = aKeywords; }
230 
231  const wxString& GetPath() const { return m_Path; }
232  void SetPath( const wxString& aPath ) { m_Path = aPath; }
233 
234  int GetLocalSolderMaskMargin() const { return m_LocalSolderMaskMargin; }
235  void SetLocalSolderMaskMargin( int aMargin ) { m_LocalSolderMaskMargin = aMargin; }
236 
237  int GetLocalClearance() const { return m_LocalClearance; }
238  void SetLocalClearance( int aClearance ) { m_LocalClearance = aClearance; }
239 
240  int GetLocalSolderPasteMargin() const { return m_LocalSolderPasteMargin; }
241  void SetLocalSolderPasteMargin( int aMargin ) { m_LocalSolderPasteMargin = aMargin; }
242 
243  double GetLocalSolderPasteMarginRatio() const { return m_LocalSolderPasteMarginRatio; }
244  void SetLocalSolderPasteMarginRatio( double aRatio ) { m_LocalSolderPasteMarginRatio = aRatio; }
245 
246  void SetZoneConnection( ZoneConnection aType ) { m_ZoneConnection = aType; }
247  ZoneConnection GetZoneConnection() const { return m_ZoneConnection; }
248 
249  void SetThermalWidth( int aWidth ) { m_ThermalWidth = aWidth; }
250  int GetThermalWidth() const { return m_ThermalWidth; }
251 
252  void SetThermalGap( int aGap ) { m_ThermalGap = aGap; }
253  int GetThermalGap() const { return m_ThermalGap; }
254 
255  int GetAttributes() const { return m_Attributs; }
256  void SetAttributes( int aAttributes ) { m_Attributs = aAttributes; }
257 
258  void SetFlag( int aFlag ) { m_arflag = aFlag; }
259  void IncrementFlag() { m_arflag += 1; }
260  int GetFlag() const { return m_arflag; }
261 
262  // A bit of a hack until net ties are supported as first class citizens
263  bool IsNetTie() const { return GetKeywords().StartsWith( wxT( "net tie" ) ); }
264 
265  void Move( const wxPoint& aMoveVector ) override;
266 
267  void Rotate( const wxPoint& aRotCentre, double aAngle ) override;
268 
269  void Flip( const wxPoint& aCentre, bool aFlipLeftRight ) override;
270 
282  void MoveAnchorPosition( const wxPoint& aMoveVector );
283 
288  bool IsFlipped() const { return GetLayer() == B_Cu; }
289 
290 // m_ModuleStatus bits:
291 #define MODULE_is_LOCKED 0x01
292 #define MODULE_is_PLACED 0x02
293 #define MODULE_to_PLACE 0x04
294 #define MODULE_PADS_LOCKED 0x08
295 
296 
297  bool IsLocked() const override
298  {
299  return ( m_ModuleStatus & MODULE_is_LOCKED ) != 0;
300  }
301 
307  void SetLocked( bool isLocked ) override
308  {
309  if( isLocked )
310  m_ModuleStatus |= MODULE_is_LOCKED;
311  else
312  m_ModuleStatus &= ~MODULE_is_LOCKED;
313  }
314 
315  bool IsPlaced() const { return m_ModuleStatus & MODULE_is_PLACED; }
316  void SetIsPlaced( bool isPlaced )
317  {
318  if( isPlaced )
319  m_ModuleStatus |= MODULE_is_PLACED;
320  else
321  m_ModuleStatus &= ~MODULE_is_PLACED;
322  }
323 
324  bool NeedsPlaced() const { return m_ModuleStatus & MODULE_to_PLACE; }
325  void SetNeedsPlaced( bool needsPlaced )
326  {
327  if( needsPlaced )
328  m_ModuleStatus |= MODULE_to_PLACE;
329  else
330  m_ModuleStatus &= ~MODULE_to_PLACE;
331  }
332 
333  bool PadsLocked() const { return m_ModuleStatus & MODULE_PADS_LOCKED; }
334 
335  void SetPadsLocked( bool aPadsLocked )
336  {
337  if( aPadsLocked )
338  m_ModuleStatus |= MODULE_PADS_LOCKED;
339  else
340  m_ModuleStatus &= ~MODULE_PADS_LOCKED;
341  }
342 
343  void SetLastEditTime( timestamp_t aTime ) { m_LastEditTime = aTime; }
344  void SetLastEditTime() { m_LastEditTime = time( NULL ); }
345  timestamp_t GetLastEditTime() const { return m_LastEditTime; }
346 
347  /* drawing functions */
348 
356  void Print( PCB_BASE_FRAME* aFrame, wxDC* aDC, const wxPoint& aOffset = ZeroOffset ) override;
357 
376  void TransformPadsShapesWithClearanceToPolygon( PCB_LAYER_ID aLayer,
377  SHAPE_POLY_SET& aCornerBuffer, int aInflateValue, int aMaxError = ARC_HIGH_DEF,
378  bool aSkipNPTHPadsWihNoCopper = false ) const;
379 
393  void TransformGraphicShapesWithClearanceToPolygonSet( PCB_LAYER_ID aLayer,
394  SHAPE_POLY_SET& aCornerBuffer, int aInflateValue, int aError = ARC_HIGH_DEF,
395  bool aIncludeText = true ) const;
396 
407  void TransformGraphicTextWithClearanceToPolygonSet( PCB_LAYER_ID aLayer,
408  SHAPE_POLY_SET& aCornerBuffer, int aInflateValue, int aError = ARC_HIGH_DEF ) const;
409 
411  void GetMsgPanelInfo( EDA_UNITS_T aUnits, std::vector<MSG_PANEL_ITEM>& aList ) override;
412 
413  bool HitTest( const wxPoint& aPosition, int aAccuracy = 0 ) const override;
414 
424  bool HitTestAccurate( const wxPoint& aPosition, int aAccuracy = 0 ) const;
425 
426  bool HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy = 0 ) const override;
427 
432  const wxString GetReference() const
433  {
434  return m_Reference->GetText();
435  }
436 
442  void SetReference( const wxString& aReference )
443  {
444  m_Reference->SetText( aReference );
445  }
446 
451  void IncrementReference( int aDelta );
452 
457  const wxString GetValue() const
458  {
459  return m_Value->GetText();
460  }
461 
466  void SetValue( const wxString& aValue )
467  {
468  m_Value->SetText( aValue );
469  }
470 
472  TEXTE_MODULE& Value() { return *m_Value; }
473  TEXTE_MODULE& Reference() { return *m_Reference; }
474 
476  TEXTE_MODULE& Value() const { return *m_Value; }
477  TEXTE_MODULE& Reference() const { return *m_Reference; }
478 
486  D_PAD* FindPadByName( const wxString& aPadName ) const;
487 
496  D_PAD* GetPad( const wxPoint& aPosition, LSET aLayerMask = LSET::AllLayersMask() );
497 
498  D_PAD* GetTopLeftPad();
499 
505  {
506  return m_pads.empty() ? nullptr : m_pads.front();
507  }
508 
517  unsigned GetPadCount( INCLUDE_NPTH_T aIncludeNPTH = INCLUDE_NPTH_T(INCLUDE_NPTH) ) const;
518 
531  unsigned GetUniquePadCount( INCLUDE_NPTH_T aIncludeNPTH = INCLUDE_NPTH_T(INCLUDE_NPTH) ) const;
532 
541  wxString GetNextPadName( bool aFillSequenceGaps ) const;
542 
543  double GetArea( int aPadding = 0 ) const;
544 
545  timestamp_t GetLink() const { return m_Link; }
546  void SetLink( timestamp_t aLink ) { m_Link = aLink; }
547 
548  int GetPlacementCost180() const { return m_CntRot180; }
549  void SetPlacementCost180( int aCost ) { m_CntRot180 = aCost; }
550 
551  int GetPlacementCost90() const { return m_CntRot90; }
552  void SetPlacementCost90( int aCost ) { m_CntRot90 = aCost; }
553 
559  BOARD_ITEM* Duplicate( const BOARD_ITEM* aItem,
560  bool aIncrementPadNumbers,
561  bool aAddToModule = false );
562 
569  void Add3DModel( MODULE_3D_SETTINGS* a3DModel );
570 
571  SEARCH_RESULT Visit( INSPECTOR inspector, void* testData, const KICAD_T scanTypes[] ) override;
572 
573  wxString GetClass() const override
574  {
575  return wxT( "MODULE" );
576  }
577 
578  wxString GetSelectMenuText( EDA_UNITS_T aUnits ) const override;
579 
580  BITMAP_DEF GetMenuImage() const override;
581 
582  EDA_ITEM* Clone() const override;
583 
591  void RunOnChildren( const std::function<void (BOARD_ITEM*)>& aFunction );
592 
601  void GetAllDrawingLayers( int aLayers[], int& aCount, bool aIncludePads = true ) const;
602 
603  virtual void ViewGetLayers( int aLayers[], int& aCount ) const override;
604 
605  virtual unsigned int ViewGetLOD( int aLayer, KIGFX::VIEW* aView ) const override;
606 
607  virtual const BOX2I ViewBBox() const override;
608 
616  static bool IsLibNameValid( const wxString& aName );
617 
626  static const wxChar* StringLibNameInvalidChars( bool aUserReadable );
627 
642  void SetInitialComments( wxArrayString* aInitialComments )
643  {
644  delete m_initial_comments;
645  m_initial_comments = aInitialComments;
646  }
647 
654  double CoverageRatio( const GENERAL_COLLECTOR& aCollector ) const;
655 
657  const wxArrayString* GetInitialComments() const { return m_initial_comments; }
658 
662  SHAPE_POLY_SET& GetPolyCourtyardFront() { return m_poly_courtyard_front; }
663  SHAPE_POLY_SET& GetPolyCourtyardBack() { return m_poly_courtyard_back; }
664 
672  bool BuildPolyCourtyard();
673 
674  virtual void SwapData( BOARD_ITEM* aImage ) override;
675 
676 #if defined(DEBUG)
677  virtual void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
678 #endif
679 
680 private:
681  DRAWINGS m_drawings; // BOARD_ITEMs for drawings on the board, owned by pointer.
682  PADS m_pads; // D_PAD items, owned by pointer
683  MODULE_ZONE_CONTAINERS m_fp_zones; // MODULE_ZONE_CONTAINER items, owned by pointer
684  std::list<MODULE_3D_SETTINGS> m_3D_Drawings; // Linked list of 3D models.
685 
686  double m_Orient; // Orientation in tenths of a degree, 900=90.0 degrees.
687  wxPoint m_Pos; // Position of module on the board in internal units.
688  TEXTE_MODULE* m_Reference; // Component reference designator value (U34, R18..)
689  TEXTE_MODULE* m_Value; // Component value (74LS00, 22K..)
690  LIB_ID m_fpid; // The #LIB_ID of the MODULE.
691  int m_Attributs; // Flag bits ( see Mod_Attribut )
692  int m_ModuleStatus; // For autoplace: flags (LOCKED, AUTOPLACED)
693  EDA_RECT m_BoundaryBox; // Bounding box : coordinates on board, real orientation.
694 
699  int m_LocalSolderMaskMargin; // Solder mask margin
700  int m_LocalSolderPasteMargin; // Solder paste margin absolute value
701  double m_LocalSolderPasteMarginRatio; // Solder mask margin ratio value of pad size
702 
703  wxString m_Doc; // File name and path for documentation file.
704  wxString m_KeyWord; // Search keywords to find module in library.
705  wxString m_Path;
707  int m_arflag; // Use to trace ratsnest and auto routing.
708  timestamp_t m_Link; // Temporary logical link used during editing
709  int m_CntRot90; // Horizontal automatic placement cost ( 0..10 ).
710  int m_CntRot180; // Vertical automatic placement cost ( 0..10 ).
711 
712  wxArrayString* m_initial_comments;
713 
719 };
720 
721 #endif // MODULE_H_
LIB_ID m_fpid
Definition: class_module.h:690
SHAPE_POLY_SET & GetPolyCourtyardFront()
Used in DRC to test the courtyard area (a complex polygon)
Definition: class_module.h:662
timestamp_t GetLastEditTime() const
Definition: class_module.h:345
const DRAWINGS & GraphicalItems() const
Definition: class_module.h:196
#define MODULE_to_PLACE
In autoplace: module waiting for autoplace.
Definition: class_module.h:293
void SetPlacementCost90(int aCost)
Definition: class_module.h:552
int GetAttributes() const
Definition: class_module.h:255
double GetOrientation() const
Definition: class_module.h:218
Class LINE_READER is an abstract class from which implementation specific LINE_READERs may be derived...
Definition: richio.h:81
int GetPlacementCost90() const
Definition: class_module.h:551
TEXTE_MODULE & Reference()
Definition: class_module.h:473
void SetThermalGap(int aGap)
Definition: class_module.h:252
int m_CntRot90
Definition: class_module.h:709
void IncrementFlag()
Definition: class_module.h:259
SHAPE_POLY_SET m_poly_courtyard_back
Definition: class_module.h:718
void SetLocalClearance(int aClearance)
Definition: class_module.h:238
Class CAIRO_GAL is the cairo implementation of the graphics abstraction layer.
Definition: class_module.h:58
bool IsFlipped() const
function IsFlipped
Definition: class_module.h:288
wxString m_KeyWord
Definition: class_module.h:704
wxString m_Path
Definition: class_module.h:705
void SetPlacementCost180(int aCost)
Definition: class_module.h:549
void SetPosition(wxString aStr, const wxString &aDefaultMeasurementUnit, int *aX, int *aY, const wxString &aActualConversion)
Class BOARD_ITEM is a base class for any item which can be embedded within the BOARD container class,...
int m_ThermalWidth
Definition: class_module.h:696
void SetInitialComments(wxArrayString *aInitialComments)
Function SetInitialComments takes ownership of caller's heap allocated aInitialComments block.
Definition: class_module.h:642
Classes BOARD_ITEM and BOARD_CONNECTED_ITEM.
double m_LocalSolderPasteMarginRatio
Definition: class_module.h:701
bool IsPlaced() const
Definition: class_module.h:315
const std::list< MODULE_3D_SETTINGS > & Models() const
Definition: class_module.h:209
ZoneConnection
How pads are covered by copper in zone.
Definition: zones.h:50
int m_LocalSolderPasteMargin
Definition: class_module.h:700
int m_ThermalGap
Definition: class_module.h:697
const wxString & GetPath() const
Definition: class_module.h:231
PADS & Pads()
Definition: class_module.h:176
void SetNeedsPlaced(bool needsPlaced)
Definition: class_module.h:325
const wxString GetValue() const
Function GetValue.
Definition: class_module.h:457
Set for modules listed in the automatic insertion list (usually SMD footprints)
Definition: class_module.h:77
Implement a canvas based on a wxGLCanvas.
Definition: eda_3d_canvas.h:52
#define DECL_DEQ_FOR_SWIG(TypeName, MemberType)
Definition: macros.h:160
PADS m_pads
Definition: class_module.h:682
void SetZoneConnection(ZoneConnection aType)
Definition: class_module.h:246
void SetOrientationDegrees(double aOrientation)
Definition: class_module.h:217
const LIB_ID & GetFPID() const
Definition: class_module.h:222
D_PAD * GetFirstPad() const
Gets the first pad in the list or NULL if none.
Definition: class_module.h:504
DRAWINGS & GraphicalItems()
Definition: class_module.h:186
A logical library item identifier and consists of various portions much like a URI.
Definition: lib_id.h:51
int GetLocalSolderMaskMargin() const
Definition: class_module.h:234
bool m_Preview
Include module in 3D preview.
Definition: class_module.h:104
wxArrayString * m_initial_comments
leading s-expression comments in the module, lazily allocated only if needed for speed
Definition: class_module.h:712
void SetLocalSolderPasteMarginRatio(double aRatio)
Definition: class_module.h:244
#define MODULE_PADS_LOCKED
In autoplace: module waiting for autoplace.
Definition: class_module.h:294
KICAD_T
Enum KICAD_T is the set of class identification values, stored in EDA_ITEM::m_StructType.
Definition: typeinfo.h:78
timestamp_t GetLink() const
Definition: class_module.h:545
VECTOR3D m_Offset
3D model offset (mm)
Definition: class_module.h:102
wxString m_Doc
Definition: class_module.h:703
timestamp_t m_LastEditTime
Definition: class_module.h:706
const wxString GetReference() const
Function GetReference.
Definition: class_module.h:432
#define MODULE_is_PLACED
In autoplace: module automatically placed.
Definition: class_module.h:292
int m_LocalClearance
Definition: class_module.h:698
const INSPECTOR_FUNC & INSPECTOR
Definition: base_struct.h:108
double m_Orient
Definition: class_module.h:686
bool IsNetTie() const
Definition: class_module.h:263
class MODULE, a footprint
Definition: typeinfo.h:89
PCB_LAYER_ID
A quick note on layer IDs:
EDA_RECT m_BoundaryBox
Definition: class_module.h:693
Class LSET is a set of PCB_LAYER_IDs.
Footprint text class description.
int GetLocalClearance() const
Definition: class_module.h:237
void SetLink(timestamp_t aLink)
Definition: class_module.h:546
Class SHAPE_POLY_SET.
TEXTE_MODULE & Value()
read/write accessors:
Definition: class_module.h:472
void SetLastEditTime(timestamp_t aTime)
Definition: class_module.h:343
timestamp_t m_Link
Definition: class_module.h:708
static bool ClassOf(const EDA_ITEM *aItem)
Definition: class_module.h:123
void SetThermalWidth(int aWidth)
Definition: class_module.h:249
int m_LocalSolderMaskMargin
Definition: class_module.h:699
std::list< MODULE_3D_SETTINGS > m_3D_Drawings
Definition: class_module.h:684
double GetOrientationRadians() const
Definition: class_module.h:220
#define DECL_VEC_FOR_SWIG(TypeName, MemberType)
Declare a std::vector but no swig template.
Definition: macros.h:159
int m_arflag
Definition: class_module.h:707
double GetOrientationDegrees() const
Definition: class_module.h:219
MODULE_ZONE_CONTAINERS m_fp_zones
Definition: class_module.h:683
static LSET AllLayersMask()
Definition: lset.cpp:713
MODULE_ATTR_T
Enum MODULE_ATTR_T is the set of attributes allowed within a MODULE, using MODULE::SetAttributes() an...
Definition: class_module.h:74
void SetPadsLocked(bool aPadsLocked)
Definition: class_module.h:335
void SetReference(const wxString &aReference)
Function SetReference.
Definition: class_module.h:442
SHAPE_POLY_SET m_poly_courtyard_front
Used in DRC to test the courtyard area (a polygon which can be not basic Note also a footprint can ha...
Definition: class_module.h:717
void SetIsPlaced(bool isPlaced)
Definition: class_module.h:316
bool NeedsPlaced() const
Definition: class_module.h:324
const wxArrayString * GetInitialComments() const
Return the initial comments block or NULL if none, without transfer of ownership.
Definition: class_module.h:657
bool IsLocked() const override
Function IsLocked.
Definition: class_module.h:297
const wxString & GetKeywords() const
Definition: class_module.h:228
DRAWINGS m_drawings
Definition: class_module.h:681
void SetLocalSolderMaskMargin(int aMargin)
Definition: class_module.h:235
const MODULE_ZONE_CONTAINERS & Zones() const
Definition: class_module.h:191
int GetLocalSolderPasteMargin() const
Definition: class_module.h:240
wxString m_Filename
The 3D shape filename in 3D library.
Definition: class_module.h:103
default
Definition: class_module.h:76
std::unique_ptr< typename std::remove_const< T >::type > Clone(const T &aItem)
Definition: pns_item.h:270
int GetPlacementCost180() const
Definition: class_module.h:548
const wxString & GetDescription() const
Definition: class_module.h:225
void SetLocalSolderPasteMargin(int aMargin)
Definition: class_module.h:241
double GetLocalSolderPasteMarginRatio() const
Definition: class_module.h:243
std::list< MODULE_3D_SETTINGS > & Models()
Definition: class_module.h:208
#define MODULE_is_LOCKED
module LOCKED: no autoplace allowed
Definition: class_module.h:291
int m_CntRot180
Definition: class_module.h:710
Board layer functions and definitions.
void SetLocked(bool isLocked) override
Function SetLocked sets the MODULE_is_LOCKED bit in the m_ModuleStatus.
Definition: class_module.h:307
VECTOR3D m_Rotation
3D model rotation (degrees)
Definition: class_module.h:101
Class BOARD holds information pertinent to a Pcbnew printed circuit board.
Definition: class_board.h:161
int GetFlag() const
Definition: class_module.h:260
int m_ModuleStatus
Definition: class_module.h:692
Virtual component: when created by copper shapes on board (Like edge card connectors,...
Definition: class_module.h:79
Used when the right click button is pressed, or when the select tool is in effect.
Definition: collectors.h:240
const PADS & Pads() const
Definition: class_module.h:181
wxString GetClass() const override
Function GetClass returns the class name.
Definition: class_module.h:573
Class EDA_RECT handles the component boundary box.
Definition: eda_rect.h:44
void SetLastEditTime()
Definition: class_module.h:344
void SetValue(const wxString &aValue)
Function SetValue.
Definition: class_module.h:466
TEXTE_MODULE * m_Value
Definition: class_module.h:689
Class EDA_ITEM is a base class for most all the KiCad significant classes, used in schematics and boa...
Definition: base_struct.h:163
TEXTE_MODULE & Reference() const
Definition: class_module.h:477
MODULE_ZONE_CONTAINER is the same item as ZONE_CONTAINER, but with a specific type id ZONE_CONTAINER ...
Definition: class_zone.h:827
VECTOR3D m_Scale
3D model scaling factor (dimensionless)
Definition: class_module.h:100
wxPoint m_Pos
Definition: class_module.h:687
static bool GetLayer(MODEL_VRML &aModel, LAYER_NUM layer, VRML_LAYER **vlayer)
bool PadsLocked() const
Definition: class_module.h:333
void SetKeywords(const wxString &aKeywords)
Definition: class_module.h:229
TEXTE_MODULE * m_Reference
Definition: class_module.h:688
uint32_t timestamp_t
timestamp_t is our type to represent unique IDs for all kinds of elements; historically simply the ti...
Definition: common.h:53
SHAPE_POLY_SET & GetPolyCourtyardBack()
Definition: class_module.h:663
Abstract interface for BOARD_ITEMs capable of storing other items inside.
Class EDA_MSG_ITEM is used EDA_MSG_PANEL as the item type for displaying messages.
Definition: msgpanel.h:53
Class VIEW.
Definition: view.h:61
SEARCH_RESULT
Definition: base_struct.h:54
int GetThermalWidth() const
Definition: class_module.h:250
ZoneConnection m_ZoneConnection
Definition: class_module.h:695
INCLUDE_NPTH_T
Definition: class_module.h:62
void Flip(T &aValue)
const wxPoint GetPosition() const override
Definition: class_module.h:213
int GetThermalGap() const
Definition: class_module.h:253
void SetFPID(const LIB_ID &aFPID)
Definition: class_module.h:223
class PCB_BASE_FRAME basic PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
void SetPath(const wxString &aPath)
Definition: class_module.h:232
EDA_UNITS_T
Definition: common.h:133
TEXTE_MODULE & Value() const
The const versions to keep the compiler happy.
Definition: class_module.h:476
void SetFlag(int aFlag)
Definition: class_module.h:258
ZoneConnection GetZoneConnection() const
Definition: class_module.h:247
void SetAttributes(int aAttributes)
Definition: class_module.h:256
KICAD_T Type() const
Function Type()
Definition: base_struct.h:210
int m_Attributs
Definition: class_module.h:691
void SetDescription(const wxString &aDoc)
Definition: class_module.h:226