Go to file
Chow Loong Jin 5a773f96cb
Merge pull request #48 from MichaelPFrey/master
fixed typo in README.markdown
2019-07-23 23:24:27 +08:00
bitmap char_count can be determined using len(), so no need to pass it as an argument 2013-08-04 20:26:30 +02:00
.gitignore Update test code for Python3. 2018-09-23 19:03:17 +02:00
2Dshapes.scad Added layout and 2D shapes modules 2012-11-22 02:14:36 +01:00
3d_triangle.scad Fixed spelling of height 2019-01-04 17:08:54 +01:00
__init__.py Add __init__.py to be able to import the python code also 2010-10-06 15:54:42 +03:00
array.scad Cubic_Array() , Radial_Array() function added multiple child support 2013-07-20 19:37:44 +01:00
bearing.scad Merge remote-tracking branch 'origin/pr/8' 2019-07-23 22:14:32 +08:00
boxes.scad Clarified BSD license 2013-11-04 20:39:29 -05:00
constants.scad Clarify licensing 2014-03-07 00:13:33 -05:00
curves.scad Randome bits of syntax that openscad doesn't treat as errors 2011-01-21 03:40:36 -05:00
fonts.scad Merge remote-tracking branch 'origin/pr/20' 2019-07-23 22:28:19 +08:00
gears.scad Merge remote-tracking branch 'origin/pr/20' 2019-07-23 22:28:19 +08:00
gridbeam.scad remove executable bit and add todo list item 2013-05-31 14:57:16 -07:00
hardware.scad fixed up license of hardware.scad 2011-01-18 06:21:22 -05:00
involute_gears.scad Ensure that no 3d objects show up in gear(..., flat=true) 2019-07-23 22:36:02 +08:00
layouts.scad Added layout and 2D shapes modules 2012-11-22 02:14:36 +01:00
lego_compatibility.scad Clarify licensing 2014-03-07 00:13:33 -05:00
lgpl-2.1.txt Changed to LGPL, since all the code is now compatible 2010-07-26 13:24:12 +03:00
libtriangles.scad Added licensing stuff. 2013-02-16 13:36:56 -04:00
linear_bearing.scad add linear bearing models 2013-10-21 18:23:12 +08:00
materials.scad Added testing infra using py.test. Catches parse errors already, but stl compiling tests fail 2010-07-26 21:03:44 +03:00
math.scad Clarified the licenses in use in this library, has GPL2 and GPL3 which are incompatible 2010-07-25 19:39:52 +03:00
metric_fastners.scad Fixed FSF address 2012-10-07 19:47:29 +02:00
motors.scad Added a tolerance parameter tor motors.scad, by D1plo1d 2011-02-03 11:04:02 +02:00
multiply.scad Added multiply.scad 2012-01-30 04:31:23 +02:00
nuts_and_bolts.scad Re-add COURSE_METRIC_BOLT_MAJOR_THREAD_DIAMETERS variable 2019-07-23 21:57:56 +08:00
openscad_testing.py Update test code for Python3. 2018-09-23 19:03:17 +02:00
openscad_utils.py Update test code for Python3. 2018-09-23 19:03:17 +02:00
polyholes.scad Added license info from http://www.thingiverse.com/thing:6118 2012-10-31 12:25:20 -04:00
README.markdown Merge pull request #48 from MichaelPFrey/master 2019-07-23 23:24:27 +08:00
regular_shapes.scad Merge pull request #42 from rockstorm101/extend-hexagon 2019-06-14 01:03:19 +08:00
screw.scad auger() actually builds augers with all params 2012-11-05 20:38:56 -05:00
servos.scad Removing execute permissions from OpenSCAD source. 2018-09-25 20:13:44 +02:00
shapes.scad Merge ArthurGibbs/fixShapes into master (#5) 2019-07-23 21:41:55 +08:00
stepper.scad Fix up thickness of stepper motor round extrusion 2019-07-23 22:54:02 +08:00
teardrop.scad Merge remote-tracking branch 'origin/pr/7' 2019-07-23 22:10:34 +08:00
test_docs.py Update test code for Python3. 2018-09-23 19:03:17 +02:00
test_mcad.py Moved testing code to another file for easier using outside MCAD 2010-10-13 09:25:21 +03:00
TODO Added items to TODO 2011-03-25 10:05:04 +02:00
transformations.scad Added license, renamed module to make it actually work 2012-10-31 18:00:28 +02:00
triangles.scad Added optional "center" param to triangle() and a_triangle() modules 2018-07-09 18:23:10 -07:00
trochoids.scad Added trochoids.scad from thingiverse, needs cleaning 2011-04-28 11:40:13 +03:00
units.scad Added multiply.scad 2012-01-30 04:31:23 +02:00
unregular_shapes.scad Added new file for not-so-regular shapes 2011-09-06 12:14:44 +03:00
utilities.scad Added multiply.scad 2012-01-30 04:31:23 +02:00

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.