omdl  v0.9.5
OpenSCAD Mechanical Design Library
cylindrical.scad
Go to the documentation of this file.
1 //! Cylindrical batteries data table
2 /***************************************************************************//**
3  \file
4  \author Roy Allen Sutton
5  \date 2023
6 
7  \copyright
8 
9  This file is part of [omdl] (https://github.com/royasutton/omdl),
10  an OpenSCAD mechanical design library.
11 
12  The \em omdl is free software; you can redistribute it and/or modify
13  it under the terms of the [GNU Lesser General Public License]
14  (http://www.gnu.org/licenses/lgpl.html) as published by the Free
15  Software Foundation; either version 2.1 of the License, or (at
16  your option) any later version.
17 
18  The \em omdl is distributed in the hope that it will be useful,
19  but WITHOUT ANY WARRANTY; without even the implied warranty of
20  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21  Lesser General Public License for more details.
22 
23  You should have received a copy of the GNU Lesser General Public
24  License along with the \em omdl; if not, write to the Free Software
25  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
26  02110-1301, USA; or see <http://www.gnu.org/licenses/>.
27 
28  \details
29 
30  \amu_define group_name (Cylindrical)
31  \amu_define group_brief (Cylindrical batteries data table.)
32 
33  \amu_include (include/amu/pgid_path_pstem_pg.amu)
34 *******************************************************************************/
35 
36 //----------------------------------------------------------------------------//
37 
38 /***************************************************************************//**
39  \amu_include (include/amu/group_in_parent_start.amu)
40  \amu_include (include/amu/includes_required.amu)
41 
42  \details
43 
44  \amu_define title (Cylindrical batteries)
45  \amu_define image_views (top right diag)
46  \amu_define image_size (sxga)
47  \amu_define notes_diagrams (See Wikipedia battery [sizes] for information.)
48  \amu_define notes_table (Measurements in millimeters.)
49 
50  \amu_include (include/amu/scope_diagrams_3d_table.amu)
51 
52  [sizes]: https://en.wikipedia.org/wiki/List_of_battery_sizes
53 *******************************************************************************/
54 
55 //----------------------------------------------------------------------------//
56 
57 //! <map> Cylindrical batteries data table columns map.
58 //! \hideinitializer
60 [
61  ["id", "battery identifier"],
62  ["d", "battery diameter"],
63  ["h", "battery height"]
64 ];
65 
66 //! <table> Cylindrical batteries data table rows.
67 //! \hideinitializer
69 [
70  ["aaaa", l_mm( 8.3), l_mm( 42.5)],
71  ["aaa", l_mm(10.5), l_mm( 44.5)],
72  ["aa", l_mm(14.5), l_mm( 50.5)],
73  ["h-aa", l_mm(14.5), l_mm( 25.0)],
74  ["a", l_mm(17 ), l_mm( 50 )],
75  ["b", l_mm(21.5), l_mm( 60 )],
76  ["c", l_mm(26.2), l_mm( 50 )],
77  ["s-c", l_mm(22.2), l_mm( 42.9)],
78  ["d", l_mm(34.2), l_mm( 61.5)],
79  ["f", l_mm(33 ), l_mm( 91 )],
80  ["n", l_mm(12 ), l_mm( 30.2)],
81  ["a21", l_mm(10.3), l_mm( 16 )],
82  ["a23", l_mm(10.5), l_mm( 28.5)],
83  ["a27", l_mm( 8 ), l_mm( 28.2)],
84  ["ba5800", l_mm(35.5), l_mm(128.5)],
85  ["duplex", l_mm(21.8), l_mm( 74.6)],
86  ["4sr44", l_mm(13 ), l_mm( 25.2)],
87 
88  // lithium-ion
89  ["10180", l_mm(10 ), l_mm( 18 )],
90  ["10280", l_mm(10 ), l_mm( 28 )],
91  ["10440", l_mm(10 ), l_mm( 44 )],
92  ["14650", l_mm(14 ), l_mm( 65 )],
93  ["16650", l_mm(16 ), l_mm( 65 )],
94  ["18650", l_mm(18 ), l_mm( 65 )],
95  ["21700", l_mm(21 ), l_mm( 70 )],
96  ["26500", l_mm(26 ), l_mm( 50 )],
97  ["32600", l_mm(32 ), l_mm( 60 )]
98 ];
99 
100 //! @}
101 //! @}
102 
103 //----------------------------------------------------------------------------//
104 // openscad-amu auxiliary scripts
105 //----------------------------------------------------------------------------//
106 
107 /*
108 BEGIN_SCOPE diagram;
109  BEGIN_OPENSCAD;
110  include <omdl-base.scad>;
111  include <tools/align.scad>;
112  include <tools/operation_cs.scad>;
113  include <tools/drafting/draft-base.scad>;
114  include <database/component/battery/cylindrical.scad>;
115 
116  $fn=36;
117 
118  d = 50; dt = d*3/10;
119  h = 100; ht = h*1/20;
120 
121  cylinder(d=d, h=h-ht);
122  color("lightgray")
123  translate([0,0,h-ht])
124  cylinder(d=dt, h=ht);
125 
126  if ( !is_undef(__mfs__top) )
127  color("black")
128  draft_dim_line(p1=[-d/2,0], p2=[+d/2,0], d=d*6/10, e=d*4/10, es=2, t="d");
129 
130  if ( !is_undef(__mfs__right) )
131  color("black")
132  translate([0, d/2, h/2]) rotate([0,90])
133  draft_dim_line(p1=[-h/2,0], p2=[+h/2,0], d=d*3/10, e=h*4/10, es=2, t="h");
134  END_OPENSCAD;
135 
136  BEGIN_MFSCRIPT;
137  include --path "${INCLUDE_PATH}" {var_init,var_gen_png2eps}.mfs;
138  table_unset_all sizes;
139 
140  images name "sizes" types "sxga";
141  views name "views" views "top right diag";
142 
143  variables set_opts_combine "sizes views";
144  variables add_opts "--viewall --autocenter";
145 
146  include --path "${INCLUDE_PATH}" scr_make_mf.mfs;
147  END_MFSCRIPT;
148 END_SCOPE;
149 
150 BEGIN_SCOPE table;
151  BEGIN_OPENSCAD;
152  include <omdl-base.scad>;
153  include <database/component/battery/cylindrical.scad>;
154 
155  tr = dtr_battery_cylindrical;
156  tc = dtc_battery_cylindrical;
157 
158  n = true;
159  hi = true;
160  ht = true;
161 
162  table_write( tr, tc, number=n, heading_id=hi, heading_text=ht );
163  END_OPENSCAD;
164 
165  BEGIN_MFSCRIPT;
166  include --path "${INCLUDE_PATH}" {var_init,var_gen_term}.mfs;
167  include --path "${INCLUDE_PATH}" scr_make_mf.mfs;
168  END_MFSCRIPT;
169 END_SCOPE;
170 */
171 
172 //----------------------------------------------------------------------------//
173 // end of file
174 //----------------------------------------------------------------------------//
dtr_battery_cylindrical
dtc_battery_cylindrical
function l_mm(v)
Shorthand length conversion for millimeters.