一种方法:
p=[0,0,0]
while p.x < 3 do
(
p.y=0
while p.y < 3.0 do
(
p.z=0
while p.z < 3 do
(
curBox = box pos:p length: 1 width:1 height:1 wirecolor:red
p.z +=1
-- chamfer each box
convertToPoly curBox
--subobjectLevel = 2
curBox.edgeChamferSegments= 8
polyop.chamferEdges curBox curBox.edges 0.05
)
p.y +=1.0
)
p.x +=1.0
)
另一种方法:
http://www.3dworld-wide.com/rubiks_cube.html