| 270 | throw Py::RuntimeError("No FEM mesh for export selected"); |
| 271 | } |
| 272 | Py::Object read(const Py::Tuple& args) |
| 273 | { |
| 274 | char* Name; |
| 275 | if (!PyArg_ParseTuple(args.ptr(), "et", "utf-8", &Name)) { |
| 276 | throw Py::Exception(); |
| 277 | } |
| 278 | |
| 279 | std::string EncodedName = std::string(Name); |
| 280 | PyMem_Free(Name); |
| 281 | |
| 282 | std::unique_ptr<FemMesh> mesh(new FemMesh); |
| 283 | mesh->read(EncodedName.c_str()); |
| 284 | return Py::asObject(new FemMeshPy(mesh.release())); |
| 285 | } |
| 286 | |
| 287 | #ifdef FC_USE_VTK |
| 288 | Py::Object frdToVTK(const Py::Tuple& args) |