seedling tray generation script
This commit is contained in:
+2
-12
@@ -5,24 +5,14 @@ import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
from utils import ask_float
|
||||
|
||||
|
||||
BASE_DIR = Path(__file__).resolve().parent
|
||||
SCAD_DIR = BASE_DIR / "flower_pot"
|
||||
OUT_DIR = BASE_DIR / "stl"
|
||||
|
||||
|
||||
def ask_float(prompt: str) -> float:
|
||||
while True:
|
||||
try:
|
||||
value = float(input(prompt).strip())
|
||||
if value <= 0:
|
||||
print("Please enter a positive number.")
|
||||
continue
|
||||
return value
|
||||
except ValueError:
|
||||
print("Please enter a valid number.")
|
||||
|
||||
|
||||
def render_scad(scad_file: Path, out_file: Path, base_radius: float, wall_height: float, wall_height_tray: float) -> None:
|
||||
cmd = (
|
||||
f'openscad '
|
||||
|
||||
Reference in New Issue
Block a user