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-2017 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 
35 #include <list>
36 #include <dlist.h>
37 #include <layers_id_colors_and_visibility.h> // ALL_LAYERS definition.
38 #include <class_board_item.h>
39 #include <board_item_container.h>
40 #include <collectors.h>
41 #include <lib_id.h>
42 
43 #include <class_text_mod.h>
44 #include <PolyLine.h>
45 #include "zones.h"
46 
47 #include <core/iterators.h>
48 
49 #include <functional>
50 
51 class LINE_READER;
52 class EDA_3D_CANVAS;
53 class EDA_DRAW_PANEL;
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 
108 {
109 public:
110  MODULE( BOARD* parent );
111 
112  MODULE( const MODULE& aModule );
113 
114  ~MODULE();
115 
116  MODULE& operator=( const MODULE& aOther );
117 
118  static inline bool ClassOf( const EDA_ITEM* aItem )
119  {
120  return PCB_MODULE_T == aItem->Type();
121  }
122 
123  MODULE* Next() const { return static_cast<MODULE*>( Pnext ); }
124  MODULE* Back() const { return static_cast<MODULE*>( Pback ); }
125 
127  void Add( BOARD_ITEM* aItem, ADD_MODE aMode = ADD_INSERT ) override;
128 
130  void Remove( BOARD_ITEM* aItem ) override;
131 
139  void ClearAllNets();
140 
145  void CalculateBoundingBox();
146 
152  EDA_RECT GetFootprintRect() const;
153 
158  SHAPE_POLY_SET GetBoundingPoly() const;
159 
160  // Virtual function
161  const EDA_RECT GetBoundingBox() const override;
162 
163  DLIST<D_PAD>& PadsList() { return m_Pads; }
164  const DLIST<D_PAD>& PadsList() const { return m_Pads; }
165 
166  DLIST<BOARD_ITEM>& GraphicalItemsList() { return m_Drawings; }
167  const DLIST<BOARD_ITEM>& GraphicalItemsList() const { return m_Drawings; }
168 
170  {
171  return DLIST_ITERATOR_WRAPPER<D_PAD>( m_Pads );
172  }
173 
175  {
176  return DLIST_ITERATOR_WRAPPER<BOARD_ITEM>( m_Drawings );
177  }
178 
179  std::list<MODULE_3D_SETTINGS>& Models() { return m_3D_Drawings; }
180  const std::list<MODULE_3D_SETTINGS>& Models() const { return m_3D_Drawings; }
181 
182  void SetPosition( const wxPoint& aPos ) override;
183 
184  const wxPoint GetPosition() const override { return m_Pos; }
185 
186  void SetOrientation( double newangle );
187 
188  void SetOrientationDegrees( double aOrientation ) { SetOrientation( aOrientation * 10.0 ); }
189  double GetOrientation() const { return m_Orient; }
190  double GetOrientationDegrees() const { return m_Orient / 10.0; }
191  double GetOrientationRadians() const { return m_Orient * M_PI / 1800; }
192 
193  const LIB_ID& GetFPID() const { return m_fpid; }
194  void SetFPID( const LIB_ID& aFPID ) { m_fpid = aFPID; }
195 
196  const wxString& GetDescription() const { return m_Doc; }
197  void SetDescription( const wxString& aDoc ) { m_Doc = aDoc; }
198 
199  const wxString& GetKeywords() const { return m_KeyWord; }
200  void SetKeywords( const wxString& aKeywords ) { m_KeyWord = aKeywords; }
201 
202  const wxString& GetPath() const { return m_Path; }
203  void SetPath( const wxString& aPath ) { m_Path = aPath; }
204 
205  int GetLocalSolderMaskMargin() const { return m_LocalSolderMaskMargin; }
206  void SetLocalSolderMaskMargin( int aMargin ) { m_LocalSolderMaskMargin = aMargin; }
207 
208  int GetLocalClearance() const { return m_LocalClearance; }
209  void SetLocalClearance( int aClearance ) { m_LocalClearance = aClearance; }
210 
211  int GetLocalSolderPasteMargin() const { return m_LocalSolderPasteMargin; }
212  void SetLocalSolderPasteMargin( int aMargin ) { m_LocalSolderPasteMargin = aMargin; }
213 
214  double GetLocalSolderPasteMarginRatio() const { return m_LocalSolderPasteMarginRatio; }
215  void SetLocalSolderPasteMarginRatio( double aRatio ) { m_LocalSolderPasteMarginRatio = aRatio; }
216 
217  void SetZoneConnection( ZoneConnection aType ) { m_ZoneConnection = aType; }
218  ZoneConnection GetZoneConnection() const { return m_ZoneConnection; }
219 
220  void SetThermalWidth( int aWidth ) { m_ThermalWidth = aWidth; }
221  int GetThermalWidth() const { return m_ThermalWidth; }
222 
223  void SetThermalGap( int aGap ) { m_ThermalGap = aGap; }
224  int GetThermalGap() const { return m_ThermalGap; }
225 
226  int GetAttributes() const { return m_Attributs; }
227  void SetAttributes( int aAttributes ) { m_Attributs = aAttributes; }
228 
229  void SetFlag( int aFlag ) { m_arflag = aFlag; }
230  void IncrementFlag() { m_arflag += 1; }
231  int GetFlag() const { return m_arflag; }
232 
233  // A bit of a hack until net ties are supported as first class citizens
234  bool IsNetTie() const { return GetKeywords().StartsWith( wxT( "net tie" ) ); }
235 
236  void Move( const wxPoint& aMoveVector ) override;
237 
238  void Rotate( const wxPoint& aRotCentre, double aAngle ) override;
239 
240  void Flip( const wxPoint& aCentre ) override;
241 
253  void MoveAnchorPosition( const wxPoint& aMoveVector );
254 
259  bool IsFlipped() const { return GetLayer() == B_Cu; }
260 
261 // m_ModuleStatus bits:
262 #define MODULE_is_LOCKED 0x01
263 #define MODULE_is_PLACED 0x02
264 #define MODULE_to_PLACE 0x04
265 #define MODULE_PADS_LOCKED 0x08
266 
267 
268  bool IsLocked() const override
269  {
270  return ( m_ModuleStatus & MODULE_is_LOCKED ) != 0;
271  }
272 
278  void SetLocked( bool isLocked ) override
279  {
280  if( isLocked )
281  m_ModuleStatus |= MODULE_is_LOCKED;
282  else
283  m_ModuleStatus &= ~MODULE_is_LOCKED;
284  }
285 
286  bool IsPlaced() const { return m_ModuleStatus & MODULE_is_PLACED; }
287  void SetIsPlaced( bool isPlaced )
288  {
289  if( isPlaced )
290  m_ModuleStatus |= MODULE_is_PLACED;
291  else
292  m_ModuleStatus &= ~MODULE_is_PLACED;
293  }
294 
295  bool NeedsPlaced() const { return m_ModuleStatus & MODULE_to_PLACE; }
296  void SetNeedsPlaced( bool needsPlaced )
297  {
298  if( needsPlaced )
299  m_ModuleStatus |= MODULE_to_PLACE;
300  else
301  m_ModuleStatus &= ~MODULE_to_PLACE;
302  }
303 
304  bool PadsLocked() const { return m_ModuleStatus & MODULE_PADS_LOCKED; }
305 
306  void SetPadsLocked( bool aPadsLocked )
307  {
308  if( aPadsLocked )
309  m_ModuleStatus |= MODULE_PADS_LOCKED;
310  else
311  m_ModuleStatus &= ~MODULE_PADS_LOCKED;
312  }
313 
314  void SetLastEditTime( timestamp_t aTime ) { m_LastEditTime = aTime; }
315  void SetLastEditTime() { m_LastEditTime = time( NULL ); }
316  timestamp_t GetLastEditTime() const { return m_LastEditTime; }
317 
318  /* drawing functions */
319 
328  void Draw( EDA_DRAW_PANEL* aPanel,
329  wxDC* aDC,
330  GR_DRAWMODE aDrawMode,
331  const wxPoint& aOffset = ZeroOffset ) override;
332 
342  void DrawOutlinesWhenMoving( EDA_DRAW_PANEL* aPanel,
343  wxDC* aDC, const wxPoint& aMoveVector );
344 
368  void TransformPadsShapesWithClearanceToPolygon( PCB_LAYER_ID aLayer,
369  SHAPE_POLY_SET& aCornerBuffer,
370  int aInflateValue,
371  int aCircleToSegmentsCount,
372  double aCorrectionFactor,
373  bool aSkipNPTHPadsWihNoCopper = false ) const;
374 
395  void TransformGraphicShapesWithClearanceToPolygonSet( PCB_LAYER_ID aLayer,
396  SHAPE_POLY_SET& aCornerBuffer,
397  int aInflateValue,
398  int aCircleToSegmentsCount,
399  double aCorrectionFactor,
400  int aCircleToSegmentsCountForTexts = 0,
401  bool aIncludeText = true ) const;
402 
414  void TransformGraphicTextWithClearanceToPolygonSet( PCB_LAYER_ID aLayer,
415  SHAPE_POLY_SET& aCornerBuffer,
416  int aInflateValue,
417  int aCircleToSegmentsCount,
418  double aCorrectionFactor,
419  int aCircleToSegmentsCountForTexts = 0 ) const;
420 
429  void DrawEdgesOnly( EDA_DRAW_PANEL* panel, wxDC* DC, const wxPoint& offset,
430  GR_DRAWMODE draw_mode );
431 
438  void DrawAncre( EDA_DRAW_PANEL* panel, wxDC* DC,
439  const wxPoint& offset, int dim_ancre, GR_DRAWMODE draw_mode );
440 
442  void GetMsgPanelInfo( EDA_UNITS_T aUnits, std::vector<MSG_PANEL_ITEM>& aList ) override;
443 
444  bool HitTest( const wxPoint& aPosition ) const override;
445 
455  bool HitTestAccurate( const wxPoint& aPosition ) const;
456 
457  bool HitTest( const EDA_RECT& aRect, bool aContained = true, int aAccuracy = 0 ) const override;
458 
463  const wxString& GetReference() const
464  {
465  return m_Reference->GetText();
466  }
467 
473  void SetReference( const wxString& aReference )
474  {
475  m_Reference->SetText( aReference );
476  }
477 
485  wxString GetReferencePrefix() const;
486 
491  void IncrementReference( int aDelta );
492 
497  const wxString& GetValue() const
498  {
499  return m_Value->GetText();
500  }
501 
506  void SetValue( const wxString& aValue )
507  {
508  m_Value->SetText( aValue );
509  }
510 
512  TEXTE_MODULE& Value() { return *m_Value; }
513  TEXTE_MODULE& Reference() { return *m_Reference; }
514 
516  TEXTE_MODULE& Value() const { return *m_Value; }
517  TEXTE_MODULE& Reference() const { return *m_Reference; }
518 
527  D_PAD* FindPadByName( const wxString& aPadName ) const;
528 
537  D_PAD* GetPad( const wxPoint& aPosition, LSET aLayerMask = LSET::AllLayersMask() );
538 
539  D_PAD* GetTopLeftPad();
540 
549  unsigned GetPadCount( INCLUDE_NPTH_T aIncludeNPTH = INCLUDE_NPTH_T(INCLUDE_NPTH) ) const;
550 
563  unsigned GetUniquePadCount( INCLUDE_NPTH_T aIncludeNPTH = INCLUDE_NPTH_T(INCLUDE_NPTH) ) const;
564 
573  wxString GetNextPadName( bool aFillSequenceGaps ) const;
574 
575  double GetArea( int aPadding = 0 ) const;
576 
577  timestamp_t GetLink() const { return m_Link; }
578  void SetLink( timestamp_t aLink ) { m_Link = aLink; }
579 
580  int GetPlacementCost180() const { return m_CntRot180; }
581  void SetPlacementCost180( int aCost ) { m_CntRot180 = aCost; }
582 
583  int GetPlacementCost90() const { return m_CntRot90; }
584  void SetPlacementCost90( int aCost ) { m_CntRot90 = aCost; }
585 
591  BOARD_ITEM* Duplicate( const BOARD_ITEM* aItem,
592  bool aIncrementPadNumbers,
593  bool aAddToModule = false );
594 
601  void Add3DModel( MODULE_3D_SETTINGS* a3DModel );
602 
603  SEARCH_RESULT Visit( INSPECTOR inspector, void* testData, const KICAD_T scanTypes[] ) override;
604 
605  wxString GetClass() const override
606  {
607  return wxT( "MODULE" );
608  }
609 
610  wxString GetSelectMenuText( EDA_UNITS_T aUnits ) const override;
611 
612  BITMAP_DEF GetMenuImage() const override;
613 
614  EDA_ITEM* Clone() const override;
615 
622  void RunOnChildren( const std::function<void (BOARD_ITEM*)>& aFunction );
623 
632  void GetAllDrawingLayers( int aLayers[], int& aCount, bool aIncludePads = true ) const;
633 
634  virtual void ViewGetLayers( int aLayers[], int& aCount ) const override;
635 
636  virtual unsigned int ViewGetLOD( int aLayer, KIGFX::VIEW* aView ) const override;
637 
638  virtual const BOX2I ViewBBox() const override;
639 
656  void CopyNetlistSettings( MODULE* aModule, bool aCopyLocalSettings );
657 
665  static bool IsLibNameValid( const wxString& aName );
666 
675  static const wxChar* StringLibNameInvalidChars( bool aUserReadable );
676 
692  void SetInitialComments( wxArrayString* aInitialComments )
693  {
694  delete m_initial_comments;
695  m_initial_comments = aInitialComments;
696  }
697 
704  double CoverageRatio( const GENERAL_COLLECTOR& aCollector ) const;
705 
707  const wxArrayString* GetInitialComments() const { return m_initial_comments; }
708 
712  SHAPE_POLY_SET& GetPolyCourtyardFront() { return m_poly_courtyard_front; }
713  SHAPE_POLY_SET& GetPolyCourtyardBack() { return m_poly_courtyard_back; }
714 
722  bool BuildPolyCourtyard();
723 
724  virtual void SwapData( BOARD_ITEM* aImage ) override;
725 
726 #if defined(DEBUG)
727  virtual void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
728 #endif
729 
730 private:
733  std::list<MODULE_3D_SETTINGS> m_3D_Drawings;
734  double m_Orient;
742 
743  // The final margin is the sum of these 2 values
746  wxString m_Doc;
747  wxString m_KeyWord;
748  wxString m_Path;
751  int m_arflag;
755 
756  // Local tolerances. When zero, this means the corresponding netclass value
757  // is used. Usually theses local tolerances zero, in deference to the
758  // corresponding netclass values.
763 
765  wxArrayString* m_initial_comments;
766 
772 };
773 
774 #endif // MODULE_H_
int GetFlag() const
Definition: class_module.h:231
LIB_ID m_fpid
The LIB_ID of the MODULE.
Definition: class_module.h:738
SHAPE_POLY_SET & GetPolyCourtyardFront()
Used in DRC to test the courtyard area (a complex polygon)
Definition: class_module.h:712
timestamp_t GetLink() const
Definition: class_module.h:577
#define MODULE_to_PLACE
In autoplace: module waiting for autoplace.
Definition: class_module.h:264
void SetPlacementCost90(int aCost)
Definition: class_module.h:584
KICAD_T Type() const
Function Type()
Definition: base_struct.h:201
Class LINE_READER is an abstract class from which implementation specific LINE_READERs may be derived...
Definition: richio.h:81
const DLIST< D_PAD > & PadsList() const
Definition: class_module.h:164
TEXTE_MODULE & Reference()
Definition: class_module.h:513
void SetThermalGap(int aGap)
Definition: class_module.h:223
int m_CntRot90
Horizontal automatic placement cost ( 0..10 ).
Definition: class_module.h:753
int GetThermalGap() const
Definition: class_module.h:224
void IncrementFlag()
Definition: class_module.h:230
SHAPE_POLY_SET m_poly_courtyard_back
Definition: class_module.h:771
PNG memory record (file in memory).
Definition: bitmap_types.h:43
long timestamp_t
timestamp_t is our type to represent unique IDs for all kinds of elements; historically simply the ti...
Definition: common.h:52
void SetLocalClearance(int aClearance)
Definition: class_module.h:209
Class CAIRO_GAL is the cairo implementation of the graphics abstraction layer.
Definition: class_module.h:58
wxString m_KeyWord
Search keywords to find module in library.
Definition: class_module.h:747
wxString m_Path
Definition: class_module.h:748
void SetPlacementCost180(int aCost)
Definition: class_module.h:581
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 GetLocalClearance() const
Definition: class_module.h:208
int m_ThermalWidth
Definition: class_module.h:744
void SetInitialComments(wxArrayString *aInitialComments)
Function SetInitialComments takes ownership of caller&#39;s heap allocated aInitialComments block...
Definition: class_module.h:692
Classes BOARD_ITEM and BOARD_CONNECTED_ITEM.
double m_LocalSolderPasteMarginRatio
Solder mask margin ratio value of pad size.
Definition: class_module.h:762
ZoneConnection
How pads are covered by copper in zone.
Definition: zones.h:50
MODULE * Next() const
Definition: class_module.h:123
int m_LocalSolderPasteMargin
Solder paste margin absolute value.
Definition: class_module.h:761
int m_ThermalGap
Definition: class_module.h:745
DLIST_ITERATOR_WRAPPER< D_PAD > Pads()
Definition: class_module.h:169
void SetNeedsPlaced(bool needsPlaced)
Definition: class_module.h:296
Set for modules listed in the automatic insertion list (usually SMD footprints)
Definition: class_module.h:77
Class EDA_3D_CANVAS Implement a canvas based on a wxGLCanvas.
Definition: eda_3d_canvas.h:53
const wxString & GetValue() const
Function GetValue.
Definition: class_module.h:497
void SetZoneConnection(ZoneConnection aType)
Definition: class_module.h:217
void SetOrientationDegrees(double aOrientation)
Definition: class_module.h:188
timestamp_t GetLastEditTime() const
Definition: class_module.h:316
bool NeedsPlaced() const
Definition: class_module.h:295
ZoneConnection GetZoneConnection() const
Definition: class_module.h:218
int GetPlacementCost90() const
Definition: class_module.h:583
A logical library item identifier and consists of various portions much like a URI.
Definition: lib_id.h:51
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:765
void SetLocalSolderPasteMarginRatio(double aRatio)
Definition: class_module.h:215
double GetLocalSolderPasteMarginRatio() const
Definition: class_module.h:214
#define MODULE_PADS_LOCKED
In autoplace: module waiting for autoplace.
Definition: class_module.h:265
KICAD_T
Enum KICAD_T is the set of class identification values, stored in EDA_ITEM::m_StructType.
Definition: typeinfo.h:78
VECTOR3D m_Offset
3D model offset (mm)
Definition: class_module.h:102
wxString m_Doc
File name and path for documentation file.
Definition: class_module.h:746
timestamp_t m_LastEditTime
Definition: class_module.h:750
#define MODULE_is_PLACED
In autoplace: module automatically placed.
Definition: class_module.h:263
int m_LocalClearance
Definition: class_module.h:759
const INSPECTOR_FUNC & INSPECTOR
Definition: base_struct.h:102
const LIB_ID & GetFPID() const
Definition: class_module.h:193
double m_Orient
Orientation in tenths of a degree, 900=90.0 degrees.
Definition: class_module.h:734
bool PadsLocked() const
Definition: class_module.h:304
DLIST_ITERATOR_WRAPPER< BOARD_ITEM > GraphicalItems()
Definition: class_module.h:174
bool IsNetTie() const
Definition: class_module.h:234
class MODULE, a footprint
Definition: typeinfo.h:89
TEXTE_MODULE & Reference() const
Definition: class_module.h:517
PCB_LAYER_ID
A quick note on layer IDs:
EDA_RECT m_BoundaryBox
Bounding box : coordinates on board, real orientation.
Definition: class_module.h:741
Class LSET is a set of PCB_LAYER_IDs.
Footprint text class description.
double GetOrientationDegrees() const
Definition: class_module.h:190
void SetLink(timestamp_t aLink)
Definition: class_module.h:578
double GetOrientation() const
Definition: class_module.h:189
GR_DRAWMODE
Drawmode. Compositing mode plus a flag or two.
Definition: gr_basic.h:37
Class SHAPE_POLY_SET.
TEXTE_MODULE & Value()
read/write accessors:
Definition: class_module.h:512
const std::list< MODULE_3D_SETTINGS > & Models() const
Definition: class_module.h:180
bool IsFlipped() const
function IsFlipped
Definition: class_module.h:259
void SetLastEditTime(timestamp_t aTime)
Definition: class_module.h:314
timestamp_t m_Link
Temporary logical link used during editing.
Definition: class_module.h:752
static bool ClassOf(const EDA_ITEM *aItem)
Definition: class_module.h:118
void SetThermalWidth(int aWidth)
Definition: class_module.h:220
int m_LocalSolderMaskMargin
Solder mask margin.
Definition: class_module.h:760
std::list< MODULE_3D_SETTINGS > m_3D_Drawings
Linked list of 3D models.
Definition: class_module.h:733
int GetAttributes() const
Definition: class_module.h:226
int m_arflag
Use to trace ratsnest and auto routing.
Definition: class_module.h:751
const wxString & GetKeywords() const
Definition: class_module.h:199
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:306
void SetReference(const wxString &aReference)
Function SetReference.
Definition: class_module.h:473
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:770
void SetIsPlaced(bool isPlaced)
Definition: class_module.h:287
MODULE * Back() const
Definition: class_module.h:124
const DLIST< BOARD_ITEM > & GraphicalItemsList() const
Definition: class_module.h:167
int GetLocalSolderMaskMargin() const
Definition: class_module.h:205
bool IsLocked() const override
Function IsLocked.
Definition: class_module.h:268
double GetOrientationRadians() const
Definition: class_module.h:191
void SetLocalSolderMaskMargin(int aMargin)
Definition: class_module.h:206
int GetLocalSolderPasteMargin() const
Definition: class_module.h:211
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:380
void SetLocalSolderPasteMargin(int aMargin)
Definition: class_module.h:212
std::list< MODULE_3D_SETTINGS > & Models()
Definition: class_module.h:179
#define MODULE_is_LOCKED
module LOCKED: no autoplace allowed
Definition: class_module.h:262
TEXTE_MODULE & Value() const
The const versions to keep the compiler happy.
Definition: class_module.h:516
int m_CntRot180
Vertical automatic placement cost ( 0..10 ).
Definition: class_module.h:754
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:278
const wxString & GetDescription() const
Definition: class_module.h:196
VECTOR3D m_Rotation
3D model rotation (degrees)
Definition: class_module.h:101
DLIST< BOARD_ITEM > m_Drawings
Linked list of graphical items.
Definition: class_module.h:732
Class BOARD holds information pertinent to a Pcbnew printed circuit board.
Definition: class_board.h:170
const wxString & GetReference() const
Function GetReference.
Definition: class_module.h:463
int m_ModuleStatus
For autoplace: flags (LOCKED, AUTOPLACED)
Definition: class_module.h:740
Virtual component: when created by copper shapes on board (Like edge card connectors, mounting hole...)
Definition: class_module.h:79
Used when the right click button is pressed, or when the select tool is in effect.
Definition: collectors.h:245
wxString GetClass() const override
Function GetClass returns the class name.
Definition: class_module.h:605
Class EDA_RECT handles the component boundary box.
Definition: eda_rect.h:44
void SetLastEditTime()
Definition: class_module.h:315
void SetValue(const wxString &aValue)
Function SetValue.
Definition: class_module.h:506
TEXTE_MODULE * m_Value
Component value (74LS00, 22K..)
Definition: class_module.h:737
Class EDA_ITEM is a base class for most all the KiCad significant classes, used in schematics and boa...
Definition: base_struct.h:154
VECTOR3D m_Scale
3D model scaling factor (dimensionless)
Definition: class_module.h:100
wxPoint m_Pos
Position of module on the board in internal units.
Definition: class_module.h:735
static bool GetLayer(MODEL_VRML &aModel, LAYER_NUM layer, VRML_LAYER **vlayer)
void SetKeywords(const wxString &aKeywords)
Definition: class_module.h:200
DLIST< BOARD_ITEM > & GraphicalItemsList()
Definition: class_module.h:166
TEXTE_MODULE * m_Reference
Component reference designator value (U34, R18..)
Definition: class_module.h:736
DLIST< D_PAD > & PadsList()
Definition: class_module.h:163
SHAPE_POLY_SET & GetPolyCourtyardBack()
Definition: class_module.h:713
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
const wxString & GetPath() const
Definition: class_module.h:202
SEARCH_RESULT
Definition: base_struct.h:66
DLIST< D_PAD > m_Pads
Linked list of pads.
Definition: class_module.h:731
ZoneConnection m_ZoneConnection
Definition: class_module.h:749
const wxArrayString * GetInitialComments() const
Return the initial comments block or NULL if none, without transfer of ownership. ...
Definition: class_module.h:707
bool IsPlaced() const
Definition: class_module.h:286
INCLUDE_NPTH_T
Definition: class_module.h:62
void Flip(T &aValue)
int GetPlacementCost180() const
Definition: class_module.h:580
static wxString GetNextPadName(wxString aPadName)
const wxPoint GetPosition() const override
Definition: class_module.h:184
void SetFPID(const LIB_ID &aFPID)
Definition: class_module.h:194
void SetPath(const wxString &aPath)
Definition: class_module.h:203
EDA_UNITS_T
Definition: common.h:159
int GetThermalWidth() const
Definition: class_module.h:221
void SetFlag(int aFlag)
Definition: class_module.h:229
void SetAttributes(int aAttributes)
Definition: class_module.h:227
int m_Attributs
Flag bits ( see Mod_Attribut )
Definition: class_module.h:739
void SetDescription(const wxString &aDoc)
Definition: class_module.h:197