omdl  v0.9.5
OpenSCAD Mechanical Design Library
anti_prisms.scad
Go to the documentation of this file.
1 //! Polyhedra data table: \c anti_prisms.
2 /***************************************************************************//**
3  \file
4  \author Roy Allen Sutton
5  \date 2017-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  This [omdl] formatted data table has been assembled using a script
31  that converts the polyhedra data obtained from [Anthony Thyssen]'s
32  [Studies into Polyhedra]. The vertices are tabulated in both their
33  original Cartesian as well as their converted spherical coordinate
34  form, which is convenient when scaling. The data originates from
35  one of three sources:
36 
37  \li Exact Mathematics as presented by [Anthony Thyssen],
38  \li the [Polyhedron Database] maintained by [Netlib], and
39  \li an [Encyclopedia of Polyhedra] by [George W. Hart].
40 
41  [omdl]: https://github.com/royasutton/omdl
42 
43  [Anthony Thyssen]: http://www.ict.griffith.edu.au/anthony/anthony.html
44  [Studies into Polyhedra]: http://www.ict.griffith.edu.au/anthony/graphics/polyhedra
45 
46  [George W. Hart]: http://www.georgehart.com
47  [Encyclopedia of Polyhedra]: http://www.georgehart.com/virtual-polyhedra/vp.html
48 
49  [Netlib]: http://www.netlib.org
50  [Polyhedron Database]: http://www.netlib.org/polyhedra
51 
52  \amu_pathid parent (++path_parent)
53  \amu_pathid group (++path)
54 
55  \ingroup \amu_eval(${group})
56 *******************************************************************************/
57 
58 //----------------------------------------------------------------------------//
59 /***************************************************************************//**
60  \addtogroup \amu_eval(${group})
61  @{
62  <br>
63  ### Anti Prisms ###
64  \amu_include (include/amu/includes_required.amu)
65 
66  \amu_eval
67  (
68  ++global
69  title="Examples"
70  stem=anti_prisms scope=db_dim size=qvga view=diag
71  )
72 
73  \amu_define object_stem (${stem}_${scope}_${size}_${view}_${shape})
74  \amu_make files_png (append=db_dim extension=png)
75  \amu_make files_stl (append=db_dim extension=stl)
76  \amu_word files_cnt (words="${files_png}" ++count)
77  \amu_seq cell_num (prefix="(" suffix=")" last="${files_cnt}" ++number)
78  \amu_eval object_prefix (shape="" ${object_stem})
79  \amu_filename cell_txt (files="${files_png}" separator="^" ++stem)
80  \amu_replace cell_id (text="${cell_txt}" search="${object_prefix}" replace="id: ")
81  \amu_replace cell_end (text="${cell_txt}" search="${object_prefix}")
82  \amu_replace cell_end (text="${cell_end}" search="_" replace="<br>")
83  \amu_combine cell_end (p="<center>" s="</center>" j="" f="^" t="^" ${cell_end})
84 
85  \htmlonly
86  \amu_image_table
87  (
88  type=html columns=4 image_width="200" cell_files="${files_png}"
89  table_caption="${title}" cell_captions="${cell_num}"
90  cell_titles="${cell_id}" cell_end="${cell_end}"
91  cell_urls="${files_stl}"
92  )
93  \endhtmlonly
94 
95  \amu_make eps_files (append=db_dim extension=png2eps)
96 
97  \latexonly
98  \amu_image_table
99  (
100  type=latex columns=4 image_width="1.25in" cell_files="${eps_files}"
101  table_caption="${title}" cell_captions="${cell_num}"
102  )
103  \endlatexonly
104 
105  \b Autostats
106 
107  \amu_scope scope (index=1)
108  \amu_file heading (file="${scope}.log" last=1 ++rmecho ++rmnl ++read ++quiet)
109  \amu_file texts (file="${scope}.log" first=2 ++rmecho ++rmnl ++read ++quiet)
110  \amu_word columns (tokenizer="^" words="${heading}" ++count)
111 
112  \amu_table table
113  (
114  columns=${columns} column_headings="${heading}" cell_texts="${texts}"
115  )
116 
117  \amu_if ( -w ${heading} )
118  { ${table} }
119  else
120  { \note Statistics table not available. To build and include, remove
121  \c db_autostat from \c scopes_exclude in library makefile.
122  For more information see \ref lb. }
123  endif
124 *******************************************************************************/
125 //----------------------------------------------------------------------------//
126 
127 //! <map> \c anti_prisms polyhedra data table columns definition.
128 //! \hideinitializer
130 [
131  ["id", "identifier"],
132  ["n", "name"],
133  ["o", "other name"],
134  ["g", "group"],
135  ["d", "data source"],
136  ["c", "cartesian vertices"],
137  ["s", "spherical vertices"],
138  ["f", "faces"],
139  ["e", "edges"]
140 ];
141 
142 //! <table> \c anti_prisms polyhedra data table rows.
143 //! \hideinitializer
145 [
146  [
147  "decagonal_antiprism",
148  "Decagonal Antiprism",
149  empty_str,
150  "anti_prisms",
151  "Polyhedron Database #31",
152  [
153  [-0.96627614511, 0.25750808025, 0.00000000000],
154  [-0.91898322435, -0.25750808025, 0.29859575010],
155  [-0.91898322435, -0.25750808025, -0.29859575010],
156  [-0.78173382265, 0.25750808025, 0.56796286774],
157  [-0.78173382265, 0.25750808025, -0.56796286774],
158  [-0.56796286774, -0.25750808025, 0.78173382265],
159  [-0.56796286774, -0.25750808025, -0.78173382265],
160  [-0.29859575010, 0.25750808025, 0.91898322435],
161  [-0.29859575010, 0.25750808025, -0.91898322435],
162  [ 0.00000000000, -0.25750808025, 0.96627614511],
163  [-0.00000000000, -0.25750808025, -0.96627614511],
164  [ 0.29859575010, 0.25750808025, 0.91898322435],
165  [ 0.29859575010, 0.25750808025, -0.91898322435],
166  [ 0.56796286774, -0.25750808025, 0.78173382265],
167  [ 0.56796286774, -0.25750808025, -0.78173382265],
168  [ 0.78173382265, 0.25750808025, 0.56796286774],
169  [ 0.78173382265, 0.25750808025, -0.56796286774],
170  [ 0.91898322435, -0.25750808025, 0.29859575010],
171  [ 0.91898322435, -0.25750808025, -0.29859575010],
172  [ 0.96627614511, 0.25750808025, 0.00000000000]
173  ],
174  [
175  [1.00000000000, 165.07774833349, 89.99999999998],
176  [1.00000000000, -164.34660886021, 72.62671986748],
177  [1.00000000000, -164.34660886022, 107.37328013251],
178  [1.00000000000, 161.76778911692, 55.39170785296],
179  [1.00000000000, 161.76778911692, 124.60829214706],
180  [1.00000000000, -155.61098626194, 38.58040216792],
181  [1.00000000000, -155.61098626190, 141.41959783208],
182  [1.00000000000, 139.22561430131, 23.22211397117],
183  [1.00000000000, 139.22561430129, 156.77788602884],
184  [1.00000000000, -89.99999999999, 14.92225166649],
185  [1.00000000000, -90.00000000002, 165.07774833348],
186  [1.00000000000, 40.77438569868, 23.22211397117],
187  [1.00000000000, 40.77438569868, 156.77788602883],
188  [1.00000000000, -24.38901373808, 38.58040216789],
189  [1.00000000000, -24.38901373808, 141.41959783206],
190  [1.00000000000, 18.23221088306, 55.39170785296],
191  [1.00000000000, 18.23221088307, 124.60829214706],
192  [1.00000000000, -15.65339113976, 72.62671986755],
193  [1.00000000000, -15.65339113978, 107.37328013249],
194  [1.00000000000, 14.92225166649, 89.99999999998]
195  ],
196  [
197  [13,17,18,14,10,6,2,1,5,9],
198  [3,0,4,8,12,16,19,15,11,7],
199  [8,10,12],
200  [6,10,8],
201  [4,6,8],
202  [2,6,4],
203  [0,2,4],
204  [1,2,0],
205  [3,1,0],
206  [5,1,3],
207  [7,5,3],
208  [9,5,7],
209  [11,9,7],
210  [13,9,11],
211  [15,13,11],
212  [17,13,15],
213  [19,17,15],
214  [18,17,19],
215  [16,18,19],
216  [14,18,16],
217  [12,14,16],
218  [10,14,12]
219  ],
220  [
221  [0,1],
222  [0,2],
223  [0,3],
224  [0,4],
225  [1,2],
226  [1,3],
227  [1,5],
228  [2,4],
229  [2,6],
230  [3,5],
231  [3,7],
232  [4,6],
233  [4,8],
234  [5,7],
235  [5,9],
236  [6,8],
237  [6,10],
238  [7,9],
239  [7,11],
240  [8,10],
241  [8,12],
242  [9,11],
243  [9,13],
244  [10,12],
245  [10,14],
246  [11,13],
247  [11,15],
248  [12,14],
249  [12,16],
250  [13,15],
251  [13,17],
252  [14,16],
253  [14,18],
254  [15,17],
255  [15,19],
256  [16,18],
257  [16,19],
258  [17,18],
259  [17,19],
260  [18,19]
261  ]
262  ],
263  [
264  "hexagonal_antiprism",
265  "Hexagonal Antiprism",
266  empty_str,
267  "anti_prisms",
268  "Polyhedron Database #29",
269  [
270  [-0.91940168676, 0.39331989319, -0.00000000000],
271  [-0.79622521702, -0.39331989319, 0.45970084338],
272  [-0.79622521702, -0.39331989319, -0.45970084338],
273  [-0.45970084338, 0.39331989319, 0.79622521702],
274  [-0.45970084338, 0.39331989319, -0.79622521702],
275  [ 0.00000000000, -0.39331989319, 0.91940168676],
276  [ 0.00000000000, -0.39331989319, -0.91940168676],
277  [ 0.45970084338, 0.39331989319, 0.79622521702],
278  [ 0.45970084338, 0.39331989319, -0.79622521702],
279  [ 0.79622521702, -0.39331989319, 0.45970084338],
280  [ 0.79622521702, -0.39331989319, -0.45970084338],
281  [ 0.91940168676, 0.39331989319, -0.00000000000]
282  ],
283  [
284  [1.00000000000, 156.83876877392, 90.00000000002],
285  [1.00000000000, -153.71151678612, 62.63219484139],
286  [1.00000000000, -153.71151678612, 117.36780515857],
287  [1.00000000000, 139.44971443987, 37.22886588833],
288  [1.00000000000, 139.44971443986, 142.77113411166],
289  [1.00000000000, -89.99999999999, 23.16123122606],
290  [1.00000000000, -89.99999999995, 156.83876877393],
291  [1.00000000000, 40.55028556012, 37.22886588833],
292  [1.00000000000, 40.55028556011, 142.77113411165],
293  [1.00000000000, -26.28848321388, 62.63219484133],
294  [1.00000000000, -26.28848321388, 117.36780515864],
295  [1.00000000000, 23.16123122606, 90.00000000002]
296  ],
297  [
298  [9,10,6,2,1,5],
299  [0,4,8,11,7,3],
300  [4,6,8],
301  [2,6,4],
302  [0,2,4],
303  [1,2,0],
304  [3,1,0],
305  [5,1,3],
306  [7,5,3],
307  [9,5,7],
308  [11,9,7],
309  [10,9,11],
310  [8,10,11],
311  [6,10,8]
312  ],
313  [
314  [0,1],
315  [0,2],
316  [0,3],
317  [0,4],
318  [1,2],
319  [1,3],
320  [1,5],
321  [2,4],
322  [2,6],
323  [3,5],
324  [3,7],
325  [4,6],
326  [4,8],
327  [5,7],
328  [5,9],
329  [6,8],
330  [6,10],
331  [7,9],
332  [7,11],
333  [8,10],
334  [8,11],
335  [9,10],
336  [9,11],
337  [10,11]
338  ]
339  ],
340  [
341  "octagonal_antiprism",
342  "Octagonal Antiprism",
343  empty_str,
344  "anti_prisms",
345  "Polyhedron Database #30",
346  [
347  [-0.94984865176, -0.31270999145, -0.00000000000],
348  [-0.87754572834, 0.31270999145, 0.36349134228],
349  [-0.87754572834, 0.31270999145, -0.36349134228],
350  [-0.67164442276, -0.31270999145, 0.67164442276],
351  [-0.67164442276, -0.31270999145, -0.67164442276],
352  [-0.36349134228, 0.31270999145, 0.87754572834],
353  [-0.36349134228, 0.31270999145, -0.87754572834],
354  [-0.00000000000, -0.31270999145, 0.94984865176],
355  [-0.00000000000, -0.31270999145, -0.94984865176],
356  [ 0.36349134228, 0.31270999145, 0.87754572834],
357  [ 0.36349134228, 0.31270999145, -0.87754572834],
358  [ 0.67164442276, -0.31270999145, 0.67164442276],
359  [ 0.67164442276, -0.31270999145, -0.67164442276],
360  [ 0.87754572834, 0.31270999145, 0.36349134228],
361  [ 0.87754572834, 0.31270999145, -0.36349134228],
362  [ 0.94984865176, -0.31270999145, -0.00000000000]
363  ],
364  [
365  [1.00000000000, -161.77737671140, 90.00000000004],
366  [1.00000000000, 160.38667322856, 68.68523321433],
367  [1.00000000000, 160.38667322856, 111.31476678565],
368  [1.00000000000, -155.03384957250, 47.80589064816],
369  [1.00000000000, -155.03384957249, 132.19410935186],
370  [1.00000000000, 139.29473544049, 28.65229139610],
371  [1.00000000000, 139.29473544048, 151.34770860390],
372  [1.00000000000, -90.00000000001, 18.22262328859],
373  [1.00000000000, -90.00000000001, 161.77737671138],
374  [1.00000000000, 40.70526455950, 28.65229139610],
375  [1.00000000000, 40.70526455950, 151.34770860390],
376  [1.00000000000, -24.96615042747, 47.80589064819],
377  [1.00000000000, -24.96615042752, 132.19410935182],
378  [1.00000000000, 19.61332677143, 68.68523321432],
379  [1.00000000000, 19.61332677143, 111.31476678565],
380  [1.00000000000, -18.22262328858, 90.00000000001]
381  ],
382  [
383  [11,15,12,8,4,0,3,7],
384  [1,2,6,10,14,13,9,5],
385  [6,8,10],
386  [4,8,6],
387  [2,4,6],
388  [0,4,2],
389  [1,0,2],
390  [3,0,1],
391  [5,3,1],
392  [7,3,5],
393  [9,7,5],
394  [11,7,9],
395  [13,11,9],
396  [15,11,13],
397  [14,15,13],
398  [12,15,14],
399  [10,12,14],
400  [8,12,10]
401  ],
402  [
403  [0,1],
404  [0,2],
405  [0,3],
406  [0,4],
407  [1,2],
408  [1,3],
409  [1,5],
410  [2,4],
411  [2,6],
412  [3,5],
413  [3,7],
414  [4,6],
415  [4,8],
416  [5,7],
417  [5,9],
418  [6,8],
419  [6,10],
420  [7,9],
421  [7,11],
422  [8,10],
423  [8,12],
424  [9,11],
425  [9,13],
426  [10,12],
427  [10,14],
428  [11,13],
429  [11,15],
430  [12,14],
431  [12,15],
432  [13,14],
433  [13,15],
434  [14,15]
435  ]
436  ],
437  [
438  "pentagonal_antiprism",
439  "Pentagonal Antiprism",
440  empty_str,
441  "anti_prisms",
442  "Polyhedron Database #28",
443  [
444  [ 0.85065080835, -0.44721359550, -0.27639320225],
445  [ 0.85065080835, 0.44721359550, 0.27639320225],
446  [ 0.52573111212, 0.44721359550, -0.72360679775],
447  [ 0.52573111212, -0.44721359550, 0.72360679775],
448  [ 0.00000000000, -0.44721359550, -0.89442719100],
449  [ 0.00000000000, 0.44721359550, 0.89442719100],
450  [-0.52573111212, 0.44721359550, -0.72360679775],
451  [-0.52573111212, -0.44721359550, 0.72360679775],
452  [-0.85065080835, -0.44721359550, -0.27639320225],
453  [-0.85065080835, 0.44721359550, 0.27639320225]
454  ],
455  [
456  [1.00000000000, -27.73230144776, 106.04505713536],
457  [1.00000000000, 27.73230144775, 73.95494286463],
458  [1.00000000000, 40.38617755921, 136.35307289117],
459  [1.00000000000, -40.38617755920, 43.64692710879],
460  [1.00000000000, -89.99999999998, 153.43494882290],
461  [1.00000000000, 89.99999999997, 26.56505117711],
462  [1.00000000000, 139.61382244076, 136.35307289118],
463  [1.00000000000, -139.61382244074, 43.64692710885],
464  [1.00000000000, -152.26769855227, 106.04505713531],
465  [1.00000000000, 152.26769855223, 73.95494286462]
466  ],
467  [
468  [7,3,0,4,8],
469  [1,5,9,6,2],
470  [1,3,5],
471  [0,3,1],
472  [2,0,1],
473  [4,0,2],
474  [6,4,2],
475  [8,4,6],
476  [9,8,6],
477  [7,8,9],
478  [5,7,9],
479  [3,7,5]
480  ],
481  [
482  [0,1],
483  [0,2],
484  [0,3],
485  [0,4],
486  [1,2],
487  [1,3],
488  [1,5],
489  [2,4],
490  [2,6],
491  [3,5],
492  [3,7],
493  [4,6],
494  [4,8],
495  [5,7],
496  [5,9],
497  [6,8],
498  [6,9],
499  [7,8],
500  [7,9],
501  [8,9]
502  ]
503  ],
504  [
505  "square_antiprism",
506  "Square Antiprism",
507  empty_str,
508  "anti_prisms",
509  "Polyhedron Database #27",
510  [
511  [-0.85953250377, -0.51108108453, -0.00000000000],
512  [-0.60778126207, 0.51108108453, 0.60778126207],
513  [-0.60778126207, 0.51108108453, -0.60778126206],
514  [ 0.00000000000, -0.51108108453, 0.85953250377],
515  [ 0.00000000000, -0.51108108453, -0.85953250377],
516  [ 0.60778126207, 0.51108108453, 0.60778126207],
517  [ 0.60778126207, 0.51108108453, -0.60778126206],
518  [ 0.85953250377, -0.51108108453, -0.00000000000]
519  ],
520  [
521  [1.00000000000, -149.26413289761, 90.00000000002],
522  [1.00000000000, 139.93964097361, 52.57075390722],
523  [1.00000000000, 139.93964097360, 127.42924609275],
524  [1.00000000000, -89.99999999999, 30.73586710238],
525  [1.00000000000, -89.99999999998, 149.26413289761],
526  [1.00000000000, 40.06035902638, 52.57075390722],
527  [1.00000000000, 40.06035902638, 127.42924609274],
528  [1.00000000000, -30.73586710238, 90.00000000002]
529  ],
530  [
531  [7,4,0,3],
532  [2,6,5,1],
533  [2,4,6],
534  [0,4,2],
535  [1,0,2],
536  [3,0,1],
537  [5,3,1],
538  [7,3,5],
539  [6,7,5],
540  [4,7,6]
541  ],
542  [
543  [0,1],
544  [0,2],
545  [0,3],
546  [0,4],
547  [1,2],
548  [1,3],
549  [1,5],
550  [2,4],
551  [2,6],
552  [3,5],
553  [3,7],
554  [4,6],
555  [4,7],
556  [5,6],
557  [5,7],
558  [6,7]
559  ]
560  ],
561  [
562  "triangular_antiprism",
563  "Triangular Antiprism",
564  "Octahedron",
565  "anti_prisms",
566  "Exact Mathematics",
567  [
568  [-0.70710678119, 0.57735026919, -0.40824829046],
569  [ 0.00000000000, 0.57735026919, 0.81649658093],
570  [ 0.70710678119, 0.57735026919, -0.40824829046],
571  [-0.70710678119, -0.57735026919, 0.40824829046],
572  [ 0.00000000000, -0.57735026919, -0.81649658093],
573  [ 0.70710678119, -0.57735026919, 0.40824829046]
574  ],
575  [
576  [1.00000000000, 140.76847951640, 114.09484255210],
577  [1.00000000000, 89.99999999999, 35.26438968275],
578  [1.00000000000, 39.23152048359, 114.09484255210],
579  [1.00000000000, -140.76847951640, 65.90515744789],
580  [1.00000000000, -89.99999999999, 144.73561031724],
581  [1.00000000000, -39.23152048359, 65.90515744789]
582  ],
583  [
584  [1,0,2],
585  [0,1,3],
586  [5,1,2],
587  [1,5,3],
588  [4,0,3],
589  [0,4,2],
590  [4,5,2],
591  [5,4,3]
592  ],
593  [
594  [0,1],
595  [0,2],
596  [0,3],
597  [0,4],
598  [1,2],
599  [1,3],
600  [2,4],
601  [3,4],
602  [1,5],
603  [2,5],
604  [3,5],
605  [4,5]
606  ]
607  ]
608 ];
609 
610 //! @}
611 
612 //----------------------------------------------------------------------------//
613 // openscad-amu auxiliary scripts
614 //----------------------------------------------------------------------------//
615 
616 /*
617 BEGIN_SCOPE db;
618 BEGIN_SCOPE autostat;
619  BEGIN_OPENSCAD;
620  include <omdl-base.scad>;
621  include <database/geometry/polyhedra/anti_prisms.scad>;
622 
623  fs = "^";
624 
625  tc = dtc_polyhedra_anti_prisms;
626  tr = dtr_polyhedra_anti_prisms;
627 
628  ids = table_get_row_ids(tr);
629 
630  echo
631  (
632  str
633  (
634  "no.", fs, "id", fs, "other name", fs,
635  "vertices", fs, "faces", fs, "edges",
636 
637  fs, "face-verticies",
638  fs, "face-angles",
639  fs, "edge-lengths",
640  fs, "edge-angles"
641  )
642  );
643 
644  for ( id = ids )
645  {
646  i = first(find(id, ids, c=1))+1;
647 
648  n = table_get_value(tr, tc, id, "n");
649  o = table_get_value(tr, tc, id, "o");
650  g = table_get_value(tr, tc, id, "g");
651  d = table_get_value(tr, tc, id, "d");
652 
653  c = table_get_value(tr, tc, id, "c");
654  s = table_get_value(tr, tc, id, "s");
655  f = table_get_value(tr, tc, id, "f");
656  e = table_get_value(tr, tc, id, "e");
657 
658  fo = is_empty(o) ? "-" : o;
659 
660  echo
661  (
662  str
663  (
664  i, fs, id, fs, fo, fs,
665  len(c), fs, len(f), fs, len(e),
666 
667  fs, histogram(sort_q(polytope_face_vertex_counts(f)), m=9),
668  fs, histogram(sort_q(round_d(polytope_face_angles(c, f), d=1)), m=9),
669  fs, histogram(sort_q(round_s(polytope_edge_lengths(c, e), d=3)), m=9),
670  fs, histogram(sort_q(round_d(polytope_edge_angles(c, f), d=1)), m=9),
671 
672  fs
673  )
674  );
675  }
676  END_OPENSCAD;
677 
678  BEGIN_MFSCRIPT;
679  include --path "${INCLUDE_PATH}" {var_init,var_gen_term}.mfs;
680  include --path "${INCLUDE_PATH}" scr_make_mf.mfs;
681  END_MFSCRIPT;
682 END_SCOPE;
683 END_SCOPE;
684 */
685 
686 /*
687 BEGIN_SCOPE db;
688 BEGIN_SCOPE dim;
689  BEGIN_OPENSCAD;
690  include <omdl-base.scad>;
691  include <units/coordinate.scad>;
692  include <tools/align.scad>;
693  include <tools/polytope.scad>;
694  include <database/geometry/polyhedra/anti_prisms.scad>;
695 
696  config = 0;
697 
698  tc = dtc_polyhedra_anti_prisms;
699  tr = dtr_polyhedra_anti_prisms;
700 
701  id = "default";
702  sr = 100;
703 
704  pv = table_get_value(tr, tc, id, "c");
705  pf = table_get_value(tr, tc, id, "f");
706  pe = table_get_value(tr, tc, id, "e");
707 
708  sv = coordinate_scale3d_csc(pv, sr);
709 
710  if (config == 0) // png preview
711  {
712  $fn = 25;
713 
714  %polyhedron(sv, pf);
715 
716  polytope_frame(sv, pf, pe)
717  {
718  circle(r = sr / 25);
719  color("lightblue")
720  sphere(r = sr / 25 * (1 + 1/2));
721  }
722  }
723 
724  if (config == 1) // stl model
725  {
726  polyhedron(sv, pf);
727  }
728  END_OPENSCAD;
729 
730  BEGIN_MFSCRIPT;
731  include --path "${INCLUDE_PATH}" {var_init,var_gen_png2eps}.mfs;
732 
733  views name "views" views "diag";
734  defines name "ids" define "id"
735  strings
736  "
737  decagonal_antiprism
738  hexagonal_antiprism
739  octagonal_antiprism
740  pentagonal_antiprism
741  square_antiprism
742  triangular_antiprism
743  ";
744  variables add_opts_combine "views ids";
745  variables add_opts "-D config=0 --viewall --autocenter --view=axes";
746 
747  include --path "${INCLUDE_PATH}" scr_make_mf_begin.mfs;
748  include --path "${INCLUDE_PATH}" scr_make_mf_add_ext.mfs;
749 
750  include --path "${INCLUDE_PATH}" var_gen_stl.mfs;
751  variables add_opts_combine "ids";
752  variables add_opts "-D config=1";
753 
754  include --path "${INCLUDE_PATH}" scr_make_mf_add_ext.mfs;
755  include --path "${INCLUDE_PATH}" scr_make_mf_end.mfs;
756  END_MFSCRIPT;
757 END_SCOPE;
758 END_SCOPE;
759 */
760 
761 //----------------------------------------------------------------------------//
762 // end of file
763 //----------------------------------------------------------------------------//
empty_str
<string> A string with no characters (the empty string).
Definition: constants.scad:301
dtc_polyhedra_anti_prisms
dtr_polyhedra_anti_prisms