KiCad PCB EDA Suite
drc.h File Reference
#include <vector>
#include <memory>
#include <geometry/seg.h>
#include <geometry/shape_poly_set.h>
#include <drc/drc_marker_factory.h>

Go to the source code of this file.

Classes

class  DRC_ITEM_LIST
 Provide an abstract interface of a DRC_ITEM* list manager. More...
 
class  DRC
 Design Rule Checker object that performs all the DRC tests. More...
 

Macros

#define OK_DRC   0
 
#define BAD_DRC   1
 
#define DRCE_   1
 DRC error codes: More...
 
#define DRCE_UNCONNECTED_ITEMS   2
 items are unconnected More...
 
#define DRCE_TRACK_NEAR_THROUGH_HOLE   3
 thru hole is too close to track More...
 
#define DRCE_TRACK_NEAR_PAD   4
 pad too close to track More...
 
#define DRCE_TRACK_NEAR_VIA   5
 track too close to via More...
 
#define DRCE_VIA_NEAR_VIA   6
 via too close to via More...
 
#define DRCE_VIA_NEAR_TRACK   7
 via too close to track More...
 
#define DRCE_TRACK_ENDS1   8
 2 parallel track segments too close: fine start point test More...
 
#define DRCE_TRACK_ENDS2   9
 2 parallel track segments too close: fine start point test More...
 
#define DRCE_TRACK_ENDS3   10
 2 parallel track segments too close: fine end point test More...
 
#define DRCE_TRACK_ENDS4   11
 2 parallel track segments too close: fine end point test More...
 
#define DRCE_TRACK_SEGMENTS_TOO_CLOSE   12
 2 parallel track segments too close: segm ends between segref ends More...
 
#define DRCE_TRACKS_CROSSING   13
 tracks are crossing More...
 
#define DRCE_ENDS_PROBLEM1   14
 track ends are too close More...
 
#define DRCE_ENDS_PROBLEM2   15
 track ends are too close More...
 
#define DRCE_ENDS_PROBLEM3   16
 track ends are too close More...
 
#define DRCE_ENDS_PROBLEM4   17
 track ends are too close More...
 
#define DRCE_ENDS_PROBLEM5   18
 track ends are too close More...
 
#define DRCE_PAD_NEAR_PAD1   19
 pad too close to pad More...
 
#define DRCE_VIA_HOLE_BIGGER   20
 via's hole is bigger than its diameter More...
 
#define DRCE_MICRO_VIA_INCORRECT_LAYER_PAIR   21
 micro via's layer pair incorrect (layers must be adjacent) More...
 
#define DRCE_ZONES_INTERSECT   22
 copper area outlines intersect More...
 
#define DRCE_ZONES_TOO_CLOSE   23
 copper area outlines are too close More...
 
#define DRCE_SUSPICIOUS_NET_FOR_ZONE_OUTLINE   24
 copper area has a net but no pads in nets, which is suspicious More...
 
#define DRCE_HOLE_NEAR_PAD   25
 hole too close to pad More...
 
#define DRCE_HOLE_NEAR_TRACK   26
 hole too close to track More...
 
#define DRCE_TOO_SMALL_TRACK_WIDTH   27
 Too small track width. More...
 
#define DRCE_TOO_SMALL_VIA   28
 Too small via size. More...
 
#define DRCE_TOO_SMALL_MICROVIA   29
 Too small micro via size. More...
 
#define DRCE_TOO_SMALL_VIA_DRILL   30
 Too small via drill. More...
 
#define DRCE_TOO_SMALL_MICROVIA_DRILL   31
 Too small micro via drill. More...
 
#define DRCE_NETCLASS_TRACKWIDTH   32
 netclass has TrackWidth < board.m_designSettings->m_TrackMinWidth More...
 
#define DRCE_NETCLASS_CLEARANCE   33
 netclass has Clearance < board.m_designSettings->m_TrackClearance More...
 
#define DRCE_NETCLASS_VIASIZE   34
 netclass has ViaSize < board.m_designSettings->m_ViasMinSize More...
 
#define DRCE_NETCLASS_VIADRILLSIZE   35
 netclass has ViaDrillSize < board.m_designSettings->m_ViasMinDrill More...
 
#define DRCE_NETCLASS_uVIASIZE   36
 netclass has ViaSize < board.m_designSettings->m_MicroViasMinSize More...
 
