omdl
v0.5
OpenSCAD Mechanical Design Library
Main Page
Related Pages
Modules
Files
File List
Globals
mainpage.scad
Go to the documentation of this file.
1
//! Documentation main page.
2
/***************************************************************************/
/**
3
\file mainpage.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
*******************************************************************************/
29
30
/***************************************************************************/
/**
31
\mainpage omdl
32
\tableofcontents
33
34
A collection of documented design primitives for [OpenSCAD]
35
inspired by *MCAD*.
36
37
\section what_is_omdl What is omdl?
38
39
It is an [OpenSCAD] mechanical design library ([omdl]) that aims to
40
offer open-source high-level design primitives with coherent
41
documentation generated by [Doxygen] using [openscad-amu].
42
43
With [Doxygen], the code documentation is written within the code
44
itself, and is thus easy to keep current. Moreover, it provides a
45
standard way to both write and present [OpenSCAD] script
46
documentation, compilable to multiple common output formats.
47
48
With [omdl], all library primitives are \em parametric with
49
minimal, mostly zero, global variable dependencies and all library
50
API's include [Doxygen markups] that describe its parameters,
51
behavior, and use. Validation scripts are used to check that the
52
core building blocks work as expected across evolving [OpenSCAD]
53
versions. These validation are performed automatically when
54
rebuilding the documentation.
55
56
See the \ref validation "validation section" for the results
57
generated with this documentation.
58
59
\section quickstart Quick Start
60
61
The library components may be \c used or \c included as expected.
62
63
\b Example:
64
65
\dontinclude mainpage_quickstart.scad
66
\skip include
67
\until valign="center" );
68
69
\amu_make png_files (append=quickstart extension=png)
70
\amu_make eps_files (append=quickstart extension=png2eps)
71
\amu_make stl_files (append=quickstart extension=stl)
72
73
\htmlonly
74
\amu_image_table
75
(
76
type=html columns=4 image_width="200" table_caption="Example Result"
77
cell_captions="Bottom^Diagonal^Right^Top"
78
cell_files="${png_files}"
79
cell_urls="${stl_files} ${stl_files} ${stl_files} ${stl_files}"
80
)
81
\endhtmlonly
82
\latexonly
83
\amu_image_table
84
(
85
type=latex columns=4 image_width="1.25in" table_caption="Example Result"
86
cell_captions="Bottom^Diagonal^Right^Top"
87
cell_files="${eps_files}"
88
)
89
\endlatexonly
90
91
\section using Using omdl
92
93
To use [omdl] the library files must be copied to one of the
94
[OpenSCAD Library Locations]. This can be done manually, as
95
described in the [OpenSCAD] documentation, or can be automated
96
using [openscad-amu].
97
98
The ladder is recommended and has several advantages. When using
99
[openscad-amu], the library reference documentation is installed
100
together with the library source code. This reference documentation
101
is also added to a browsable data-table of installed libraries,
102
which facilitates design reference searches. Moreover, with
103
[openscad-amu] installed, one can rebuild the [omdl] reference
104
manual or develop documentation for new [OpenSCAD] designs.
105
106
Library release files are made available in the source [repository]
107
in a sub-directory called *snapshots*.
108
109
\subsection openscad-amu Recommended install method
110
111
More information on installing [openscad-amu] can be found
112
[published](http://www.thingiverse.com/thing:1858181) on
113
[Thingiverse] and in the GitHib [openscad-amu repository] where the
114
source is maintained.
115
116
A build script exists for \em Linux and \em Cygwin (pull requests
117
for \em macos are welcome). If \c wget is not available, here is a
118
downloadable link to the [bootstrap script].
119
120
\verbatim
121
$ mkdir tmp && cd tmp
122
123
$ wget https://raw.githubusercontent.com/royasutton/openscad-amu/master/snapshots/bootstrap.{bash,conf} .
124
$ chmod +x bootstrap.bash
125
126
$ ./bootstrap.bash --yes --install
127
128
$ openscad-seam -v -V
129
\endverbatim
130
131
If the last step reports the tool build version, then the install
132
most likely completed successfully and the temporary directory
133
created in the first step may be removed when desired.
134
135
Now the documentation for [omdl] can be compiled and installed with
136
a single command. First download the source from [Thingiverse] or
137
clone the source repository and install as follows:
138
139
\verbatim
140
$ git clone https://github.com/royasutton/omdl.git
141
$ cd omdl
142
143
$ make install
144
\endverbatim
145
146
The library and documentation should now have been installed to the
147
[OpenSCAD] \em built-in library location along with the reference
148
manual that can be views with a web browser.
149
150
Have a look in:
151
\li \b Linux: $HOME/.local/share/OpenSCAD/libraries
152
\li \b Windows: My Documents\\\\OpenSCAD\\\\libraries
153
154
Now you may include the desired library primitives in your project
155
as follows, replacing the version number as needed (multiple
156
version of a library may coexists):
157
158
\verbatim
159
include <omdl-v0.4/shapes2de.scad>;
160
include <omdl-v0.4/shapes3d.scad>;
161
...
162
\endverbatim
163
164
\section contributing Contributing
165
166
[omdl] uses [git] for development tracking, and is hosted on
167
[GitHub] following the usual practice of [forking] and submitting
168
[pull requests] to the source repository.
169
170
As it is released under the [GNU Lesser General Public License],
171
any file you change should bear your copyright notice alongside the
172
original authors' copyright notices typically located at the top of
173
each file.
174
175
Ideas, requests, comments, contributions, and constructive
176
criticism are welcome.
177
178
\section support Contact and Support
179
180
In case you have any questions or would like to make feature
181
requests, you can contact the maintainer of the project or file an
182
[issue].
183
184
185
[GNU Lesser General Public License]: https://www.gnu.org/licenses/lgpl.html
186
187
[omdl]: https://royasutton.github.io/omdl
188
[repository]: https://github.com/royasutton/omdl
189
[issue]: https://github.com/royasutton/omdl/issues
190
191
[openscad-amu]: https://royasutton.github.io/openscad-amu
192
[openscad-amu repository]: https://github.com/royasutton/openscad-amu
193
[bootstrap script]: https://raw.githubusercontent.com/royasutton/openscad-amu/master/snapshots/bootstrap.bash
194
195
[Doxygen]: http://www.stack.nl/~dimitri/doxygen/index.html
196
[Doxygen markups]: http://www.stack.nl/~dimitri/doxygen/manual/commands.html
197
198
[OpenSCAD]: http://www.openscad.org
199
[OpenSCAD Library Locations]: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Libraries
200
201
[Thingiverse]: http://www.thingiverse.com
202
203
[git]: http://git-scm.com
204
[GitHub]: http://github.com
205
[forking]: http://help.github.com/forking
206
[pull requests]: https://help.github.com/articles/about-pull-requests/
207
208
*******************************************************************************/
209
210
// validation results root page.
211
/***************************************************************************/
/**
212
\page validation Validation
213
\li \subpage tv_prim
214
\li \subpage tv_math
215
*******************************************************************************/
216
217
// base group categories.
218
/***************************************************************************/
/**
219
\defgroup constants Constants
220
\brief General design constants.
221
*******************************************************************************/
222
223
/***************************************************************************/
/**
224
\defgroup data Data
225
\brief Data values and reference
226
*******************************************************************************/
227
228
/***************************************************************************/
/**
229
\defgroup math Math
230
\brief Mathematical functions.
231
*******************************************************************************/
232
233
/***************************************************************************/
/**
234
\defgroup parts Parts
235
\brief Parametric parts/components.
236
*******************************************************************************/
237
238
/***************************************************************************/
/**
239
\defgroup shapes Shapes
240
\brief 2D and 3D shapes.
241
*******************************************************************************/
242
243
/***************************************************************************/
/**
244
\defgroup tools Tools
245
\brief Design tools and techniques.
246
*******************************************************************************/
247
248
/***************************************************************************/
/**
249
\defgroup transforms Transformations
250
\brief Shape transformations.
251
*******************************************************************************/
252
253
/***************************************************************************/
/**
254
\defgroup units Units
255
\brief Units and unit conversions.
256
*******************************************************************************/
257
258
/***************************************************************************/
/**
259
\defgroup utilities Utilities
260
\brief General utilities.
261
*******************************************************************************/
262
263
//----------------------------------------------------------------------------//
264
// openscad-amu auxiliary scripts
265
//----------------------------------------------------------------------------//
266
267
/*
268
BEGIN_SCOPE logo;
269
BEGIN_OPENSCAD;
270
include <shapes2de.scad>;
271
include <shapes3d.scad>;
272
273
$fn = 36;
274
275
frame = triangle_vp2vl( [ [30,0], [0,40], [30,40] ] );
276
core = 2 * frame / 3;
277
vrnd = [1, 2, 4];
278
279
cone( h=20, r=10, vr=2 );
280
rotate([0, 0, 360/20])
281
st_radial_copy( n=5, angle=true )
282
etriangle_vl_c( vs=frame, vc=core, vr=vrnd, h=10 );
283
END_OPENSCAD;
284
285
BEGIN_MFSCRIPT;
286
include --path "${INCLUDE_PATH}" {config_base,config_png}.mfs;
287
288
views name "views" distance "250" views "top";
289
images name "slogo" aspect "1:1" xsizes "55";
290
variables set_opts_combine "views slogo";
291
292
include --path "${INCLUDE_PATH}" script_std.mfs;
293
END_MFSCRIPT;
294
END_SCOPE;
295
296
BEGIN_SCOPE quickstart;
297
BEGIN_OPENSCAD;
298
include <shapes2de.scad>;
299
include <shapes3d.scad>;
300
301
$fn = 36;
302
303
frame = triangle_vp2vl( [ [30,0], [0,40], [30,40] ] );
304
core = 2 * frame / 3;
305
vrnd = [1, 2, 4];
306
307
cone( h=20, r=10, vr=2 );
308
rotate([0, 0, 360/20])
309
st_radial_copy( n=5, angle=true )
310
etriangle_vl_c( vs=frame, vc=core, vr=vrnd, h=10 );
311
312
translate([0, -50,0])
313
linear_extrude(height=10)
314
text( text="omdl", size=20, halign="center", valign="center" );
315
END_OPENSCAD;
316
317
BEGIN_MFSCRIPT;
318
include --path "${INCLUDE_PATH}" {config_base,config_png}.mfs;
319
320
views name "views" views "top bottom right diag";
321
variables add_opts_combine "views";
322
variables add_opts "--viewall --autocenter";
323
324
include --path "${INCLUDE_PATH}" script_new.mfs;
325
326
include --path "${INCLUDE_PATH}" config_stl.mfs;
327
include --path "${INCLUDE_PATH}" script_app.mfs;
328
END_MFSCRIPT;
329
END_SCOPE;
330
*/
331
332
//----------------------------------------------------------------------------//
333
// end of file
334
//----------------------------------------------------------------------------//
mainpage.scad
Generated on Sat Feb 4 2017 00:27:27 for omdl by
1.8.9.1