mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-26 13:50:33 +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>" \
|
.ngmenu.file add command -label "Load Mesh..." -accelerator "<l><m>" \
|
||||||
-command {
|
-command {
|
||||||
set types {
|
set types {
|
||||||
{"Mesh file" {.vol} } }
|
{"Mesh file" {.vol .vol.gz} } }
|
||||||
set file [tk_getOpenFile -filetypes $types -defaultextension ".vol"]
|
set file [tk_getOpenFile -filetypes $types -defaultextension ".vol"]
|
||||||
if {$file != ""} {
|
if {$file != ""} {
|
||||||
AddRecentMeshFile $file;
|
AddRecentMeshFile $file;
|
||||||
|
@ -213,8 +213,7 @@ namespace netgen
|
|||||||
{
|
{
|
||||||
string filename (argv[1]);
|
string filename (argv[1]);
|
||||||
|
|
||||||
if ( (strlen (filename.c_str()) > 4) &&
|
if (filename.find(".vol") == string::npos)
|
||||||
strcmp (&filename[strlen (filename.c_str())-4], ".vol") != 0 )
|
|
||||||
{
|
{
|
||||||
return Ng_ImportMesh(clientData,interp,argc,argv);
|
return Ng_ImportMesh(clientData,interp,argc,argv);
|
||||||
}
|
}
|
||||||
@ -225,7 +224,8 @@ namespace netgen
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
istream * infile;
|
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());
|
infile = new igzstream (filename.c_str());
|
||||||
else
|
else
|
||||||
infile = new ifstream (filename.c_str());
|
infile = new ifstream (filename.c_str());
|
||||||
|
Loading…
Reference in New Issue
Block a user