MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / SaveDocFile

Method SaveDocFile

src/Mod/Fem/App/FemMesh.cpp:2444–2460  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2442}
2443
2444void 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
2462void FemMesh::RestoreDocFile(Base::Reader& reader)
2463{

Callers

nothing calls this directly

Calls 5

ExportUNVMethod · 0.80
c_strMethod · 0.45
filePathMethod · 0.45
closeMethod · 0.45
deleteFileMethod · 0.45

Tested by

no test coverage detected