I created some test-code to test the refinement function feature of Tetgen
I wanted to use the "load_mtr"-file function in order to define a mesh
sizing function on the nodes.
Here the minimal code:
from meshpy.tet import MeshInfo, build, Options
mesh_info = MeshInfo()
points = [(0,0,0), (1,0,0), (1,1,0), (0,1,0),
(0,0,1), (1,0,1), (1,1,1), (0,1,1)]
facets = [(0,1,2,3), (4,5,6,7), (0,1,5,4), (1,2,6,5), (2,3,7,6),
f = open('myRefine.mtr', 'wb')
f.write('# myRefine.mtr\n8 1\n')
for i in range(8):
mesh = build(mesh_info, options=Options("qpm"))
if __name__ == "__main__":
Somehow I receive a "RuntimeError: load_mtr failed" message when running the
Does anyone has an idea on this?
PS: The functions like mesh.save_nodes(filename) are working without
problems for me.