4 * PCB, interactive printed circuit board design
5 * Copyright (C) 1994,1995,1996 Thomas Nau
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 * Contact addresses for paper mail and Email:
22 * Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
23 * Thomas.Nau@rz.uni-ulm.de
29 * most of these values are also required by files outside the source tree
33 #ifndef __GLOBALCONST_INCLUDED__
34 #define __GLOBALCONST_INCLUDED__
46 /* ---------------------------------------------------------------------------
47 * some file-, directory- and environment names
49 #define EMERGENCY_NAME "PCB.%.8i.save" /* %i --> pid */
50 #define BACKUP_NAME "PCB.%.8i.backup" /* %i --> pid */
52 /* ---------------------------------------------------------------------------
55 #define DEFAULT_SIZE "7000x5000" /* default layout size */
56 #define DEFAULT_MEDIASIZE "a4" /* default output media */
57 #define DEFAULT_CELLSIZE 50 /* default cell size for symbols */
58 #define CLICK_TIME 200 /* default time for click expiration */
59 #define SCROLL_TIME 25 /* time between scrolls when drawing beyond border */
60 #define COLUMNS 8 /* number of columns for found pin report */
62 /* ---------------------------------------------------------------------------
63 * frame between the groundplane and the copper
65 #define GROUNDPLANEFRAME MIL_TO_COORD(15)
66 #define MASKFRAME MIL_TO_COORD(3)
68 /* ---------------------------------------------------------------------------
69 * some limit specifications
71 #define LARGE_VALUE (COORD_MAX / 2 - 1) /* maximum extent of board and elements */
73 #define MAX_LAYER 16 /* max number of layer, check source */
74 /* code for more changes, a *lot* more changes */
75 #define DEF_LAYER 8 /* default number of layers for new boards */
77 #define MIN_LINESIZE MIL_TO_COORD(0.01) /* thickness of lines */
78 #define MAX_LINESIZE LARGE_VALUE
79 #define MIN_TEXTSCALE 10 /* scaling of text objects in percent */
80 #define MAX_TEXTSCALE 10000
81 #define MIN_PINORVIASIZE MIL_TO_COORD(20) /* size of a pin or via */
82 #define MIN_PINORVIAHOLE MIL_TO_COORD(4) /* size of a pins or vias drilling hole */
83 #define MAX_PINORVIASIZE LARGE_VALUE
84 #define MIN_PINORVIACOPPER MIL_TO_COORD(4) /* min difference outer-inner diameter */
85 #define MIN_PADSIZE MIL_TO_COORD(1) /* min size of a pad */
86 #define MAX_PADSIZE LARGE_VALUE /* max size of a pad */
87 #define MIN_DRC_VALUE MIL_TO_COORD(0.1)
88 #define MAX_DRC_VALUE MIL_TO_COORD(500)
89 #define MIN_DRC_SILK MIL_TO_COORD(1)
90 #define MAX_DRC_SILK MIL_TO_COORD(30)
91 #define MIN_DRC_DRILL MIL_TO_COORD(1)
92 #define MAX_DRC_DRILL MIL_TO_COORD(50)
93 #define MIN_DRC_RING 0
94 #define MAX_DRC_RING MIL_TO_COORD(100)
96 #define MAX_GRID MIL_TO_COORD(1000)
97 #define MAX_FONTPOSITION 255 /* upper limit of characters in my font */
99 #define MAX_COORD LARGE_VALUE /* coordinate limits */
100 #define MIN_SIZE MIL_TO_COORD(10) /* lowest width and height of the board */
101 #define MAX_BUFFER 5 /* number of pastebuffers */
102 /* additional changes in menu.c are */
103 /* also required to select more buffers */
105 #define DEFAULT_DRILLINGHOLE 40 /* default inner/outer ratio for */
106 /* pins/vias in percent */
108 #if MAX_LINESIZE > MAX_PINORVIASIZE /* maximum size value */
109 #define MAX_SIZE MAX_LINESIZE
111 #define MAX_SIZE MAX_PINORVIASIZE
114 #ifndef MAXPATHLEN /* maximum path length */
116 #define MAXPATHLEN PATH_MAX
118 #define MAXPATHLEN 2048
122 #define MAX_LINE_POINT_DISTANCE 0 /* maximum distance when searching */
124 #define MAX_POLYGON_POINT_DISTANCE 0 /* maximum distance when searching */
126 #define MAX_ELEMENTNAMES 3 /* number of supported names of */
128 #define MAX_LIBRARY_LINE_LENGTH 255 /* maximum line length in the */
129 /* library-description file */
130 #define MAX_NETLIST_LINE_LENGTH 255 /* maximum line length for netlist files */
131 #define MAX_MODESTACK_DEPTH 16 /* maximum depth of mode stack */
132 #define MAX_CROSSHAIRSTACK_DEPTH 16 /* maximum depth of state stack */
133 #define MIN_GRID_DISTANCE 4 /* minimum distance between point */
134 /* to enable grid drawing */
135 /* size of diamond element mark */
136 #define EMARK_SIZE MIL_TO_COORD (10)
138 /* (Approximate) capheight size of the default PCB font */
139 #define FONT_CAPHEIGHT MIL_TO_COORD (45)