omdl  v0.9.5
OpenSCAD Mechanical Design Library
Introduction

omdl is an OpenSCAD mechanical design library that provides open-source high-level design primitives with coherent documentation generated by Doxygen using openscad-amu.

With Doxygen, the code documentation is written within the code itself, and is thus easy to keep current. Moreover, it provides a standard way to both write and present OpenSCAD design documentation, compilable to common output formats (html, pdf, etc). With omdl, all library primitives are parametric with minimal, mostly zero, global variable dependencies and all library API's include markups that describe its parameters, behavior, and use.

Validation scripts are used to verify that the core operations work as expected across evolving OpenSCAD versions. This validation is performed when building and installing the library documentation). The library uses a common set of conventions for specifying data types and is divided into individual component modules of functionality, organized into groups, that may be included as desired.

Getting Started

Hello world script

include <omdl-base.scad>;
include <tools/operation_cs.scad>;
include <tools/drafting/draft-base.scad>;
include <parts/3d/bearing/bearing_linear_rod.scad>;
$fn = 36;
p = [length(0.706, "in"), length(0.622, "in")];
b = length(6, "mm");
r = 21.5; c = 6; a = 85;
h = [b*8, undef, false];
v = is_undef ( __mfs__diag ) ? 2: undef;
make_bearing_linear_rod(pipe=p, ball=b, count=c, angle=a, h=h, align=4, view=v)
minkowski() {cylinder(r=r-b*2/3, h=first(h)-b*3/2, center=true); sphere(r=r/5);};
// end_include
function count(mv, v, s=true, i)
Count all occurrences of a match value in an iterable value.
function first(v)
Return the first element of an iterable value.
module make_bearing_linear_rod(pipe, ball, count, angle, h, tunnel, feed, load=1, offset=1, delta=0, gap=10, reveal=50, dilate=15, type=0, align=2, verb=0, view)
Transform 2d or 3d shape into a linear rod ball or sled bearing.
function angle(a, from=angle_unit_default, to=angle_unit_base)
Convert an angle from some units to another.
function length(v, from=length_unit_default, to=length_unit_base, d=1)
Convert a value from from one units to another with dimensions.

The make_bearing_linear_rod operations can be used to transform 2D and 3D objects into 3D-printable linear rod bearings with arbitrary bearing-ball and rod sizes.

Hello world diagram
righttopfrontdiag
expand rightexpand topexpand frontexpand diag

Click image above to expand. See the end of docs_start.scad in the scope [ quickstart ] for the the dimension operations used in the above example.

Contributing

omdl uses git for development tracking, and is hosted on GitHub following the usual practice of forking and submitting pull requests to the source repository.

As it is released under the GNU Lesser General Public License, any file you change should bear your copyright notice alongside the original authors' copyright notices typically located at the top of each file.

Ideas, requests, comments, contributions, and constructive criticism are welcome.

Support

In case you have any questions or would like to make feature requests, you can contact the maintainer of the project or file an issue.