mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-01 20:40:28 +02:00
add nose param
This commit is contained in:
@@ -4,14 +4,15 @@ use <multi_line_text.scad>;
|
|||||||
text = "順暢";
|
text = "順暢";
|
||||||
font = "思源黑體 Heavy";
|
font = "思源黑體 Heavy";
|
||||||
font_size = 15;
|
font_size = 15;
|
||||||
|
nose = true;
|
||||||
smoothing = false; // warning: previewing is slow if it's true.
|
smoothing = false; // warning: previewing is slow if it's true.
|
||||||
|
|
||||||
scale(smoothing ? 0.985 : 1)
|
scale(smoothing ? 0.985 : 1)
|
||||||
daruma();
|
daruma(nose);
|
||||||
|
|
||||||
wish_decoration(text, font, font_size);
|
wish_decoration(text, font, font_size);
|
||||||
|
|
||||||
module daruma() {
|
module daruma(nose) {
|
||||||
radius = 10;
|
radius = 10;
|
||||||
|
|
||||||
module body() {
|
module body() {
|
||||||
@@ -114,10 +115,12 @@ module daruma() {
|
|||||||
eye();
|
eye();
|
||||||
|
|
||||||
// nose
|
// nose
|
||||||
translate([0, -3.75 * radius, radius * 4.85])
|
if(nose) {
|
||||||
rotate([67.5, 0, 0])
|
translate([0, -3.75 * radius, radius * 4.85])
|
||||||
linear_extrude(radius / 4, scale = 0.9)
|
rotate([67.5, 0, 0])
|
||||||
circle(radius * 0.4);
|
linear_extrude(radius / 4, scale = 0.9)
|
||||||
|
circle(radius * 0.4);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(smoothing) {
|
if(smoothing) {
|
||||||
|
@@ -5,13 +5,14 @@ use <hull_polyline2d.scad>;
|
|||||||
text = "順暢";
|
text = "順暢";
|
||||||
font = "思源黑體 Medium";
|
font = "思源黑體 Medium";
|
||||||
font_size = 15;
|
font_size = 15;
|
||||||
|
nose = true;
|
||||||
model = "both"; // [daruma, helmet, both]
|
model = "both"; // [daruma, helmet, both]
|
||||||
|
|
||||||
scale(.7) {
|
scale(.7) {
|
||||||
if(model == "daruma") {
|
if(model == "daruma") {
|
||||||
difference() {
|
difference() {
|
||||||
union() {
|
union() {
|
||||||
daruma();
|
daruma(nose);
|
||||||
wish_decoration(text, font, font_size);
|
wish_decoration(text, font, font_size);
|
||||||
}
|
}
|
||||||
translate([0, 0, -23])
|
translate([0, 0, -23])
|
||||||
@@ -26,7 +27,7 @@ scale(.7) {
|
|||||||
else {
|
else {
|
||||||
difference() {
|
difference() {
|
||||||
union() {
|
union() {
|
||||||
daruma();
|
daruma(nose);
|
||||||
wish_decoration(text, font, font_size);
|
wish_decoration(text, font, font_size);
|
||||||
}
|
}
|
||||||
translate([0, 0, -24.5])
|
translate([0, 0, -24.5])
|
||||||
|
Reference in New Issue
Block a user