omdl  v0.5
OpenSCAD Mechanical Design Library
constants.scad
Go to the documentation of this file.
1 //! Mechanical design constants.
2 /***************************************************************************//**
3  \file constants.scad
4  \author Roy Allen Sutton
5  \date 2015-2017
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  \note Include this library file using the \b include statement.
31 
32  \ingroup constants constants_general constants_system constants_euclidean
33 *******************************************************************************/
34 
35 //----------------------------------------------------------------------------//
36 /***************************************************************************//**
37  \addtogroup constants
38  @{
39 
40  \defgroup constants_general General
41  \brief General design constants.
42  @{
43 *******************************************************************************/
44 //----------------------------------------------------------------------------//
45 
46 //! <decimal> Epsilon, small distance to deal with overlaping shapes
47 eps = 0.01;
48 
49 //! <decimal> The ratio of a circle's circumference to its diameter
50 pi = 3.1415926535897932384626433832795;
51 
52 //! <decimal> The ratio of a circle's circumference to its radius
53 tau = 2*pi;
54 
55 //! @}
56 //! @}
57 
58 //----------------------------------------------------------------------------//
59 /***************************************************************************//**
60  \addtogroup constants
61  @{
62 
63  \defgroup constants_system System
64  \brief System/Program limits.
65  @{
66 *******************************************************************************/
67 //----------------------------------------------------------------------------//
68 
69 //! The largest representable number in OpenSCAD scripts.
70 number_max = 1e308;
71 
72 //! The smallest representable number in OpenSCAD scripts.
73 number_min = -1e308;
74 
75 //! A string with no content (the empty string).
76 empty_str = "";
77 
78 //! A vector with no content (the empty vector).
79 empty_v = [];
80 
81 //! @}
82 //! @}
83 
84 //----------------------------------------------------------------------------//
85 /***************************************************************************//**
86  \addtogroup constants
87  @{
88 
89  \defgroup constants_euclidean Euclidean
90  \brief Euclidean 2D/3D space mapping.
91  @{
92 *******************************************************************************/
93 //----------------------------------------------------------------------------//
94 
95 //! The vector index for the x-coordinate of a vector.
97 
98 //! The vector index for the y-coordinate of a vector.
100 
101 //! The vector index for the z-coordinate of a vector.
103 
104 //! The origin coordinates in 2-dimensional Euclidean space.
105 origin2d = [0, 0];
106 
107 //! The unit vector of the positive x-axis in 2-dimensional Euclidean space.
108 x_axis2d_uv = [1, 0];
109 
110 //! The unit vector of the positive y-axis in 2-dimensional Euclidean space.
111 y_axis2d_uv = [0, 1];
112 
113 //! The origin coordinates in 3-dimensional Euclidean space.
114 origin3d = [0, 0, 0];
115 
116 //! The unit vector of the positive x-axis in 3-dimensional Euclidean space.
117 x_axis3d_uv = [1, 0, 0];
118 
119 //! The unit vector of the positive y-axis in 3-dimensional Euclidean space.
120 y_axis3d_uv = [0, 1, 0];
121 
122 //! The unit vector of the positive z-axis in 3-dimensional Euclidean space.
123 z_axis3d_uv = [0, 0, 1];
124 
125 //! @}
126 //! @}
127 
128 //----------------------------------------------------------------------------//
129 // end of file
130 //----------------------------------------------------------------------------//
y_axis3d_uv
The unit vector of the positive y-axis in 3-dimensional Euclidean space.
Definition: constants.scad:120
tau
The ratio of a circle's circumference to its radius
Definition: constants.scad:53
eps
Epsilon, small distance to deal with overlaping shapes
Definition: constants.scad:47
x_axis3d_uv
The unit vector of the positive x-axis in 3-dimensional Euclidean space.
Definition: constants.scad:117
number_min
The smallest representable number in OpenSCAD scripts.
Definition: constants.scad:73
empty_v
A vector with no content (the empty vector).
Definition: constants.scad:79
pi
The ratio of a circle's circumference to its diameter
Definition: constants.scad:50
empty_str
A string with no content (the empty string).
Definition: constants.scad:76
origin3d
The origin coordinates in 3-dimensional Euclidean space.
Definition: constants.scad:114
y_axis_vi
The vector index for the y-coordinate of a vector.
Definition: constants.scad:99
x_axis_vi
The vector index for the x-coordinate of a vector.
Definition: constants.scad:96
origin2d
The origin coordinates in 2-dimensional Euclidean space.
Definition: constants.scad:105
z_axis3d_uv
The unit vector of the positive z-axis in 3-dimensional Euclidean space.
Definition: constants.scad:123
z_axis_vi
The vector index for the z-coordinate of a vector.
Definition: constants.scad:102
number_max
The largest representable number in OpenSCAD scripts.
Definition: constants.scad:70
y_axis2d_uv
The unit vector of the positive y-axis in 2-dimensional Euclidean space.
Definition: constants.scad:111
x_axis2d_uv
The unit vector of the positive x-axis in 2-dimensional Euclidean space.
Definition: constants.scad:108