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 <layer_ids.h>
#include <geometry/geometry_utils.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  SHAPE_T : int {
  SHAPE_T::SEGMENT = 0, SHAPE_T::RECT, SHAPE_T::ARC, SHAPE_T::CIRCLE,
  SHAPE_T::POLY, SHAPE_T::BEZIER, SHAPE_T::LAST
}
 The set of shapes for PCB graphics and tracks and footprint graphics in the .m_Shape member. More...
 

Functions

static wxString SHAPE_T_asString (SHAPE_T a)
 
 DECLARE_ENUM_TO_WXANY (PCB_LAYER_ID)
 

Enumeration Type Documentation

◆ SHAPE_T

enum SHAPE_T : int
strong

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

Enumerator
SEGMENT 

usual segment : line with rounded ends

RECT 

segment with non rounded ends

ARC 

Arcs (with rounded ends)

CIRCLE 

ring

POLY 

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

BEZIER 

Bezier Curve.

LAST 

last value for this list

Definition at line 46 of file board_item.h.

46  : int
47 {
48  SEGMENT = 0,
49  RECT,
50  ARC,
51  CIRCLE,
52  POLY,
53  BEZIER,
54  LAST
55 };
polygon (not yet used for tracks, but could be in microwave apps)
usual segment : line with rounded ends
last value for this list
segment with non rounded ends

Function Documentation

◆ DECLARE_ENUM_TO_WXANY()

DECLARE_ENUM_TO_WXANY ( PCB_LAYER_ID  )

◆ SHAPE_T_asString()

static wxString SHAPE_T_asString ( SHAPE_T  a)
inlinestatic

Definition at line 57 of file board_item.h.

58 {
59  switch( a )
60  {
61  case SHAPE_T::SEGMENT: return "S_SEGMENT";
62  case SHAPE_T::RECT: return "S_RECT";
63  case SHAPE_T::ARC: return "S_ARC";
64  case SHAPE_T::CIRCLE: return "S_CIRCLE";
65  case SHAPE_T::POLY: return "S_POLYGON";
66  case SHAPE_T::BEZIER: return "S_CURVE";
67  case SHAPE_T::LAST: return "S_LAST"; // Synthetic value, but if we come across it we're
68  // going to want to know.
69  }
70 
71  return wxEmptyString; // Just to quiet GCC.
72 };
Arcs (with rounded ends)
Bezier Curve.
polygon (not yet used for tracks, but could be in microwave apps)
usual segment : line with rounded ends
last value for this list
segment with non rounded ends

References ARC, BEZIER, CIRCLE, LAST, POLY, RECT, and 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::isNullShape(), PCB_SHAPE::MakeEffectiveShapes(), PCB_SHAPE::Rotate(), and PCB_SHAPE::TransformShapeWithClearanceToPolygon().