From: daniel watson Date: Tue, 29 Mar 2016 07:31:35 +0000 (-0700) Subject: create open source hardware logo in openscad X-Git-Url: http://challenge-bot.com/repos/?p=challenge-bot;a=commitdiff_plain;h=1c181d4dd70f4b676edaa213a3b2fb11f99c8543 create open source hardware logo in openscad --- diff --git a/3d-printables/open-source-hardware-logo-data.scad b/3d-printables/open-source-hardware-logo-data.scad new file mode 100644 index 0000000..87c03c5 --- /dev/null +++ b/3d-printables/open-source-hardware-logo-data.scad @@ -0,0 +1,68 @@ +/* + challenge-bot + project available here: + https://challenge-bot.com/ + + Copyright (C) 2016 Daniel Watson + See the end of the file for license conditions. + tl;dr GNU AGPLv3 (or later at your option) + */ + +/* + open source hardware logo data + this file contains all the data, and nothing else + see open-source-hardware-logo.scad for example use + */ + +// keep around 20 for editing, 100 for final output +$fn = 100; + +open_source_hardware_logo_radius = 10; +open_source_hardware_logo_depth = 5; + +module octogon_slice_upper_half(radius) { + polygon([[0, 0], + [radius, tan(360 / (8 * 2)) * radius], + [radius, 0]]); } + +module open_source_hardware_spoke_upper_half(radius) { + difference(){ + octogon_slice_upper_half(radius); + circle(radius / 4); + translate([radius * 3 / 4, + (5 / 12) * tan(360 / (8 * 2)) * radius]) { + rotate(-360 / 32) { + square(radius); } + rotate(360 / 16) { + square(radius); } } } } + +module open_source_hardware_spoke(radius) { + open_source_hardware_spoke_upper_half(radius); + mirror([0, 1, 0]) { + open_source_hardware_spoke_upper_half(radius); } } + +module open_source_hardware_logo_2d(radius) { + for(spoke_number = [-1 : 5]){ + rotate(spoke_number * (360 / 8)) { + open_source_hardware_spoke(radius); } } } + +module open_source_hardware_logo(radius, depth) { + linear_extrude(height = depth) { + open_source_hardware_logo_2d(radius); } } + +/* + 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 . +*/ diff --git a/3d-printables/open-source-hardware-logo.scad b/3d-printables/open-source-hardware-logo.scad new file mode 100644 index 0000000..d1030f0 --- /dev/null +++ b/3d-printables/open-source-hardware-logo.scad @@ -0,0 +1,38 @@ +/* + challenge-bot + project available here: + https://challenge-bot.com/ + + Copyright (C) 2016 Daniel Watson + See the end of the file for license conditions. + tl;dr GNU AGPLv3 (or later at your option) + */ + +/* + open source hardware logo use + this file draws open source hardware logo using data from + open-source-hardware-logo-data.scad + */ + +/* deck-data.scad gives deck_depth */ +include + +open_source_hardware_logo(open_source_hardware_logo_radius, + open_source_hardware_logo_depth); + +/* + 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 . +*/