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
28 * most of these values are also required by files outside the source tree
32 #ifndef __GLOBALCONST_INCLUDED__
33 #define __GLOBALCONST_INCLUDED__
45 /* ---------------------------------------------------------------------------
46 * some file-, directory- and environment names
48 #define EMERGENCY_NAME "PCB.%.8i.save" /* %i --> pid */
49 #define BACKUP_NAME "PCB.%.8i.backup" /* %i --> pid */
51 /* ---------------------------------------------------------------------------
54 #define DEFAULT_SIZE "7000x5000" /* default layout size */
55 #define DEFAULT_MEDIASIZE "a4" /* default output media */
56 #define DEFAULT_CELLSIZE 50 /* default cell size for symbols */
57 #define CLICK_TIME 200 /* default time for click expiration */
58 #define SCROLL_TIME 25 /* time between scrolls when drawing beyond border */
59 #define COLUMNS 8 /* number of columns for found pin report */
61 /* ---------------------------------------------------------------------------
62 * frame between the groundplane and the copper
64 #define GROUNDPLANEFRAME MIL_TO_COORD(15)
65 #define MASKFRAME MIL_TO_COORD(3)
67 /* ---------------------------------------------------------------------------
68 * some limit specifications
70 #define LARGE_VALUE (COORD_MAX / 2 - 1) /* maximum extent of board and elements */
72 #define MAX_LAYER 16 /* max number of layer, check source */
73 /* code for more changes, a *lot* more changes */
74 #define MAX_GROUP MAX_LAYER /* max number of layer groups (should be equal to MAX_LAYER) */
76 #define MIN_LINESIZE MIL_TO_COORD(0.01) /* thickness of lines */
77 #define MAX_LINESIZE LARGE_VALUE
78 #define MIN_TEXTSCALE 10 /* scaling of text objects in percent */
79 #define MAX_TEXTSCALE 10000
80 #define MIN_PINORVIASIZE MIL_TO_COORD(20) /* size of a pin or via */
81 #define MIN_PINORVIAHOLE MIL_TO_COORD(4) /* size of a pins or vias drilling hole */
82 #define MAX_PINORVIASIZE LARGE_VALUE
83 #define MIN_PINORVIACOPPER MIL_TO_COORD(4) /* min difference outer-inner diameter */
84 #define MIN_PADSIZE MIL_TO_COORD(1) /* min size of a pad */
85 #define MAX_PADSIZE LARGE_VALUE /* max size of a pad */
86 #define MIN_DRC_VALUE MIL_TO_COORD(0.1)
87 #define MAX_DRC_VALUE MIL_TO_COORD(500)
88 #define MIN_DRC_SILK MIL_TO_COORD(1)
89 #define MAX_DRC_SILK MIL_TO_COORD(30)
90 #define MIN_DRC_DRILL MIL_TO_COORD(1)
91 #define MAX_DRC_DRILL MIL_TO_COORD(50)
92 #define MIN_DRC_RING 0
93 #define MAX_DRC_RING MIL_TO_COORD(100)
95 #define MAX_GRID MIL_TO_COORD(1000)
96 #define MAX_FONTPOSITION 255 /* upper limit of characters in my font */
98 #define MAX_COORD LARGE_VALUE /* coordinate limits */
99 #define MIN_SIZE MIL_TO_COORD(10) /* lowest width and height of the board */
100 #define MAX_BUFFER 5 /* number of pastebuffers */
101 /* additional changes in menu.c are */
102 /* also required to select more buffers */
104 #define DEFAULT_DRILLINGHOLE 40 /* default inner/outer ratio for */
105 /* pins/vias in percent */
107 #if MAX_LINESIZE > MAX_PINORVIASIZE /* maximum size value */
108 #define MAX_SIZE MAX_LINESIZE
110 #define MAX_SIZE MAX_PINORVIASIZE
113 #ifndef MAXPATHLEN /* maximum path length */
115 #define MAXPATHLEN PATH_MAX
117 #define MAXPATHLEN 2048
121 #define MAX_LINE_POINT_DISTANCE 0 /* maximum distance when searching */
123 #define MAX_POLYGON_POINT_DISTANCE 0 /* maximum distance when searching */
125 #define MAX_ARC_POINT_DISTANCE 0 /* maximum distance when searching */
127 #define MAX_ELEMENTNAMES 3 /* number of supported names of */
129 #define MAX_LIBRARY_LINE_LENGTH 255 /* maximum line length in the */
130 /* library-description file */
131 #define MAX_NETLIST_LINE_LENGTH 255 /* maximum line length for netlist files */
132 #define MAX_MODESTACK_DEPTH 16 /* maximum depth of mode stack */
133 #define MAX_CROSSHAIRSTACK_DEPTH 16 /* maximum depth of state stack */
134 #define MIN_GRID_DISTANCE 4 /* minimum distance between point */
135 /* to enable grid drawing */
136 /* size of diamond element mark */
137 #define EMARK_SIZE MIL_TO_COORD (10)
139 /* (Approximate) capheight size of the default PCB font */
140 #define FONT_CAPHEIGHT MIL_TO_COORD (45)