From c398e5bec38636f7d2f0966b6d348c88fb5241c0 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Fri, 20 Mar 2015 18:53:49 -0500 Subject: [PATCH] Add example of using tetgen from points --- test/test_meshpy.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/test/test_meshpy.py b/test/test_meshpy.py index 94bbef2..fb5b507 100644 --- a/test/test_meshpy.py +++ b/test/test_meshpy.py @@ -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") + # }}}