extrusion.py
extrusion.py — text/python-source, 1 KB
Dateiinhalt
# Extrusions - Bau einer Rinne from visual import * # 1. create shape ri = shapes.circle(pos=(0,0,0), radius=2) # Innenkreis ra = shapes.circle(pos=(0,0,0), radius=3) # Aussenkreis re = Polygon([(-3,3),(-3,0),(3,0),(3,3)]) # Rechteck # 2. create path quartercircle = paths.arc(radius=3, up=(0,1,0), angle2=pi) # Halbkreis um (0,0) straight = [(-3,0,8),(-3,0,0)] # einfache Strecke # 3. create extrusion extrusion(pos=quartercircle,shape=ra-ri, material=materials.rough) # Rohrbogen extrusion(pos=straight, shape=ra-ri-re, material=materials.wood) # Rinne