0

I have correctly installed and implemented MeshPy on win7. I have tested the example provided with the documentation:

from meshpy.tet import MeshInfo, build
mesh_info = MeshInfo()
mesh_info.set_points([
    (0,0,0),  (2,0,0), 
    (2,2,0),  (0,2,0), 
    (0,0,12), (2,0,12),  
    (2,2,12), (0,2,12) ])
mesh_info.set_facets([
    [0,1,2,3], [4,5,6,7],
    [0,4,5,1], [1,5,6,2],
    [2,6,7,3], [3,7,4,0],
    ])

mesh = build(mesh_info)
print "Mesh Points:"
for i, p in enumerate(mesh.points):
    print i+1, p
print "Point numbers in tetrahedra:"
for i, t in enumerate(mesh.elements):
    print i+1, t
mesh.write_vtk("test.vtk")

everythings works good. But when I try to define a closed surface using triangles it does not create the mesh, more precisely python crasches. Here is the code:

mesh_info = MeshInfo()
mesh_info.set_points([
        (-30502.62,-23538.02,0.0),
        (-30502.62,35262.39,0.0),
        (24621.61,35262.39,0.0),
        (24621.61,-23538.02,0.0),
        (-30502.62,-23538.02,49546.25),
        (24621.61,-23538.02,49546.25),
        (24621.61,35262.39,49546.25),
        (-30502.62,35262.39,49546.25),
 ])
mesh_info.set_facets([
    [1,2,3], [3,4,1],
    [5,6,7], [7,8,5],
    [1,4,6], [6,5,1],
    [4,3,7], [7,6,4],
    [3,2,8], [8,7,3],
    [2,1,5], [5,8,2],
    ])
drSlump
  • 307
  • 4
  • 16

0 Answers0