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

Method RestoreDocFile

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

Source from the content-addressed store, hash-verified

2460}
2461
2462void FemMesh::RestoreDocFile(Base::Reader& reader)
2463{
2464 // create a temporary file and copy the content from the zip stream
2465 Base::FileInfo fi(App::Application::getTempFileName().c_str());
2466
2467 // read in the ASCII file and write back to the file stream
2468 Base::ofstream file(fi, std::ios::out | std::ios::binary);
2469 if (reader) {
2470 reader >> file.rdbuf();
2471 }
2472 file.close();
2473
2474 // read the shape from the temp file
2475 myMesh->UNVToMesh(fi.filePath().c_str());
2476
2477 // delete the temp file
2478 fi.deleteFile();
2479}
2480
2481void FemMesh::transformGeometry(const Base::Matrix4D& rclTrf)
2482{

Callers

nothing calls this directly

Calls 5

UNVToMeshMethod · 0.80
c_strMethod · 0.45
closeMethod · 0.45
filePathMethod · 0.45
deleteFileMethod · 0.45

Tested by

no test coverage detected