qingfeng.xia wrote: ping
1) src/Mod/Fem/feminout/importGmshMesh.pybernd wrote: ↑Tue Sep 03, 2019 11:47 firstname.lastname@example.org
It's been a while ... Are you still interested in merging this? I rebased it on master. See https://github.com/berndhahnebach/FreeC ... gmshexport I may go for some refactor in gmsh tools. Means this should be merged before.
To be merged it would need some testing and may be one or two fixes.
Code: Select all
#to run this test script in console #mo= #get the meshobj in FreeCAD python console, then paste the lines into the console import femmesh.gmshtools as gmshtools gmsh = gmshtools.GmshTools(mo) from importGmshMesh import _run_command for k in gmshtools.GmshTools.output_format_suffix: fileString = "/tmp/test" + gmshtools.GmshTools.output_format_suffix[k] ret = gmsh.export_mesh(k, fileString) _run_command(["gmsh", "-open", fileString])
stair wrote: ↑Tue Sep 03, 2019 4:45 pmCan I request that one of the export formats is GMSH V2 although I am not certain how to achieve this since I have been unable to find the correct switch in the GMSH docs even though it is a GUI option.
Slightly off topic but definitely relevant, it would be very convenient to be able to write the .geo file to a user location, or even just along side the .fcstd, without having to actually generate the mesh and then dig out shape2mesh.geo
It has been on my ToDo for a long time to check if it makes sense to reuse the solver code which defines the input file location for the gmsh mesh creation as well. IMHO it makes sense to save them both on the same location. I may have a look at this. This is related to https://github.com/FreeCAD/FreeCAD/pull/2465