Horizon
ipc7251draft1.h
1 /*
2  * Copyright 2018 Martin Ã…berg
3  *
4  * This file is part of Footag.
5  *
6  * Footag is free software: you can redistribute it and/or modify it under the
7  * terms of the GNU General Public License as published by the Free Software
8  * Foundation, either version 3 of the License, or (at your option) any later
9  * version.
10  *
11  * Footag is distributed in the hope that it will be useful, but WITHOUT ANY
12  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
14  * details.
15  *
16  * You should have received a copy of the GNU General Public License along with
17  * this program. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef FOOTAG_IPC7251DRAFT1_H
21 #define FOOTAG_IPC7251DRAFT1_H
22 
23 /*
24  * This is an implementation of part of
25  * "IPC-7251: Generic Requirements for Through-Hole Design and Land Pattern
26  * Standard, 1st Working Draft - June 2008"
27  *
28  * The working draft is available on the IPC website.
29  *
30  * The following parts of the standard are covered by the implementation:
31  * - Land pattern dimension and spacing calculations
32  * - Courtyard properties
33  *
34  * These parts are not implemented:
35  * - Land pattern naming convention
36  *
37  * Note also that the following items are not part of IPC-7251 draft 1 or this
38  * implementation:
39  * - Silk screen
40  * - Assembly outline
41  */
42 
43 enum ipc7251_density {
44  IPC7251_DENSITY_M,
45  IPC7251_DENSITY_N,
46  IPC7251_DENSITY_L,
47  IPC7251_DENSITY_NUM,
48 };
49 
50 static const char IPC7251_DENSITY_TO_CHAR[IPC7251_DENSITY_NUM] = {'M','N','L'};
51 
52 struct ipc7251_ref {
53  const char *where;
54  const char *what;
55 };
56 
57 struct ipc7251_spec {
58  struct ipc7251_ref ref;
59  double holediam;
60  double paddiam;
61  double antipaddiam;
62  double round;
63  double cyexc;
64 };
65 
66 /* Return 0 iff success */
67 int ipc7251_get_spec(
68  struct ipc7251_spec *spec,
69  double leaddiam_max,
70  enum ipc7251_density density
71 );
72 
73 #endif
74 
ipc7251_ref
Definition: ipc7251draft1.h:52
ipc7251_spec
Definition: ipc7251draft1.h:57