add variant for 0.33l longneck bottles and move all remaining global stuff to examples.scad
This commit is contained in:
parent
9b7b0f89da
commit
35bdbc92a4
2 changed files with 55 additions and 34 deletions
|
@ -1,30 +1,19 @@
|
||||||
|
/**
|
||||||
|
* A name tag that can easily be clipped to the neck of your bottle.
|
||||||
|
* Copyright (C) 2013 Roland Hieber <rohieb+bottleclip@rohieb.name>
|
||||||
|
*
|
||||||
|
* See examples.scad for examples on how to use this module.
|
||||||
|
*
|
||||||
|
* The contents of this file are licenced under CC-BY-SA 3.0 Unported.
|
||||||
|
* See https://creativecommons.org/licenses/by-sa/3.0/deed for the
|
||||||
|
* licensing terms.
|
||||||
|
*/
|
||||||
|
|
||||||
include <write/Write.scad>
|
include <write/Write.scad>
|
||||||
|
|
||||||
// you don't need to change anything of the variables below, instead see the
|
|
||||||
// examples at the end of this file.
|
|
||||||
|
|
||||||
// defaults for 0.5l Club Mate bottles
|
|
||||||
// inner radius, upper side (13 mm for 0.5l Club Mate or 0.33l bottles)
|
|
||||||
ru=13; // [1,30]
|
|
||||||
// inner radius, lower side (17.5 mm for 0.5l Club Mate bottles, 15 mm for 0.33l
|
|
||||||
// bottles)
|
|
||||||
rl=17.5; // [1,30]
|
|
||||||
// total height. Keep at 26 mm for the default 0.5l/0.33l values above.
|
|
||||||
ht=26; // [1,30]
|
|
||||||
// wall thickness. Keep close to 2.5 mm so you can easily clip it to the bottle.
|
|
||||||
width=2.5; // [2,8]
|
|
||||||
|
|
||||||
// default logo and font
|
|
||||||
// logo DXF should be centered on 50mm*50mm to fit perfectly
|
|
||||||
logo="thing-logos/stratum0-lowres.dxf";
|
|
||||||
// font (see Write.scad description page for fonts)
|
|
||||||
font="write/orbitron.dxf";
|
|
||||||
|
|
||||||
$fn=50; // approximation steps for the cylinders
|
|
||||||
e=100; // should be big enough, used for the outer boundary of the text/logo
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates one instance of a bottle clip name tag.
|
* Creates one instance of a bottle clip name tag. The default values are
|
||||||
|
* suitable for 0.5l Club Mate bottles (and similar bottles).
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* ru: the radius on the upper side of the clip
|
* ru: the radius on the upper side of the clip
|
||||||
* rl: the radius on the lower side of the clip
|
* rl: the radius on the lower side of the clip
|
||||||
|
@ -41,6 +30,8 @@ e=100; // should be big enough, used for the outer boundary of the text/logo
|
||||||
*/
|
*/
|
||||||
module bottle_clip(ru=13, rl=17.5, ht=26, width=2.5, name="",
|
module bottle_clip(ru=13, rl=17.5, ht=26, width=2.5, name="",
|
||||||
logo="thing-logos/stratum0-lowres.dxf", font="write/orbitron.dxf") {
|
logo="thing-logos/stratum0-lowres.dxf", font="write/orbitron.dxf") {
|
||||||
|
|
||||||
|
e=100; // should be big enough, used for the outer boundary of the text/logo
|
||||||
difference() {
|
difference() {
|
||||||
rotate([0,0,-45]) union() {
|
rotate([0,0,-45]) union() {
|
||||||
// main cylinder
|
// main cylinder
|
||||||
|
@ -73,15 +64,15 @@ module bottle_clip(ru=13, rl=17.5, ht=26, width=2.5, name="",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
// template for 4 default bottle name tags
|
* Creates one instance of a bottle clip name tag suitable for 0.33l longneck
|
||||||
translate([ 22, 22,0]) rotate(180) bottle_clip(name="YourName");
|
* bottles (like fritz cola, etc.). All parameters are passed to the module
|
||||||
//translate([-22, 22,0]) rotate(270) bottle_clip(name="J. Hacker");
|
* bottle_clip(), see there for their documentation.
|
||||||
//translate([-22,-22,0]) rotate( 0) bottle_clip(name="Acid Burn");
|
*/
|
||||||
//translate([ 22,-22,0]) rotate( 90) bottle_clip(name="Zero Cool");
|
module bottle_clip_longneck(name="", width=2.5,
|
||||||
|
logo="thing-logos/stratum0-lowres.dxf", font="write/orbitron.dxf") {
|
||||||
// example for 0.33l bottles, different logo and different font
|
bottle_clip(name=name, ru=13, rl=15, ht=26, width=width, logo=logo,
|
||||||
//translate([ 22,-22,0]) rotate( 90) bottle_clip(name="YourName",
|
font=font);
|
||||||
// ru=13, rl=15, logo="yourlogo.dxf", font="Letters.dxf");
|
}
|
||||||
|
|
||||||
// vim: set noet ts=2 sw=2 tw=80:
|
// vim: set noet ts=2 sw=2 tw=80:
|
||||||
|
|
30
examples.scad
Normal file
30
examples.scad
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
/*
|
||||||
|
* Examples for bottle clip name tags.
|
||||||
|
* Copyright (C) 2013 Roland Hieber <rohieb+bottleclip@rohieb.name>
|
||||||
|
*
|
||||||
|
* You can simply comment out one of the examples, adapt it to your needs and
|
||||||
|
* render it, or use it to build your own variant.
|
||||||
|
*
|
||||||
|
* The contents of this file are licenced under CC-BY-SA 3.0 Unported.
|
||||||
|
* See https://creativecommons.org/licenses/by-sa/3.0/deed for the
|
||||||
|
* licensing terms.
|
||||||
|
*/
|
||||||
|
|
||||||
|
use <bottle-clip.scad>
|
||||||
|
|
||||||
|
$fn=50; // approximation steps for the cylinders
|
||||||
|
|
||||||
|
// one name tag for 0.5l Club Mate and similar bottles
|
||||||
|
bottle_clip(name="Zero Cool");
|
||||||
|
|
||||||
|
// one default name tag with a different logo.
|
||||||
|
//bottle_clip(name="Acid Burn", logo="thing-logos/glider.dxf");
|
||||||
|
|
||||||
|
// ...or with a different font:
|
||||||
|
//bottle_clip(name="Acid Burn", font="write/Letters.dxf");
|
||||||
|
// ...or with a differnet logo and a different font... you get it.
|
||||||
|
|
||||||
|
// Now for something completely different: Longneck bottles.
|
||||||
|
//bottle_clip_longneck(name="Tom Anderson", logo="thing-logos/glider.dxf");
|
||||||
|
|
||||||
|
// vim: set noet ts=2 sw=2 tw=80:
|
Loading…
Add table
Add a link
Reference in a new issue