def ShowCooordsTopology(coords,topo):
'''Plots the STL if coords and topology is given. '''
ax = a3d.Axes3D(plt.figure())
xm,ym,zm=coords.max(axis=0)
xmi,ymi,zmi =coords.min(axis=0)
for nodes in topo:
tri = a3d.art3d.Poly3DCollection([coords[nodes,:3]])
tri.set_color(colors.rgb2hex([0.9,0.6,0.]))
tri.set_edgecolor('k')
ax.add_collection3d(tri)
ax.set_xlim3d([xmi,xm])
ax.set_ylim3d([ymi,ym])
ax.set_zlim3d([zmi,zm])
plt.show()
评论列表
文章目录