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>
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
"""
|
||||
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")
|
||||
Reference in New Issue
Block a user