#define DRCE_NETCLASS_uVIADRILLSIZE   37
 netclass has ViaSize < board.m_designSettings->m_MicroViasMinDrill More...
 
#define DRCE_VIA_INSIDE_KEEPOUT   38
 Via in inside a keepout area. More...
 
#define DRCE_TRACK_INSIDE_KEEPOUT   39
 Track in inside a keepout area. More...
 
#define DRCE_PAD_INSIDE_KEEPOUT   40
 Pad in inside a keepout area. More...
 
#define DRCE_TRACK_NEAR_COPPER   41
 track & copper graphic collide or are too close More...
 
#define DRCE_VIA_NEAR_COPPER   42
 via and copper graphic collide or are too close More...
 
#define DRCE_PAD_NEAR_COPPER   43
 pad and copper graphic collide or are too close More...
 
#define DRCE_TRACK_NEAR_ZONE   44
 track & zone collide or are too close together More...
 
#define DRCE_OVERLAPPING_FOOTPRINTS   45
 footprint courtyards overlap More...
 
#define DRCE_MISSING_COURTYARD_IN_FOOTPRINT   46
 footprint has no courtyard defined More...
 
#define DRCE_MALFORMED_COURTYARD_IN_FOOTPRINT   47
 footprint has a courtyard but malformed More...
 
#define DRCE_MICRO_VIA_NOT_ALLOWED   48
 micro vias are not allowed More...
 
#define DRCE_BURIED_VIA_NOT_ALLOWED   49
 buried vias are not allowed More...
 
#define DRCE_DISABLED_LAYER_ITEM   50
 item on a disabled layer More...
 
#define DRCE_DRILLED_HOLES_TOO_CLOSE   51
 overlapping drilled holes break drill bits More...
 
#define DRCE_TRACK_NEAR_EDGE   53
 track too close to board edge More...
 
#define DRCE_INVALID_OUTLINE   54
 invalid board outline More...
 

Typedefs

typedef std::vector< DRC_ITEM * > DRC_LIST
 

Macro Definition Documentation

◆ BAD_DRC

#define BAD_DRC   1

Definition at line 40 of file drc.h.

◆ DRCE_

#define DRCE_   1

DRC error codes:

Definition at line 48 of file drc.h.

◆ DRCE_BURIED_VIA_NOT_ALLOWED

#define DRCE_BURIED_VIA_NOT_ALLOWED   49

buried vias are not allowed

Definition at line 97 of file drc.h.

◆ DRCE_DISABLED_LAYER_ITEM

#define DRCE_DISABLED_LAYER_ITEM   50

item on a disabled layer

Definition at line 98 of file drc.h.

◆ DRCE_DRILLED_HOLES_TOO_CLOSE

#define DRCE_DRILLED_HOLES_TOO_CLOSE   51

overlapping drilled holes break drill bits

Definition at line 99 of file drc.h.

◆ DRCE_ENDS_PROBLEM1

#define DRCE_ENDS_PROBLEM1   14

track ends are too close

Definition at line 61 of file drc.h.

◆ DRCE_ENDS_PROBLEM2

#define DRCE_ENDS_PROBLEM2   15

track ends are too close

Definition at line 62 of file drc.h.

◆ DRCE_ENDS_PROBLEM3

#define DRCE_ENDS_PROBLEM3   16

track ends are too close

Definition at line 63 of file drc.h.

◆ DRCE_ENDS_PROBLEM4

#define DRCE_ENDS_PROBLEM4   17

track ends are too close

Definition at line 64 of file drc.h.

◆ DRCE_ENDS_PROBLEM5

#define DRCE_ENDS_PROBLEM5   18

track ends are too close

Definition at line 65 of file drc.h.

◆ DRCE_HOLE_NEAR_PAD

#define DRCE_HOLE_NEAR_PAD   25

hole too close to pad

Definition at line 72 of file drc.h.

◆ DRCE_HOLE_NEAR_TRACK

#define DRCE_HOLE_NEAR_TRACK   26

hole too close to track

Definition at line 73 of file drc.h.

◆ DRCE_INVALID_OUTLINE

#define DRCE_INVALID_OUTLINE   54

invalid board outline

Definition at line 101 of file drc.h.

