From e2aa0c2a83fc548e8a38c83f38dea734f2f3a9b1 Mon Sep 17 00:00:00 2001 From: Ajabep Date: Sun, 11 Jan 2026 10:08:56 +0100 Subject: [PATCH] Add the HAS_EARS var and rename the RENDER_EARS to RENDER_COLOR_EARS Add the HAS_EARS variable to be able to generate bottle clips without ears. Rename the RENDER_EARS to RENDER_COLOR_EARS --- c3cat-bottle-clip/c3cat-bottle-clip.scad | 10 ++++++---- generate_bottle_tag.sh | 12 +++++++++++- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/c3cat-bottle-clip/c3cat-bottle-clip.scad b/c3cat-bottle-clip/c3cat-bottle-clip.scad index c0f1388..3d11766 100644 --- a/c3cat-bottle-clip/c3cat-bottle-clip.scad +++ b/c3cat-bottle-clip/c3cat-bottle-clip.scad @@ -39,6 +39,8 @@ FONT = ""; // empty string is for Orbitron font // Format of the bottle clip you want to create. FORMAT = 3; // [0=Club Mate 50cL, 1=Long Neck as 25cL Club Mate or Fritz-kola, 2=Euroform 2, 3=Steinie bottles] +// Append ears to the bottle clip +HAS_EARS = true; /* [Render] */ // Whether to render the clip, the body. @@ -47,8 +49,8 @@ RENDER_COLOR_CLIP = true; RENDER_COLOR_TEXT = true; // Whether to render the logo part. RENDER_COLOR_LOGO = true; -// Add ears to the clip. -USE_TINY_EARS = true; +// Whether to render the cat ears part. +RENDER_COLOR_EARS = true; // Set the number of facets for circles. $fn = 360; @@ -82,7 +84,7 @@ scale([0.2, 0.2, 0.2]) { font=FONT, logo=LOGO_FILE, format=FORMAT, - has_ears=USE_TINY_EARS); + has_ears=HAS_EARS); } module render_bottle_clip(name="", font="", logo="", format=0, has_ears=true) { @@ -122,7 +124,7 @@ module render_bottle_clip(name="", font="", logo="", format=0, has_ears=true) { } // Render ears if requested - if (has_ears) { + if (has_ears && RENDER_COLOR_EARS) { ears(ht=ht, ru=ru, rl=rl); } } diff --git a/generate_bottle_tag.sh b/generate_bottle_tag.sh index 6707ea4..bc90159 100755 --- a/generate_bottle_tag.sh +++ b/generate_bottle_tag.sh @@ -18,16 +18,25 @@ render() { CLIP=true TEXT=false LOGO=false + EARS=false ;; name) CLIP=false TEXT=true LOGO=false + EARS=false ;; logo) CLIP=false TEXT=false LOGO=true + EARS=false + ;; + ears) + CLIP=false + TEXT=false + LOGO=false + EARS=true ;; *) echo 'fatal: invalid part' >&2 @@ -50,6 +59,7 @@ render() { -D "RENDER_COLOR_CLIP=${CLIP}" \ -D "RENDER_COLOR_TEXT=${TEXT}" \ -D "RENDER_COLOR_LOGO=${LOGO}" \ + -D "RENDER_COLOR_EARS=${EARS}" \ -o "stls/c3cat-bottle-clip-v${VERSION}_BOTTLE${BOTTLE_FORMAT}_${NAME}_${PART}.stl" \ c3cat-bottle-clip/c3cat-bottle-clip.scad } @@ -59,7 +69,7 @@ cd "$(dirname $0)" for BOTTLE_FORMAT in 0 1 2 do echo "Generating bottle format ${BOTTLE_FORMAT}" - for PART in body logo name + for PART in body logo name ears do render "$NAME" "$PART" "$BOTTLE_FORMAT" sleep 1