You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Kerem Yollu a24c6dfa18
started with amplifier
4 years ago
..
bitmap started with amplifier 4 years ago
.gitignore started with amplifier 4 years ago
2Dshapes.scad started with amplifier 4 years ago
3d_triangle.scad started with amplifier 4 years ago
README.markdown started with amplifier 4 years ago
TODO started with amplifier 4 years ago
__init__.py started with amplifier 4 years ago
array.scad started with amplifier 4 years ago
bearing.scad started with amplifier 4 years ago
boxes.scad started with amplifier 4 years ago
constants.scad started with amplifier 4 years ago
curves.scad started with amplifier 4 years ago
fonts.scad started with amplifier 4 years ago
gears.scad started with amplifier 4 years ago
gridbeam.scad started with amplifier 4 years ago
hardware.scad started with amplifier 4 years ago
involute_gears.scad started with amplifier 4 years ago
layouts.scad started with amplifier 4 years ago
lego_compatibility.scad started with amplifier 4 years ago
lgpl-2.1.txt started with amplifier 4 years ago
libtriangles.scad started with amplifier 4 years ago
linear_bearing.scad started with amplifier 4 years ago
materials.scad started with amplifier 4 years ago
math.scad started with amplifier 4 years ago
metric_fastners.scad started with amplifier 4 years ago
motors.scad started with amplifier 4 years ago
multiply.scad started with amplifier 4 years ago
nuts_and_bolts.scad started with amplifier 4 years ago
openscad_testing.py started with amplifier 4 years ago
openscad_utils.py started with amplifier 4 years ago
polyholes.scad started with amplifier 4 years ago
profiles.scad started with amplifier 4 years ago
regular_shapes.scad started with amplifier 4 years ago
screw.scad started with amplifier 4 years ago
servos.scad started with amplifier 4 years ago
shapes.scad started with amplifier 4 years ago
stepper.scad started with amplifier 4 years ago
teardrop.scad started with amplifier 4 years ago
test_docs.py started with amplifier 4 years ago
test_mcad.py started with amplifier 4 years ago
transformations.scad started with amplifier 4 years ago
triangles.scad started with amplifier 4 years ago
trochoids.scad started with amplifier 4 years ago
units.scad started with amplifier 4 years ago
unregular_shapes.scad started with amplifier 4 years ago
utilities.scad started with amplifier 4 years ago

README.markdown

OpenSCAD MCAD Library

This library contains components commonly used in designing and mocking up mechanical designs. It is currently unfinished and you can expect some API changes, however many things are already working.

This library was created by various authors as named in the individual files' comments. All the files are licensed under the LGPL 2.1 (see http://creativecommons.org/licenses/LGPL/2.1/ or the included file lgpl-2.1.txt), some of them allow distribution under more permissive terms (as described in the files' comments).

Usage

You can import these files in your scripts with use <MCAD/filename.scad>, where 'filename' is one of the files listed below like 'motors' or 'servos'. Some files include useful constants which will be available with include <MCAD/filename.scad>, which should be safe to use on all included files (ie. no top level code should create geometry). (There is a bug/feature that prevents including constants from files that "include" other files - see the openscad mailing list archives for more details. Since the maintainers aren't very responsive, may have to work around this somehow)

If you host your project in git, you can do git submodule add URL PATH in your repo to import this library as a git submodule for easy usage. Then you need to do a git submodule update --init after cloning. When you want to update the submodule, do cd PATH; git checkout master; git pull. See git help submodule for more info.

Currently Provided Tools:

  • regular_shapes.scad

    • regular polygons, ie. 2D
    • regular polyhedrons, ie. 3D
  • involute_gears.scad (http://www.thingiverse.com/thing:3575):

    • gear()
    • bevel_gear()
    • bevel_gear_pair()
  • gears.scad (Old version):

    • gear(number_of_teeth, circular_pitch OR diametrial_pitch, pressure_angle OPTIONAL, clearance OPTIONAL)
  • motors.scad:

    • stepper_motor_mount(nema_standard, slide_distance OPTIONAL, mochup OPTIONAL)

Tools (alpha and beta quality):

  • nuts_and_bolts.scad: for creating metric and imperial bolt/nut holes
  • bearing.scad: standard/custom bearings
  • screw.scad: screws and augers
  • materials.scad: color definitions for different materials
  • stepper.scad: NEMA standard stepper outlines
  • servos.scad: servo outlines
  • boxes.scad: box with rounded corners
  • triangles.scad: simple triangles
  • 3d_triangle.scad: more advanced triangles

Very generally useful functions and constants:

  • math.scad: general math functions
  • constants.scad: mathematical constants
  • curves.scad: mathematical functions defining curves
  • units.scad: easy metric units
  • utilities.scad: geometric funtions and misc. useful stuff
  • teardrop.scad (http://www.thingiverse.com/thing:3457): parametric teardrop module
  • shapes.scad: DEPRECATED simple shapes by Catarina Mota
  • polyholes.scad: holes that should come out well when printed

Other:

  • alphabet_block.scad
  • bitmap.scad
  • letter_necklace.scad
  • name_tag.scad
  • height_map.scad
  • trochoids.scad
  • libtriangles.scad
  • layouts.scad
  • transformations.scad
  • 2Dshapes.scad
  • gridbeam.scad
  • fonts.scad
  • unregular_shapes.scad
  • metric_fastners.scad
  • lego_compatibility.scad
  • multiply.scad
  • hardware.scad

External utils that generate and process openscad code:

  • openscad_testing.py: testing code, see below
  • openscad_utils.py: code for scraping function names etc.

Development

You are welcome to fork this project in github and request pulls. I will try to accomodate the community as much as possible in this. If for some reason you want collaborator access, just ask.

Github is fun (and easy), but I can include code submissions and other improvements directly, and have already included code from various sources (thingiverse is great :)

Code style

I'd prefer to have all included code nicely indented, at least at the block level, and no extraneous whitespace. I'm used to indent with four spaces as opposed to tabs or other mixes of whitespace, but at least try to choose a style and stick to it.

Testing

I've started a minimal testing infrastucture for OpenSCAD code. It's written in python and uses py.test (might be compatible with Nose also). Just type py.test inside the lib dir in a terminal and you should see a part of the tests passing and tracebacks for failing tests. It's very simplistic still, but it should test that no syntax errors occur at least.

The code is included in openscad_testing.py, and can be imported to be used in other codebases.