Skip to content

Instantly share code, notes, and snippets.

@jwygralak67
Created December 17, 2014 06:54
Show Gist options
  • Save jwygralak67/3f666200e495e6962e55 to your computer and use it in GitHub Desktop.
Save jwygralak67/3f666200e495e6962e55 to your computer and use it in GitHub Desktop.
Pen stand designed in openjscad
// Title: E-cig Pen Stand
// Author: Jim Wygralak
// Date: Dec 17, 2014
// License: Attribution-NonCommercial-ShareAlike 4.0 International
// http://creativecommons.org/licenses/by-nc-sa/4.0/
var inch = 25.4;
var h = 0.125 * inch; // material thickness
var pdia = 5/8*inch; // pen diameter
function main() {
pen = cylinder({r: (pdia/2), h: (6 * inch)});
cradle = union(
difference(
cylinder({r:inch/2, h: h, center: [true, true, false]}),
cube([inch,inch/2,h]).translate([-inch/2, -inch/2,0]),
cylinder({r: pdia/2, h: h})
),
cylinder({r: 3/16*inch/2, h: h}).translate([inch/2-3/16*inch/2,0,0]),
cylinder({r: 3/16*inch/2, h: h}).translate([-(inch/2-3/16*inch/2),0,0])
);
shelf = difference(
cylinder({r: inch/2, h: 2*h, center: [true, true, false]}),
cylinder({r: pdia/2, h: h, center: [true, true, false]}).translate([0,0,h])
);
spine = cube([h, inch/2, 3.5 * inch + 2*h]).translate([-h/2, 0.5* inch,-h]);
return [
// pen,
cradle.translate([0,0,inch]),
cradle.translate([0,0,2.25*inch]),
cradle.translate([0,0,3.5*inch]),
shelf.translate([0,0,-h]),
spine
];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment