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>

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 : int {
  PCB_SHAPE_TYPE::SEGMENT = 0, PCB_SHAPE_TYPE::RECT, PCB_SHAPE_TYPE::ARC, PCB_SHAPE_TYPE::CIRCLE,
  PCB_SHAPE_TYPE::POLYGON, PCB_SHAPE_TYPE::CURVE, PCB_SHAPE_TYPE::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 a)
 
 DECLARE_ENUM_TO_WXANY (PCB_LAYER_ID)
 

Enumeration Type Documentation

◆ PCB_SHAPE_TYPE

enum PCB_SHAPE_TYPE : 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

POLYGON 

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

CURVE 

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  POLYGON,
53  CURVE,
54  LAST
55 };
segment with non rounded ends
last value for this list
usual segment : line with rounded ends

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  a)
inlinestatic

Definition at line 57 of file board_item.h.

58 {
59  switch( a )
60  {
61  case PCB_SHAPE_TYPE::SEGMENT: return "S_SEGMENT";
62  case PCB_SHAPE_TYPE::RECT: return "S_RECT";
63  case PCB_SHAPE_TYPE::ARC: return "S_ARC";
64  case PCB_SHAPE_TYPE::CIRCLE: return "S_CIRCLE";
65  case PCB_SHAPE_TYPE::POLYGON: return "S_POLYGON";
66  case PCB_SHAPE_TYPE::CURVE: return "S_CURVE";
67  case PCB_SHAPE_TYPE::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 };
polygon (not yet used for tracks, but could be in microwave apps)
segment with non rounded ends
last value for this list
usual segment : line with rounded ends
Arcs (with rounded ends)

References ARC, CIRCLE, CURVE, LAST, POLYGON, 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::isNullSegment(), PCB_SHAPE::MakeEffectiveShapes(), PCB_SHAPE::Rotate(), and PCB_SHAPE::TransformShapeWithClearanceToPolygon().