◆ DRCE_MALFORMED_COURTYARD_IN_FOOTPRINT

#define DRCE_MALFORMED_COURTYARD_IN_FOOTPRINT   47

footprint has a courtyard but malformed

(not convertible to a closed polygon with holes)

Definition at line 94 of file drc.h.

◆ DRCE_MICRO_VIA_INCORRECT_LAYER_PAIR

#define DRCE_MICRO_VIA_INCORRECT_LAYER_PAIR   21

micro via's layer pair incorrect (layers must be adjacent)

Definition at line 68 of file drc.h.

◆ DRCE_MICRO_VIA_NOT_ALLOWED

#define DRCE_MICRO_VIA_NOT_ALLOWED   48

micro vias are not allowed

Definition at line 96 of file drc.h.

◆ DRCE_MISSING_COURTYARD_IN_FOOTPRINT

#define DRCE_MISSING_COURTYARD_IN_FOOTPRINT   46

footprint has no courtyard defined

Definition at line 93 of file drc.h.

◆ DRCE_NETCLASS_CLEARANCE

#define DRCE_NETCLASS_CLEARANCE   33

netclass has Clearance < board.m_designSettings->m_TrackClearance

Definition at line 80 of file drc.h.

◆ DRCE_NETCLASS_TRACKWIDTH

#define DRCE_NETCLASS_TRACKWIDTH   32

netclass has TrackWidth < board.m_designSettings->m_TrackMinWidth

Definition at line 79 of file drc.h.

◆ DRCE_NETCLASS_uVIADRILLSIZE

#define DRCE_NETCLASS_uVIADRILLSIZE   37

netclass has ViaSize < board.m_designSettings->m_MicroViasMinDrill

Definition at line 84 of file drc.h.

◆ DRCE_NETCLASS_uVIASIZE

#define DRCE_NETCLASS_uVIASIZE   36

netclass has ViaSize < board.m_designSettings->m_MicroViasMinSize

Definition at line 83 of file drc.h.

◆ DRCE_NETCLASS_VIADRILLSIZE

#define DRCE_NETCLASS_VIADRILLSIZE   35

netclass has ViaDrillSize < board.m_designSettings->m_ViasMinDrill

Definition at line 82 of file drc.h.

◆ DRCE_NETCLASS_VIASIZE

#define DRCE_NETCLASS_VIASIZE   34

netclass has ViaSize < board.m_designSettings->m_ViasMinSize

Definition at line 81 of file drc.h.

◆ DRCE_OVERLAPPING_FOOTPRINTS

#define DRCE_OVERLAPPING_FOOTPRINTS   45

footprint courtyards overlap

Definition at line 92 of file drc.h.

◆ DRCE_PAD_INSIDE_KEEPOUT

#define DRCE_PAD_INSIDE_KEEPOUT   40

Pad in inside a keepout area.

Definition at line 87 of file drc.h.

◆ DRCE_PAD_NEAR_COPPER

#define DRCE_PAD_NEAR_COPPER   43

pad and copper graphic collide or are too close

Definition at line 90 of file drc.h.

◆ DRCE_PAD_NEAR_PAD1

#define DRCE_PAD_NEAR_PAD1   19

pad too close to pad

Definition at line 66 of file drc.h.

◆ DRCE_SUSPICIOUS_NET_FOR_ZONE_OUTLINE

#define DRCE_SUSPICIOUS_NET_FOR_ZONE_OUTLINE   24

copper area has a net but no pads in nets, which is suspicious

Definition at line 71 of file drc.h.

◆ DRCE_TOO_SMALL_MICROVIA

#define DRCE_TOO_SMALL_MICROVIA   29

Too small micro via size.

Definition at line 76 of file drc.h.

◆ DRCE_TOO_SMALL_MICROVIA_DRILL

#define DRCE_TOO_SMALL_MICROVIA_DRILL   31

Too small micro via drill.

Definition at line 78 of file drc.h.

◆ DRCE_TOO_SMALL_TRACK_WIDTH

#define DRCE_TOO_SMALL_TRACK_WIDTH   27

Too small track width.

Definition at line 74 of file drc.h.

◆ DRCE_TOO_SMALL_VIA

#define DRCE_TOO_SMALL_VIA   28

Too small via size.

Definition at line 75 of file drc.h.

◆ DRCE_TOO_SMALL_VIA_DRILL

