KiCad PCB EDA Suite
shape.h File Reference
#include <sstream>
#include <vector>
#include <geometry/seg.h>
#include <math/vector2d.h>
#include <math/box2.h>

Go to the source code of this file.

Classes

class  SHAPE_BASE
 
class  SHAPE
 SHAPE. More...
 
class  SHAPE_LINE_CHAIN_BASE
 

Enumerations

enum  SHAPE_TYPE {
  SH_RECT = 0, SH_SEGMENT, SH_LINE_CHAIN, SH_CIRCLE,
  SH_SIMPLE, SH_POLY_SET, SH_COMPOUND, SH_ARC,
  SH_NULL, SH_POLY_SET_TRIANGLE
}
 Enum SHAPE_TYPE Lists all supported shapes. More...
 

Functions

static wxString SHAPE_TYPE_asString (SHAPE_TYPE a)
 

Enumeration Type Documentation

◆ SHAPE_TYPE

enum SHAPE_TYPE

Enum SHAPE_TYPE Lists all supported shapes.

Enumerator
SH_RECT 
SH_SEGMENT 

axis-aligned rectangle

SH_LINE_CHAIN 

line segment

SH_CIRCLE 

line chain (polyline)

SH_SIMPLE 

circle

SH_POLY_SET 

simple polygon

SH_COMPOUND 

set of polygons (with holes, etc.)

SH_ARC 

compound shape, consisting of multiple simple shapes

SH_NULL 

circular arc

SH_POLY_SET_TRIANGLE 

empty shape (no shape...),

a single triangle belonging to a POLY_SET triangulation

Definition at line 41 of file shape.h.

42 {
43  SH_RECT = 0,
44  SH_SEGMENT,
46  SH_CIRCLE,
47  SH_SIMPLE,
48  SH_POLY_SET,
49  SH_COMPOUND,
50  SH_ARC,
51  SH_NULL,
53 };
set of polygons (with holes, etc.)
Definition: shape.h:49
compound shape, consisting of multiple simple shapes
Definition: shape.h:50
line chain (polyline)
Definition: shape.h:46
simple polygon
Definition: shape.h:48
empty shape (no shape...),
Definition: shape.h:52
circular arc
Definition: shape.h:51
line segment
Definition: shape.h:45
Definition: shape.h:43
circle
Definition: shape.h:47
axis-aligned rectangle
Definition: shape.h:44

Function Documentation

◆ SHAPE_TYPE_asString()

static wxString SHAPE_TYPE_asString ( SHAPE_TYPE  a)
inlinestatic

Definition at line 55 of file shape.h.

56 {
57  switch( a )
58  {
59  case SH_RECT: return "SH_RECT";
60  case SH_SEGMENT: return "SH_SEGMENT";
61  case SH_LINE_CHAIN: return "SH_LINE_CHAIN";
62  case SH_CIRCLE: return "SH_CIRCLE";
63  case SH_SIMPLE: return "SH_SIMPLE";
64  case SH_POLY_SET: return "SH_POLY_SET";
65  case SH_COMPOUND: return "SH_COMPOUND";
66  case SH_ARC: return "SH_ARC";
67  case SH_NULL: return "SH_NULL";
68  case SH_POLY_SET_TRIANGLE: return "SH_POLY_SET_TRIANGLE";
69  }
70 
71  return wxEmptyString; // Just to quiet GCC.
72 }
set of polygons (with holes, etc.)
Definition: shape.h:49
compound shape, consisting of multiple simple shapes
Definition: shape.h:50
line chain (polyline)
Definition: shape.h:46
simple polygon
Definition: shape.h:48
empty shape (no shape...),
Definition: shape.h:52
circular arc
Definition: shape.h:51
line segment
Definition: shape.h:45
Definition: shape.h:43
circle
Definition: shape.h:47
axis-aligned rectangle
Definition: shape.h:44

References SH_ARC, SH_CIRCLE, SH_COMPOUND, SH_LINE_CHAIN, SH_NULL, SH_POLY_SET, SH_POLY_SET_TRIANGLE, SH_RECT, SH_SEGMENT, and SH_SIMPLE.

Referenced by BOARD_ADAPTER::createNewPadWithClearance().