Last active
December 17, 2015 15:18
-
-
Save heiths/5630258 to your computer and use it in GitHub Desktop.
cube test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pymel.core import * | |
def cubeCube(): | |
rows = int(raw_input("rows")) | |
columns = int(raw_input("columns")) | |
hight = int(raw_input("hight")) | |
r = 0 | |
c = 0 | |
h = 0 | |
for i in range(0, rows * columns * hight): | |
p = polyCube(name = "box_i-{0}_r-{1}_c-{2}_h-{3}".format(i, r, c, h))[0] | |
if c == columns and r == rows: | |
h += 1 | |
c = 0 | |
r = 0 | |
if c == columns: | |
r += 1 | |
c = 0 | |
p.t.set(r, h, c) | |
c += 1 | |
print("i = {0}\tr = {1}\tc = {2}\th = {3}".format(i, r, c, h)) | |
cubeCube() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment