Skip to content

Commit

Permalink
Add example of using tetgen from points
Browse files Browse the repository at this point in the history
  • Loading branch information
inducer committed Mar 20, 2015
1 parent 933399a commit c398e5b
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/test_meshpy.py
Expand Up @@ -133,6 +133,23 @@ def test_torus():

build(mesh_info)


def test_tetgen_points():
from meshpy.tet import MeshInfo, build, Options

import numpy as np
points = np.random.randn(10000, 3)

mesh_info = MeshInfo()
mesh_info.set_points(points)
options = Options("")
mesh = build(mesh_info, options=options)

print len(mesh.points)
print len(mesh.elements)

#mesh.write_vtk("test.vtk")

# }}}


Expand Down

0 comments on commit c398e5b

Please sign in to comment.