forked from jpt13653903/FreePCB
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DesignRules.h
84 lines (80 loc) · 1.75 KB
/
DesignRules.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
//
#pragma once
struct DesignRules
{
BOOL bCheckUnrouted;
int trace_width;
int pad_pad;
int pad_trace;
int trace_trace;
int hole_copper;
int annular_ring_pins;
int annular_ring_vias;
int board_edge_copper;
int board_edge_hole;
int hole_hole;
int copper_copper;
};
class DRError
{
public:
DRError();
~DRError();
enum { // subtypes of errors
PAD_PAD = 0,
PAD_PADHOLE,
PADHOLE_PADHOLE,
SEG_PAD,
SEG_PADHOLE,
VIA_PAD,
VIA_PADHOLE,
VIAHOLE_PAD,
VIAHOLE_PADHOLE,
SEG_SEG,
SEG_VIA,
SEG_VIAHOLE,
VIA_VIA,
VIA_VIAHOLE,
VIAHOLE_VIAHOLE,
TRACE_WIDTH,
RING_PAD,
RING_VIA,
BOARDEDGE_PAD,
BOARDEDGE_PADHOLE,
BOARDEDGE_VIA,
BOARDEDGE_VIAHOLE,
BOARDEDGE_TRACE,
BOARDEDGE_COPPERAREA,
COPPERAREA_COPPERAREA,
COPPERAREA_INSIDE_COPPERAREA,
UNROUTED
};
int layer; // layer (if pad error)
id m_id; // id, using subtypes above
CString str; // descriptive string
CString name1, name2; // names of nets or parts tested
id id1, id2; // ids of items tested
int x, y; // position of error
dl_element * dl_el; // DRC graphic
dl_element * dl_sel; // DRC graphic selector
};
class DRErrorList
{
public:
DRErrorList();
~DRErrorList();
void SetLists( CPartList * pl, CNetList * nl, CDisplayList * dl );
void Clear();
DRError * Add( long index, int st, CString * str,
CString * name1, CString * name2, id id1, id id2,
int x1, int y1, int x2, int y2, int w, int layer );
void Remove( DRError * dre );
void HighLight( DRError * dre );
void MakeSolidCircles();
void MakeHollowCircles();
public:
CPartList * m_plist;
CNetList * m_nlist;
CDisplayList * m_dlist;
CPtrList list;
};