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>

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 42 of file shape.h.

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

Function Documentation

◆ SHAPE_TYPE_asString()

static wxString SHAPE_TYPE_asString ( SHAPE_TYPE  a)
inlinestatic

Definition at line 56 of file shape.h.

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

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().