#define DRCE_TOO_SMALL_VIA_DRILL   30

Too small via drill.

Definition at line 77 of file drc.h.

◆ DRCE_TRACK_ENDS1

#define DRCE_TRACK_ENDS1   8

2 parallel track segments too close: fine start point test

Definition at line 55 of file drc.h.

◆ DRCE_TRACK_ENDS2

#define DRCE_TRACK_ENDS2   9

2 parallel track segments too close: fine start point test

Definition at line 56 of file drc.h.

◆ DRCE_TRACK_ENDS3

#define DRCE_TRACK_ENDS3   10

2 parallel track segments too close: fine end point test

Definition at line 57 of file drc.h.

◆ DRCE_TRACK_ENDS4

#define DRCE_TRACK_ENDS4   11

2 parallel track segments too close: fine end point test

Definition at line 58 of file drc.h.

◆ DRCE_TRACK_INSIDE_KEEPOUT

#define DRCE_TRACK_INSIDE_KEEPOUT   39

Track in inside a keepout area.

Definition at line 86 of file drc.h.

◆ DRCE_TRACK_NEAR_COPPER

#define DRCE_TRACK_NEAR_COPPER   41

track & copper graphic collide or are too close

Definition at line 88 of file drc.h.

◆ DRCE_TRACK_NEAR_EDGE

#define DRCE_TRACK_NEAR_EDGE   53

track too close to board edge

Definition at line 100 of file drc.h.

◆ DRCE_TRACK_NEAR_PAD

#define DRCE_TRACK_NEAR_PAD   4

pad too close to track

Definition at line 51 of file drc.h.

◆ DRCE_TRACK_NEAR_THROUGH_HOLE

#define DRCE_TRACK_NEAR_THROUGH_HOLE   3

thru hole is too close to track

Definition at line 50 of file drc.h.

◆ DRCE_TRACK_NEAR_VIA

#define DRCE_TRACK_NEAR_VIA   5

track too close to via

Definition at line 52 of file drc.h.

◆ DRCE_TRACK_NEAR_ZONE

#define DRCE_TRACK_NEAR_ZONE   44

track & zone collide or are too close together

Definition at line 91 of file drc.h.

◆ DRCE_TRACK_SEGMENTS_TOO_CLOSE

#define DRCE_TRACK_SEGMENTS_TOO_CLOSE   12

2 parallel track segments too close: segm ends between segref ends

Definition at line 59 of file drc.h.

◆ DRCE_TRACKS_CROSSING

#define DRCE_TRACKS_CROSSING   13

tracks are crossing

Definition at line 60 of file drc.h.

◆ DRCE_UNCONNECTED_ITEMS

#define DRCE_UNCONNECTED_ITEMS   2

items are unconnected

Definition at line 49 of file drc.h.

◆ DRCE_VIA_HOLE_BIGGER

#define DRCE_VIA_HOLE_BIGGER   20

via's hole is bigger than its diameter

Definition at line 67 of file drc.h.

◆ DRCE_VIA_INSIDE_KEEPOUT

#define DRCE_VIA_INSIDE_KEEPOUT   38

Via in inside a keepout area.

Definition at line 85 of file drc.h.

◆ DRCE_VIA_NEAR_COPPER

#define DRCE_VIA_NEAR_COPPER   42

via and copper graphic collide or are too close

Definition at line 89 of file drc.h.

◆ DRCE_VIA_NEAR_TRACK

#define DRCE_VIA_NEAR_TRACK   7

via too close to track

Definition at line 54 of file drc.h.

◆ DRCE_VIA_NEAR_VIA

#define DRCE_VIA_NEAR_VIA   6

via too close to via

Definition at line 53 of file drc.h.

◆ DRCE_ZONES_INTERSECT

#define DRCE_ZONES_INTERSECT   22

copper area outlines intersect

Definition at line 69 of file drc.h.

◆ DRCE_ZONES_TOO_CLOSE

#define DRCE_ZONES_TOO_CLOSE   23

copper area outlines are too close

Definition at line 70 of file drc.h.

◆ OK_DRC

#define OK_DRC   0

Definition at line 39 of file drc.h.

Typedef Documentation

◆ DRC_LIST

typedef std::vector<DRC_ITEM*> DRC_LIST

Definition at line 165 of file drc.h.