Loading

Attach library for Openscad

by obijuan, published

Attach library for Openscad by obijuan Sep 10, 2012

Contents

Use This Project

Give a Shout Out

If you print this Thing and display it in public proudly give attribution by printing and displaying this tag.

Print Thing Tag

Thing Statistics

7845Views 989Downloads Found in Robotics

Summary

Openscad library for easily attaching parts. This is an experimental work on enhancing the openscad tool. Usually the code written by users is difficult to read and understand. If we want to share the code and to reuse parts made by others, it is very important to write clean code.

The attach operator is a experimental way of joining together parts. It just hides all the translate/rotate operators to the user, making the code easier to read, maitain and reuse.

I have written about it (and given an example of use) in this post:

http://www.iearobotics.com/blog/2012/09/10/enhancing-openscad-with-the-attach-library/

The attach operator is part of the obiscad tools I am developing:

https://github.com/Obijuan/obiscad

More information in this wiki (in Spanish):

http://www.iearobotics.com/wiki/index.php?title=Obiscad

Instructions

Example of use:

1) Define the connectors in a part (the points were you want to attach other parts). You should provide the attachment point, the axis and the roll angle:

//-- att. point att. axis roll
c1 = [ [0,0,10], [0,0,1], 20 ];

Add your main part.
You can easily see the connector you have defined invoking the connector module:

connector(c1);

Then define the connector for the second part:

//-- att. point att. axis roll
a = [ [0, 2,2], [0,0,1], 0 ];

Again, put your part and then view the connector with:
connector(a);

Now you are ready to attach the second part to the first one invoking the attach operator:

attach(c1,a) your_part();

Were your_part() is a module or a tree of operators (union, translates and so on).

More from Robotics

view more

All Apps

Upgrade this Thing with Thingiverse Apps

Tools and Utilities

Repair, slice, or enhance this Thing


Auto-magically prepare your 3D models for 3D printing. A cloud based 3D models Preparing and Healing solution for 3D Printing, MakePrintable provides features for model repairing, wall thickness...

App Info Launch App
Top