Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def ggpl_stairs_and_platform(dx,dy,dz):
- #get steps dimensions
- stepX=dx/2
- stepY=dy/10 #suppose the platform big long as four steps
- stepZ=dz/15
- #counter for height and distance
- countH=stepZ
- countD=stepY
- #building single step
- step=CUBOID([stepX,stepY,stepZ])
- st=step
- #cycle for creating first group of stairs
- while countH<(stepZ*14):
- add_step=T(2)(countD)(step)
- countD+=stepY
- st=STRUCT([st,T(3)(countH),add_step])
- countH+=stepZ
- # creating the platform and using T transform
- platform=CUBOID([dx,4*stepY,stepZ])
- platform=T(2)(countD)(platform)
- #adding platform to struct
- st=STRUCT([st,T(3)(countH),platform])
- VIEW(st)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement