Advertisement
Guest User

Untitled

a guest
Jan 20th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.66 KB | None | 0 0
  1. def ggpl_stairs_and_platform(dx,dy,dz):
  2.  
  3.     #get steps dimensions
  4.     stepX=dx/2
  5.     stepY=dy/10 #suppose the platform big long as four steps
  6.     stepZ=dz/15
  7.  
  8.     #counter for height and distance
  9.     countH=stepZ
  10.     countD=stepY
  11.     #building single step
  12.     step=CUBOID([stepX,stepY,stepZ])
  13.    
  14.     st=step
  15.     #cycle for creating first group of stairs
  16.     while countH<(stepZ*14):
  17.         add_step=T(2)(countD)(step)
  18.         countD+=stepY
  19.         st=STRUCT([st,T(3)(countH),add_step])
  20.         countH+=stepZ
  21.  
  22.     # creating the platform and using T transform
  23.     platform=CUBOID([dx,4*stepY,stepZ])
  24.     platform=T(2)(countD)(platform)
  25.    
  26.     #adding platform to struct
  27.     st=STRUCT([st,T(3)(countH),platform])
  28.  
  29.     VIEW(st)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement