| 2442 | } |
| 2443 | |
| 2444 | void FemMesh::SaveDocFile(Base::Writer& writer) const |
| 2445 | { |
| 2446 | // create a temporary file and copy the content to the zip stream |
| 2447 | Base::FileInfo fi(App::Application::getTempFileName().c_str()); |
| 2448 | |
| 2449 | myMesh->ExportUNV(fi.filePath().c_str()); |
| 2450 | |
| 2451 | Base::ifstream file(fi, std::ios::in | std::ios::binary); |
| 2452 | if (file) { |
| 2453 | std::streambuf* buf = file.rdbuf(); |
| 2454 | writer.Stream() << buf; |
| 2455 | } |
| 2456 | |
| 2457 | file.close(); |
| 2458 | // remove temp file |
| 2459 | fi.deleteFile(); |
| 2460 | } |
| 2461 | |
| 2462 | void FemMesh::RestoreDocFile(Base::Reader& reader) |
| 2463 | { |
nothing calls this directly
no test coverage detected