Error of savemesh in 3D


I install windows version FreeFem 4.11 in win 10. But there is something wrong when I save 3D mesh.
So I test the following simple code:

load "msh3"
load "medit"
mesh3 Th3=cube(10,15,5);
savemesh(Th3, "surf.mesh");

The program is terminated when it runs to savemesh, then I get a empty surf.mesh file with 0KB, I don’t know what the problem is?

Thank you in advance.

Have you solved this problem yet?

I have the same problem as you

I think the problem is due to windows, add getpwd to know where you are !!!
like is:
bb.edp (177 Bytes)

I ran your code, the program can run normally, but the grid file is still empty after opening.

PLease remove the call to edit or exit of medif window by (esc in media windows) otherwise the program never execute the code after medif .

Did you find a solution? I have the same problem.

I tried running the code in bb.edp, but surf.mesh is still an empty file with 0 KB.

I then tried commenting out medit and plot:

load "msh3"
load "medit"
load "shell"
mesh3 Th3=cube(10,15,5);
cout << "pwd = " << getcwd()<< endl;// add version 4.9.1
savemesh(Th3, "surf.mesh");

The console output is:

and then the console disappears, and surf.mesh is created as an empty file with 0 KB.

This should be fixed in the next version of FreeFEM.

OK, in the meantime is there another way to save 3D meshes in .msh or .mesh format for plotting in Octave without using savemesh?

Yes, use a Linux or macOS (virtual) machine.

Ok thanks. I also found that uninstalling version 4.11 and installing version 4.9 (Releases · FreeFem/FreeFem-sources · GitHub) works on Windows.