1
我正在使用getclosest命令來查找頂點。Abaqus Python'Getclosest'命令
ForceVertex1 = hatInstance.vertices.getClosest(coordinates=((x,y,z,))
這與鍵0和兩個值(hatInstance.vertices [1]和頂點的座標)的特定輸出的字典對象:
{0: (mdb.models['EXP-100'].rootAssembly.instances['hatInstance-100'].vertices[1], (62.5242172081597, 101.192447407436, 325.0))}
每當我嘗試創建一組,頂點不被接受
mainAssembly.Set(vertices=ForceVertex1[0][0],name='LoadSet1')
我也嘗試了不同的方式:
tolerance = 1.0e-3
vertex = []
for vertex in hatInstance.vertices:
x = vertex.pointOn[0][0]
print x
y = vertex.pointOn[0][1]
print y
z = vertex.pointOn[0][2]
print z
break
if (abs(x-xTarget)) < tolerance and abs(y-yTarget) < tolerance and abs(z-zTarget) < tolerance):
vertex.append(hatInstance.vertices[vertex.index:vertex.index+1])
xTarget等是我的座標,儘管如此,我仍然沒有得到一個頂點對象