本文整理汇总了Python中mesh.Mesh.merge方法的典型用法代码示例。如果您正苦于以下问题:Python Mesh.merge方法的具体用法?Python Mesh.merge怎么用?Python Mesh.merge使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mesh.Mesh
的用法示例。
在下文中一共展示了Mesh.merge方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: in
# 需要导入模块: from mesh import Mesh [as 别名]
# 或者: from mesh.Mesh import merge [as 别名]
# for segment_id in (654, 665, 1009, 1538, 1620, 1621, 1667, 1668, 1680, 1723, 1936, 1960, 2029, 2086, 2146, 2163, 2184, 2196, 2197, 2215, 2231, 2334, 2376, 2419, 2453, 2613):
# for x in range(2):
# for y in range(2):
# for z in range(2):
# vertex = api.getSegmentMesh(segmentation_id,x,y,z,segment_id);
# if vertex != None:
# consensus.merge( Mesh(vertex))
# consensus.displayStats()
# consensus.dump('consensus.ctm')
overview = Mesh()
for x in range(21,23):
for y in range(27,29):
for z in range(26,28):
vertex = api.getOverviewMesh(cell_id, 0 , x , y, z);
if vertex != None:
print x,y,z
mesh = Mesh(vertex)
mesh.scale(0.5,0.5,0.5)
mesh.move(x * 128, y*128 , z*128)
overview.merge( mesh )
overview.displayStats()
overview.dump('overview.ctm')
示例2: Mesh
# 需要导入模块: from mesh import Mesh [as 别名]
# 或者: from mesh.Mesh import merge [as 别名]
import api
from mesh import Mesh
from mayavi import mlab
vertex = api.getSegmentMesh(47339,0,0,0,1668);
mesh_1 = Mesh(vertex)
mesh_1.displayStats()
vertex_2 = api.getSegmentMesh(47339,1,0,0,1668);
mesh_2 = Mesh(vertex_2)
mesh_2.displayStats()
mesh_1.merge(mesh_2)
mesh_1.displayStats()
mesh_1.weldVertices(0.002)
mesh_1.removeZeroAreaTriangles()
mesh_1.displayStats()
mesh_1.dump()
mesh_1.displayMesh(mlab)
mlab.show()