X-Git-Url: http://challenge-bot.com/repos/?p=challenge-bot;a=blobdiff_plain;f=3d-printables%2Fdeck.scad;h=564d2c06f20f5e81f13d506954f79b8a7345a678;hp=77f64980cd65297cf2d14683530b248e4d77dbdd;hb=ce941be740b45737d19eaa5c726b2f99efabe0b9;hpb=765e35b627e6fefd8a2f2f72b33b8802ce8abebb diff --git a/3d-printables/deck.scad b/3d-printables/deck.scad index 77f6498..564d2c0 100644 --- a/3d-printables/deck.scad +++ b/3d-printables/deck.scad @@ -1,53 +1,34 @@ +/* + Copyright (C) 2015 Daniel Watson + See the end of the file for license conditions. +*/ // challenge-bot // GNU AGPLv3 (or later at your option) -// project available at these locations: -// https://gitorious.org/ozzloy/challenge-bot -// https://github.com/waynegramlich/challenge-bot +// project available here: +// https://challenge-bot.com/ -// all measurements are in mm unless stated otherwise - - // metric version of deck: -deck_length = 250; -deck_width = deck_length; -deck_depth = 5; -deck_pitch = 10; -deck_grid_hole = 3; -deck_hole_type = "square"; -deck_centered = true; - - /* - // imperial version of deck -deck_length = 203.2; // 8 inches -deck_width = deck_length; -deck_depth = 25.4 * 3 / 16; // 3 / 16 of an inch -deck_pitch = 25.4; // 1 inch -deck_grid_hole = 6.35 / 2; // 1/4 inch diameter, 1/8 inch radius -deck_hole_type = "circle"; - */ - -module deck_2d(width, length, pitch, hole, hole_type, center=false){ - center_width_offset = center ? -(width / 2): 0; - center_length_offset = center ? -(length / 2): 0; - translate([center_width_offset, center_length_offset]){ - difference(){ - square([width, length]); - for (y = [0:floor(length / pitch) - 1], - x = [0:floor(width / pitch) - 1]){ - translate([pitch * (x + 0.5), pitch * (y + 0.5)]){ - if (hole_type == "circle"){ - circle(hole, center = true);} - else if (hole_type == "square") { - square(hole, center = true);} - else { - echo(str("don't know the hole type: ", hole_type));}}}}}} - -module deck(width, length, depth, pitch, hole, hole_type, center=false){ - linear_extrude (height = depth){ - deck_2d(width, length, pitch, hole, hole_type, center);}} +include deck_2d(deck_width, deck_length, deck_pitch, deck_grid_hole, deck_hole_type, - center=deck_centered); + center = deck_centered); + +/* + This file is part of challenge-bot. + + Challenge-bot is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + GNU Affero Emacs is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with challenge-bot. If not, see . +*/