mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-25 13:30:34 +05:00
loading compressed mesh fix
This commit is contained in:
parent
bc96ff071f
commit
57ae0336da
@ -136,7 +136,7 @@ loadinifile;
|
||||
.ngmenu.file add command -label "Load Mesh..." -accelerator "<l><m>" \
|
||||
-command {
|
||||
set types {
|
||||
{"Mesh file" {.vol} } }
|
||||
{"Mesh file" {.vol .vol.gz} } }
|
||||
set file [tk_getOpenFile -filetypes $types -defaultextension ".vol"]
|
||||
if {$file != ""} {
|
||||
AddRecentMeshFile $file;
|
||||
|
@ -213,8 +213,7 @@ namespace netgen
|
||||
{
|
||||
string filename (argv[1]);
|
||||
|
||||
if ( (strlen (filename.c_str()) > 4) &&
|
||||
strcmp (&filename[strlen (filename.c_str())-4], ".vol") != 0 )
|
||||
if (filename.find(".vol") == string::npos)
|
||||
{
|
||||
return Ng_ImportMesh(clientData,interp,argc,argv);
|
||||
}
|
||||
@ -225,7 +224,8 @@ namespace netgen
|
||||
try
|
||||
{
|
||||
istream * infile;
|
||||
if (filename.substr (filename.length()-3, 3) == ".gz")
|
||||
// if (filename.substr (filename.length()-3, 3) == ".gz")
|
||||
if (filename.find(".vol.gz") != string::npos)
|
||||
infile = new igzstream (filename.c_str());
|
||||
else
|
||||
infile = new ifstream (filename.c_str());
|
||||
|
Loading…
Reference in New Issue
Block a user