Add cat ears
This commit is contained in:
parent
0763961823
commit
febf25566d
3 changed files with 61 additions and 35 deletions
|
@ -26,6 +26,10 @@ on:
|
||||||
- pixel-cats/spooked-right.svg
|
- pixel-cats/spooked-right.svg
|
||||||
- pixel-cats/standing-left.svg
|
- pixel-cats/standing-left.svg
|
||||||
- pixel-cats/standing-right.svg
|
- pixel-cats/standing-right.svg
|
||||||
|
ears:
|
||||||
|
description: 'Cat Ears'
|
||||||
|
default: false
|
||||||
|
type: boolean
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
|
@ -47,6 +51,7 @@ jobs:
|
||||||
env:
|
env:
|
||||||
LABEL: "${{ inputs.label }}"
|
LABEL: "${{ inputs.label }}"
|
||||||
ICON: "${{ inputs.icon }}"
|
ICON: "${{ inputs.icon }}"
|
||||||
|
EARS: "${{ inputs.ears }}"
|
||||||
|
|
||||||
- name: Render to STL
|
- name: Render to STL
|
||||||
run: openscad --export-format binstl -o bottle-clip.stl ci.scad
|
run: openscad --export-format binstl -o bottle-clip.stl ci.scad
|
||||||
|
|
|
@ -58,11 +58,14 @@ module multicolor(color) {
|
||||||
* text_color: The color of the text
|
* text_color: The color of the text
|
||||||
* logo_color: The color of the logo
|
* logo_color: The color of the logo
|
||||||
*/
|
*/
|
||||||
module bottle_clip(ru=13, rl=17.5, ht=26, width=2.5, name="", gap=90,
|
module bottle_clip(ru=13, rl=17.5, ht=26, width=2.5, name="", gap=90, ears=false,
|
||||||
logo="thing-logos/stratum0-lowres.dxf", font="write/orbitron.dxf",
|
logo="thing-logos/stratum0-lowres.dxf", font="write/orbitron.dxf",
|
||||||
bg_color="DEFAULT", text_color="DEFAULT", logo_color="DEFAULT") {
|
bg_color="DEFAULT", text_color="DEFAULT", logo_color="DEFAULT") {
|
||||||
|
|
||||||
e=100; // should be big enough, used for the outer boundary of the text/logo
|
e=100; // should be big enough, used for the outer boundary of the text/logo
|
||||||
|
|
||||||
|
difference() {
|
||||||
|
union() {
|
||||||
difference() {
|
difference() {
|
||||||
rotate([0,0,-45]) union() {
|
rotate([0,0,-45]) union() {
|
||||||
// main cylinder
|
// main cylinder
|
||||||
|
@ -82,9 +85,6 @@ module bottle_clip(ru=13, rl=17.5, ht=26, width=2.5, name="", gap=90,
|
||||||
import(logo);
|
import(logo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// inner cylinder which is substracted
|
|
||||||
translate([0,0,-1])
|
|
||||||
cylinder(r1=rl, r2=ru, h=ht+2);
|
|
||||||
// outer cylinder which is substracted, so the text and the logo end
|
// outer cylinder which is substracted, so the text and the logo end
|
||||||
// somewhere on the outside ;-)
|
// somewhere on the outside ;-)
|
||||||
difference () {
|
difference () {
|
||||||
|
@ -103,6 +103,27 @@ module bottle_clip(ru=13, rl=17.5, ht=26, width=2.5, name="", gap=90,
|
||||||
linear_extrude(height=50)
|
linear_extrude(height=50)
|
||||||
polygon(points=[[0,0], [gap_x, gap_y], [50,50], [gap_y, gap_x]]);
|
polygon(points=[[0,0], [gap_x, gap_y], [50,50], [gap_y, gap_x]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Cat ears!
|
||||||
|
if (ears) {
|
||||||
|
ear_size = 8;
|
||||||
|
rotate([0, 0, 45])
|
||||||
|
for (m = [0 : 1]) mirror([0, m, 0])
|
||||||
|
rotate([0, 0, -60])
|
||||||
|
translate([0, 0, ht-3])
|
||||||
|
rotate([0, -90, 0])
|
||||||
|
translate([0, 0, ru])
|
||||||
|
rotate([0, -30, 0])
|
||||||
|
// Ear solid
|
||||||
|
translate([0,0,-1])
|
||||||
|
linear_extrude(2)
|
||||||
|
polygon(points = [ [0, -ear_size], [0, ear_size], [ear_size*2, 1], [ear_size*2, -1] ]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// inner cylinder which is substracted
|
||||||
|
translate([0,0,-1])
|
||||||
|
cylinder(r1=rl, r2=ru, h=ht+2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
include <bottle-clip.scad>
|
include <bottle-clip.scad>
|
||||||
|
|
||||||
bottle_clip(name="$LABEL", logo="$ICON");
|
bottle_clip(name="$LABEL", logo="$ICON", ears=$EARS);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue