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

Go to the source code of this file.

Classes

class  SHAPE_BASE
 
class  SHAPE
 An abstract shape on 2D plane. 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
}
 Lists all supported shapes. More...
 

Functions

static wxString SHAPE_TYPE_asString (SHAPE_TYPE a)
 

Enumeration Type Documentation

◆ SHAPE_TYPE

enum SHAPE_TYPE

Lists all supported shapes.

Enumerator
SH_RECT 

axis-aligned rectangle

SH_SEGMENT 

line segment

SH_LINE_CHAIN 

line chain (polyline)

SH_CIRCLE 

circle

SH_SIMPLE 

simple polygon

SH_POLY_SET 

set of polygons (with holes, etc.)

SH_COMPOUND 

compound shape, consisting of multiple simple shapes

SH_ARC 

circular arc

SH_NULL 

empty shape (no shape...),

SH_POLY_SET_TRIANGLE 

a single triangle belonging to a POLY_SET triangulation

Definition at line 43 of file shape.h.

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

Function Documentation

◆ SHAPE_TYPE_asString()

static wxString SHAPE_TYPE_asString ( SHAPE_TYPE  a)
inlinestatic

Definition at line 57 of file shape.h.

58{
59 switch( a )
60 {
61 case SH_RECT: return wxT( "SH_RECT" );
62 case SH_SEGMENT: return wxT( "SH_SEGMENT" );
63 case SH_LINE_CHAIN: return wxT( "SH_LINE_CHAIN" );
64 case SH_CIRCLE: return wxT( "SH_CIRCLE" );
65 case SH_SIMPLE: return wxT( "SH_SIMPLE" );
66 case SH_POLY_SET: return wxT( "SH_POLY_SET" );
67 case SH_COMPOUND: return wxT( "SH_COMPOUND" );
68 case SH_ARC: return wxT( "SH_ARC" );
69 case SH_NULL: return wxT( "SH_NULL" );
70 case SH_POLY_SET_TRIANGLE: return wxT( "SH_POLY_SET_TRIANGLE" );
71 }
72
73 return wxEmptyString; // Just to quiet GCC.
74}

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 PNS::buildHullForPrimitiveShape(), collideSingleShapes(), BOARD_ADAPTER::createPadWithMargin(), STROKE_PARAMS::Stroke(), and SHAPE_BASE::TypeName().