|
0金币
本帖最后由 express 于 2010-5-16 13:26 编辑
本人正在学习VITESSE建设备,自己写的无法运行成功,如下请赐教
#
# NAME:
#
# volum.py
#
# PURPOSE:
#
# This example shows how to creat a volume
#
import kcs_ui
import kcs_util
import kcs_vol
import KcsStringlist
import KcsTransformation3D
import KcsPoint3D
import KcsVector3D
import KcsVolPrimitiveBlock
#-------------------------------------------------------------------------------------
------------------------
try:
volName = kcs_ui.string_req('Key in name of volum')
try:
kcs_vol.vol_new(volName[1], 2000)
try:
subVolID=kcs_vol.subvol_add()
primitive=KcsVolPrimitiveBlock. VolPrimitiveBlock()
corner1=KcsPoint3D.Point3D(0,0,0)
corner2=KcsPoint3D.Point3D(100,500,500)
primitive.SetBox(corner1,corner2)
volPrimID_ID=kcs_vol.Primitive_add(subVolID,primitive)
kcs_vol.vol_save()
finally:
kcs_vol.vol_close()
except:
print "fail"
except:
print "Failed creating vol" |
|