Files
cadquery/models/box.py
T
nova af1a946641 Add box model: 40x60x50mm, 2mm wall/floor
Offene Box mit CadQuery shell()-Methode:
- Außenmaße: 40 x 60 x 50 mm
- Wand- und Bodenstärke: 2 mm
- Oben offen
- Volumen: 23232 mm³

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-13 12:20:07 +01:00

24 lines
464 B
Python

"""
Offene Box: 40 x 60 x 50 mm, Wand- und Bodenstärke 2 mm
"""
import cadquery as cq
from cadquery import exporters
from pathlib import Path
OUTPUT = Path.home() / "3d-models"
OUTPUT.mkdir(exist_ok=True)
wall = 2
result = (
cq.Workplane("XY")
.box(40, 60, 50)
.faces(">Z")
.shell(-wall)
)
out = OUTPUT / "box_40x60x50.stl"
exporters.export(result, str(out))
print(f"STL gespeichert: {out}")
print(f"Größe: {out.stat().st_size // 1024} KB")