SHOW:
|
|
- or go back to the newest paste.
1 | # this requires a polygonal object to already exist with some | |
2 | - | xValEven = 0 |
2 | + | # fairly specific edge numberings and positioning |
3 | # the top comments are notes on how maya constructs edges what are the appropriate | |
4 | # commands to add new faces to the existing ones. | |
5 | #stringconstruct = 'a=[' + str(10) + ',(-0,0,' + str(3)+ ')]' | |
6 | - | for i in range(1,10): |
6 | + | #eval('plg.polyAppend(' + stringconstruct + ')') |
7 | ||
8 | #stringconstruct = 'a=[' + str(7) + ',(-4,0,' + str(3)+ ')]' | |
9 | #eval('plg.polyAppend(' + stringconstruct + ')') | |
10 | ||
11 | #stringconstruct = 'a=[' + str(6) + ',(-0,0,' + str(2)+ ')]' | |
12 | #eval('plg.polyAppend(' + stringconstruct + ')') | |
13 | - | edgeNum = edgeNum + 3 |
13 | + | |
14 | #stringconstruct = 'a=[' + str(3) + ',(-4,0,' + str(2)+ ')]' | |
15 | #eval('plg.polyAppend(' + stringconstruct + ')') | |
16 | ||
17 | #stringconstruct = 'a=[' + str(2) + ',(-0,0,' + str(1)+ ')]' | |
18 | #eval('plg.polyAppend(' + stringconstruct + ')') | |
19 | import math | |
20 | import maya.cmds as plg | |
21 | ||
22 | edgeNum = 2 | |
23 | xValEven = 1 | |
24 | xValOdd = -4 | |
25 | yVal = 0 | |
26 | zVal = 1 | |
27 | for i in range(1,100): | |
28 | stringconstruct = 'a=[' + str(edgeNum) + ',(' + str(xValEven) + ',0,' + str(zVal)+ ')]' | |
29 | eval('plg.polyAppend(' + stringconstruct + ')') | |
30 | edgeNum = edgeNum + 1 | |
31 | zVal = zVal + 1 | |
32 | stringconstruct = 'a=[' + str(edgeNum) + ',(' + str(xValOdd) + ',0,' + str(zVal)+ ')]' | |
33 | eval('plg.polyAppend(' + stringconstruct + ')') | |
34 | edgeNum = edgeNum + 3 | |
35 | xValEven = math.cos((i*math.pi)/5) | |
36 | xValOdd = math.cos((i*math.pi)/5)-4 | |
37 |