KiCad PCB EDA Suite
board_item.h File Reference
#include <eda_item.h>
#include <eda_units.h>
#include <convert_to_biu.h>
#include <gr_basic.h>
#include <layers_id_colors_and_visibility.h>
#include <geometry/geometry_utils.h>
#include <wx/msgdlg.h>

Go to the source code of this file.

Classes

class  BOARD_ITEM
 A base class for any item which can be embedded within the BOARD container class, and therefore instances of derived classes should only be found in Pcbnew or other programs that use class BOARD and its contents. More...
 
struct  BOARD_ITEM::ptr_cmp
 
class  DELETED_BOARD_ITEM
 A singleton item of this class is returned for a weak reference that no longer exists. More...
 

Enumerations

enum  PCB_SHAPE_TYPE_T {
  S_SEGMENT = 0, S_RECT, S_ARC, S_CIRCLE,
  S_POLYGON, S_CURVE, S_LAST
}
 The set of shapes for PCB graphics and tracks and footprint graphics in the .m_Shape member. More...
 

Functions

static wxString PCB_SHAPE_TYPE_T_asString (PCB_SHAPE_TYPE_T a)
 
 DECLARE_ENUM_TO_WXANY (PCB_LAYER_ID)
 

Enumeration Type Documentation

◆ PCB_SHAPE_TYPE_T

The set of shapes for PCB graphics and tracks and footprint graphics in the .m_Shape member.

Enumerator
S_SEGMENT 

usual segment : line with rounded ends

S_RECT 

segment with non rounded ends

S_ARC 

Arcs (with rounded ends)

S_CIRCLE 

ring

S_POLYGON 

polygon (not yet used for tracks, but could be in microwave apps)

S_CURVE 

Bezier Curve.

S_LAST 

last value for this list

Definition at line 48 of file board_item.h.

49 {
50  S_SEGMENT = 0,
51  S_RECT,
52  S_ARC,
53  S_CIRCLE,
54  S_POLYGON,
55  S_CURVE,
56  S_LAST
57 };
polygon (not yet used for tracks, but could be in microwave apps)
Definition: board_item.h:54
usual segment : line with rounded ends
Definition: board_item.h:50
Arcs (with rounded ends)
Definition: board_item.h:52
segment with non rounded ends
Definition: board_item.h:51
last value for this list
Definition: board_item.h:56
ring
Definition: board_item.h:53
Bezier Curve.
Definition: board_item.h:55

Function Documentation

◆ DECLARE_ENUM_TO_WXANY()

DECLARE_ENUM_TO_WXANY ( PCB_LAYER_ID  )

◆ PCB_SHAPE_TYPE_T_asString()

static wxString PCB_SHAPE_TYPE_T_asString ( PCB_SHAPE_TYPE_T  a)
inlinestatic

Definition at line 59 of file board_item.h.

60 {
61  switch( a )
62  {
63  case S_SEGMENT: return "S_SEGMENT";
64  case S_RECT: return "S_RECT";
65  case S_ARC: return "S_ARC";
66  case S_CIRCLE: return "S_CIRCLE";
67  case S_POLYGON: return "S_POLYGON";
68  case S_CURVE: return "S_CURVE";
69  case S_LAST: return "S_LAST"; // Synthetic value, but if we come across it we're
70  // going to want to know.
71  }
72 
73  return wxEmptyString; // Just to quiet GCC.
74 };
polygon (not yet used for tracks, but could be in microwave apps)
Definition: board_item.h:54
usual segment : line with rounded ends
Definition: board_item.h:50
Arcs (with rounded ends)
Definition: board_item.h:52
segment with non rounded ends
Definition: board_item.h:51
last value for this list
Definition: board_item.h:56
ring
Definition: board_item.h:53
Bezier Curve.
Definition: board_item.h:55

References S_ARC, S_CIRCLE, S_CURVE, S_LAST, S_POLYGON, S_RECT, and S_SEGMENT.

Referenced by BOARD_ADAPTER::addShapeWithClearance(), GRAPHICS_CLEANER::areEquivalent(), PCB_SHAPE::Flip(), PCB_IO::format(), PCB_SHAPE::GetBoundingBox(), PCB_SHAPE::GetCenter(), PCB_SHAPE::HitTest(), GRAPHICS_CLEANER::isNullSegment(), PCB_SHAPE::MakeEffectiveShapes(), PCB_SHAPE::Rotate(), and PCB_SHAPE::TransformShapeWithClearanceToPolygon().