1 /* 2 * COPYRIGHT 3 * 4 * PCB, interactive printed circuit board design 5 * Copyright (C) 1994,1995,1996 Thomas Nau 6 * 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. 11 * 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. 16 * 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., 51 Franklin Street, Fifth Floor, Boston, 20 * MA 02110-1301 USA. 21 * 22 * Contact addresses for paper mail and Email: 23 * Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany 24 * Thomas.Nau@rz.uni-ulm.de 25 * 26 */ 27 28 /* global constants 29 * most of these values are also required by files outside the source tree 30 * (manuals...) 31 */ 32 33 #ifndef __GLOBALCONST_INCLUDED__ 34 #define __GLOBALCONST_INCLUDED__ 35 36 #ifdef HAVE_CONFIG_H 37 #include "config.h" 38 #endif 39 40 #include <limits.h> 41 42 #ifdef HAVE_STDINT_H 43 #include <stdint.h> 44 #endif 45 46 /* --------------------------------------------------------------------------- 47 * some file-, directory- and environment names 48 */ 49 #define EMERGENCY_NAME "PCB.%.8i.save" /* %i --> pid */ 50 #define BACKUP_NAME "PCB.%.8i.backup" /* %i --> pid */ 51 52 /* --------------------------------------------------------------------------- 53 * some default values 54 */ 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 */ 61 62 /* --------------------------------------------------------------------------- 63 * frame between the groundplane and the copper 64 */ 65 #define GROUNDPLANEFRAME MIL_TO_COORD(15) 66 #define MASKFRAME MIL_TO_COORD(3) 67 68 /* --------------------------------------------------------------------------- 69 * some limit specifications 70 */ 71 #define LARGE_VALUE (COORD_MAX / 2 - 1) /* maximum extent of board and elements */ 72 73 #define MAX_LAYER 16 /* max number of copper layers */ 74 #define MAX_GROUP MAX_LAYER /* max number of layer groups */ 75 #define NUM_STYLES 4 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_PADSIZE MIL_TO_COORD(1) /* min size of a pad */ 84 #define MAX_PADSIZE LARGE_VALUE /* max size of a pad */ 85 #define MIN_DRC_VALUE MIL_TO_COORD(0.1) 86 #define MAX_DRC_VALUE MIL_TO_COORD(500) 87 #define MIN_DRC_SILK MIL_TO_COORD(1) 88 #define MAX_DRC_SILK MIL_TO_COORD(30) 89 #define MIN_DRC_DRILL MIL_TO_COORD(1) 90 #define MAX_DRC_DRILL MIL_TO_COORD(50) 91 #define MIN_DRC_RING 0 92 #define MAX_DRC_RING MIL_TO_COORD(100) 93 #define MIN_GRID 1 94 #define MAX_GRID MIL_TO_COORD(1000) 95 #define MAX_FONTPOSITION 255 /* upper limit of characters in my font */ 96 97 #define MAX_COORD LARGE_VALUE /* coordinate limits */ 98 #define MIN_SIZE MIL_TO_COORD(10) /* lowest width and height of the board */ 99 #define MAX_BUFFER 5 /* number of pastebuffers */ 100 /* additional changes in menu.c are */ 101 /* also required to select more buffers */ 102 103 #define DEFAULT_DRILLINGHOLE 40 /* default inner/outer ratio for */ 104 /* pins/vias in percent */ 105 106 #if MAX_LINESIZE > MAX_PINORVIASIZE /* maximum size value */ 107 #define MAX_SIZE MAX_LINESIZE 108 #else 109 #define MAX_SIZE MAX_PINORVIASIZE 110 #endif 111 112 #ifndef MAXPATHLEN /* maximum path length */ 113 #ifdef PATH_MAX 114 #define MAXPATHLEN PATH_MAX 115 #else 116 #define MAXPATHLEN 2048 117 #endif 118 #endif 119 120 #define MAX_LINE_POINT_DISTANCE 0 /* maximum distance when searching */ 121 /* line points */ 122 #define MAX_POLYGON_POINT_DISTANCE 0 /* maximum distance when searching */ 123 /* polygon points */ 124 #define MAX_ARC_POINT_DISTANCE 0 /* maximum distance when searching */ 125 /* arc points */ 126 #define MAX_ELEMENTNAMES 3 /* number of supported names of */ 127 /* an element */ 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) 137 138 /* (Approximate) capheight size of the default PCB font */ 139 #define FONT_CAPHEIGHT MIL_TO_COORD (45) 140 #endif 141