1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-01-17 14:18:13 +01:00
dotSCAD/examples/cat_corner_protector.scad

81 lines
1.7 KiB
OpenSCAD
Raw Normal View History

2022-06-06 13:11:46 +08:00
use <crystal_ball.scad>
2019-10-04 09:10:59 +08:00
radius = 15;
module cat_corner_protector(radius) {
module ear() {
translate([0, 0, radius * 0.85])
rotate([45, -90, 0])
translate([0, 0, -radius])
intersection() {
2019-10-04 09:44:28 +08:00
crystal_ball(
radius = radius,
theta = 360,
phi = 90,
thickness = 1
);
2019-10-04 09:10:59 +08:00
linear_extrude(radius * 1.5)
hull() {
translate([radius * 0.4, 0, 0])
circle(radius * 0.1);
circle(radius * 0.5, $fn = 3);
}
}
}
module beard_cube() {
linear_extrude(radius * 1.05)
square([radius * 0.0275, radius * 0.3], center = true);
}
color("white") rotate([50, 0, 25]) ear();
color("white") rotate([0, -50, -25]) ear();
// beards
color("black") intersection() {
crystal_ball(
radius = radius * 1.05,
theta = 360,
phi = 90,
thickness = radius * 0.05
);
union() {
rotate([0, 70, -5]) beard_cube();
rotate([0, 65, -5]) beard_cube();
rotate([0, 70, 95]) beard_cube();
rotate([0, 65, 95]) beard_cube();
}
}
// face
color("white")
difference() {
sphere(radius);
translate([-radius * 0.25 , -radius * 0.25, -radius * 1.25])
cube([radius * 1.5, radius * 1.5, radius * 1.5]);
}
// nose
color("black")
scale([1, 1, 0.75])
translate([radius * 0.6, radius * 0.6, radius * 0.55])
sphere(radius * 0.125);
// eyes
color("black")
translate([radius * 0.1, radius * 0.75, radius * 0.525])
sphere(radius * 0.115);
color("black")
translate([radius * 0.75, radius * 0.1, radius * 0.525])
sphere(radius * 0.115);
}
rotate(-135) cat_corner_protector(radius, $fn = 36);