discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Re: [OpenSCAD] My first Openscad file:) just went through the makerbot tutorial and now I'm stuck

M
MichaelAtOz
Sun, Aug 2, 2015 7:05 AM

Hi,

Your post is still flagged "This post has NOT been accepted by the mailing
list yet. " so nobody on the mailing list gets it.

You need to check your  registration.
http://forum.openscad.org/mailing_list/MailingListOptions.jtp?forum=1

Re your question. I think you are maybe looking for  children()
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Modules

module hole(distance_x, distance_y, rot, size) {
difference() {
children();
// -
rotate(a = rot, v = [1, 0, 0]) {
translate([distance_x, distance_y, 0]) {
cylinder(r = size, h = 100, center = true);
}
}
}// hole

Then you can do

hole(32,15.5,0,5)
hole(32,75-15.5,0,5)
box(40 + 12 + 12, total_width, 12);

etc.


Unless specifically shown otherwise above, my contribution is in the Public Domain; To the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. This work is published globally via the internet. :) Inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”  Fight it! http://www.ourfairdeal.org/

View this message in context: http://forum.openscad.org/My-first-Openscad-file-just-went-through-the-makerbot-tutorial-and-now-I-m-stuck-tp12881p13402.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Hi, Your post is still flagged "This post has NOT been accepted by the mailing list yet. " so nobody on the mailing list gets it. You need to check your registration. <http://forum.openscad.org/mailing_list/MailingListOptions.jtp?forum=1> Re your question. I think you are maybe looking for children() <https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Modules> module hole(distance_x, distance_y, rot, size) { difference() { children(); // - rotate(a = rot, v = [1, 0, 0]) { translate([distance_x, distance_y, 0]) { cylinder(r = size, h = 100, center = true); } } }// hole Then you can do hole(32,15.5,0,5) hole(32,75-15.5,0,5) box(40 + 12 + 12, total_width, 12); etc. ----- Unless specifically shown otherwise above, my contribution is in the Public Domain; To the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. This work is published globally via the internet. :) Inclusion of works of previous authors is not included in the above. The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ -- View this message in context: http://forum.openscad.org/My-first-Openscad-file-just-went-through-the-makerbot-tutorial-and-now-I-m-stuck-tp12881p13402.html Sent from the OpenSCAD mailing list archive at Nabble.com.