()
| 99 | return pymesh.form_mesh(out_vertices, np.zeros((0, 3)), mesh.voxels); |
| 100 | |
| 101 | def main(): |
| 102 | args = parse_args(); |
| 103 | basename, ext = os.path.splitext(args.output_mesh); |
| 104 | |
| 105 | mesh = pymesh.load_mesh(args.input_mesh); |
| 106 | mesh = generate_tet_mesh(mesh); |
| 107 | pymesh.save_mesh("{}_source.msh".format(basename), mesh); |
| 108 | |
| 109 | bd_vertex_indices, bd_vertex_positions = map_boundary_to_sphere( |
| 110 | mesh, basename); |
| 111 | out_mesh = tutte_3D(mesh, bd_vertex_indices, bd_vertex_positions); |
| 112 | |
| 113 | tet_orientations = pymesh.get_tet_orientations(out_mesh); |
| 114 | out_mesh.add_attribute("orientation"); |
| 115 | out_mesh.set_attribute("orientation", tet_orientations); |
| 116 | pymesh.save_mesh(args.output_mesh, out_mesh, "orientation"); |
| 117 | |
| 118 | if __name__ == "__main__": |
| 119 | main(); |
no test coverage detected