Skip to content

Attach library for Openscad

Advertising
Advertising
?
Creation quality: 5.0/5 (1 vote)
Evaluation of members on the printability, utility, level of detail, etc.

  • 951 views
  • 7 downloads

License
3D design format
ZIP Folder details Close
  • obiscad-attach-openscad.zip
    • attach_01.scad
    • obiscad/attach.scad
    • obiscad/bcube.scad
    • obiscad/vector.scad

Learn more about the formats

Publication date 2021-03-14 at 03:32
?
Published to Thingiverse on: 2012-09-10 at 05:51
Design number 330333

3D printer file info

3D model description

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

3D printing settings

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).

Advertising


Issue with this design? Report a problem.

Would you like to support Cults?

You like Cults and you want to help us continue the adventure independently? Please note that we are a small team of 3 people, therefore it is very simple to support us to maintain the activity and create future developments. Here are 4 solutions accessible to all:

  • ADVERTISING: Disable your banner blocker (AdBlock, …) and click on our banner ads.

  • AFFILIATION: Make your purchases online by clicking on our affiliate links here Amazon.

  • DONATE: If you want, you can make a donation via Ko-Fi πŸ’œ.

  • WORD OF MOUTH: Invite your friends to come, discover the platform and the magnificent 3D files shared by the community!


Sharing and downloading on Cults3D guarantees that designs remain in makers community hands! And not in the hands of the 3D printing or software giants who own the competing platforms and exploit the designs for their own commercial interests.

Cults3D is an independent, self-financed site that is not accountable to any investor or brand. Almost all of the site's revenues are paid back to the platform's makers. The content published on the site serves only the interests of its authors and not those of 3D printer brands who also wish to control the 3D modeling market.

100% secure payment by credit card, PayPal, Apple Pay, Google Pay, etc.
View all payment options.