#face_index3.py
doc=MQSystem.getDocument()
out=MQSystem.println
obj=doc.object[doc.currentObjectIndex]
out(str(obj.name))
count=obj.numFace
out("面の数:"+str(count))
ten=[]
for k in range(0,obj.numVertex):
out(str(obj.vertex[k].pos.x)+","+str(obj.vertex[k].pos.y)+","+str(obj.vertex[k].pos.z))
ten.append((obj.vertex[k].pos.x,obj.vertex[k].pos.y,obj.vertex[k].pos.z))
for i in range(0,count):
out("面のindex:"+str(obj.getFaceIndexFromUniqueID(i+1)))
out("頂点数"+str(str(obj.face[i].numVertex)))
for j in range(0,obj.face[i].numVertex):
out(str(obj.face[i].index[j])+":"+str(ten[obj.face[i].index[j]]))
■出力情報
plane_-1
面の数:2
-50.0,0.0,-100.0
50.0,0.0,-100.0
50.0,0.0,0.0
-50.0,0.0,0.0
-50.0,0.0,100.0
50.0,0.0,100.0
面のindex:0
頂点数4
0:(-50.0, 0.0, -100.0)
1:(50.0, 0.0, -100.0)
2:(50.0, 0.0, 0.0)
3:(-50.0, 0.0, 0.0)
面のindex:1
頂点数4
2:(50.0, 0.0, 0.0)
5:(50.0, 0.0, 100.0)
4:(-50.0, 0.0, 100.0)
3:(-50.0, 0.0, 0.0)
- -
- -