GMSH macro
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
GMSH macro
I create a new thread for this macro which started to discuss here viewtopic.php?f=18&t=10066 and here viewtopic.php?f=18&t=10732&start=20
I've updated the macro adding support for 1D and 2D meshes, which can now be viewed on FreeCAD from version 0.16.5030. The macro may be found on the following github repository: https://github.com/psicofil/Macros_Free ... sh.FCMacro
sorry for my bad English
I've updated the macro adding support for 1D and 2D meshes, which can now be viewed on FreeCAD from version 0.16.5030. The macro may be found on the following github repository: https://github.com/psicofil/Macros_Free ... sh.FCMacro
sorry for my bad English
Ing. Gomez Lucio
Scope Ingenieria (scopeingenieria.com)
Scope Ingenieria (scopeingenieria.com)
Re: GMSH macro
New version.
-Add -clmin option, is optional
- clmax, -order are now optional
Regards
-Add -clmin option, is optional
- clmax, -order are now optional
Regards
Ing. Gomez Lucio
Scope Ingenieria (scopeingenieria.com)
Scope Ingenieria (scopeingenieria.com)
Re: GMSH macro
I tried the macro on Windows and got the following error:
There seems to be a problem with the path to the temporary step file. This path should not contain backslashes.
Ulrich
OS: Windows 7
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.16.5096 (Git)
Build type: Release
Branch: master
Hash: d0d98b87751f4e5308916f509b72f14053caa61e
Python version: 2.7.8
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
Code: Select all
Running: C:/Users/ubrammer/gmsh-2.8.3-Windows/gmsh.exe c:\users\ubrammer\appdata\local\temp\tmpspflzn.step -3 -format unv -o /tmp/Part__Feature_Mesh.unv -algo netgen -clmax 5,00 -optimize -order 2
Unexpected error in GMSHMesh macro: <type 'exceptions.WindowsError'>
Ulrich
OS: Windows 7
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.16.5096 (Git)
Build type: Release
Branch: master
Hash: d0d98b87751f4e5308916f509b72f14053caa61e
Python version: 2.7.8
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
- microelly2
- Veteran
- Posts: 4688
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact:
Re: GMSH macro
I would delete this line 34
self.title = QtGui.QLabel("<b> Macro GMSH mesh generator <b>", self)
and add instead at the end of the file
d.setWindowTitle(" GMSH mesh generator")
so the header is always visible as dock title
I have added your macro collection (the complete git) to the pluginloader.
I'm still looking for nice icons for your macros
self.title = QtGui.QLabel("<b> Macro GMSH mesh generator <b>", self)
and add instead at the end of the file
d.setWindowTitle(" GMSH mesh generator")
so the header is always visible as dock title
I have added your macro collection (the complete git) to the pluginloader.
I'm still looking for nice icons for your macros
Re: GMSH macro
I can't get the macro running.
every time i get some errors
i had to change my bin gmsh location to
I created something what looks like the test obj in the youtube movie. to try a bit on but i've tested other files also but they don't work eighter.
Do i something wrong or is it Mac(version?)
every time i get some errors
Code: Select all
Unexpected error in GMSHMesh macro: <class 'subprocess.CalledProcessError'>
Code: Select all
gmsh_bin = "/Applications/Gmsh/Gmsh.app/Contents/MacOS" #"/usr/bin/gmsh"
Do i something wrong or is it Mac(version?)
- Attachments
-
- FEM_test.FCStd
- (6.91 KiB) Downloaded 177 times
Re: GMSH macro
In order to get the macro working under Windows, I had to change the arguments for the subprocress call. The arguments have to be elements of a list without any spaces in it.Jee-Bee wrote:I can't get the macro running.
every time i get some errors
Code: Select all
Unexpected error in GMSHMesh macro: <class 'subprocess.CalledProcessError'>
I have this week no access to the computer, where I did the changes. I will post my version next week.
Ulrich
Re: GMSH macro
thanks
Re: GMSH macro
Hello Jee-Bee. Sorry for the late response.
Try the new version: https://github.com/psicofil/Macros_FreeCAD
Any error or if it works please wrote in this post. I do not have a Mac to test the macro.
Regards
Sorry for my bad English
Try the new version: https://github.com/psicofil/Macros_FreeCAD
You have to put the full command gmsh, in your case I think it would:i had to change my bin gmsh location to gmsh_bin = "/Applications/Gmsh/Gmsh.app/Contents/MacOS" #"/usr/bin/gmsh"
Code: Select all
gmsh_bin = "/Applications/Gmsh.app/Contents/MacOS/gmsh"
I'm working for the macro to work in windows, the problem I have now is to import the resulting mesh because the tempfile.tempdir command returns the address of the temporary file of the form \temporalyFolder\ .... and when trying to open with Fem.insert throws an error, but if I change "\" with "/" the mesh is imported without problem. Tomorrow I will try to solve that problem. The problem of space in the command think are already solved.ulrich1a wrote: In order to get the macro working under Windows
Already corrected it in the new version of the macro. Thanks.microelly2 wrote: add instead at the end of the file d.setWindowTitle(" GMSH mesh generator")
Regards
Sorry for my bad English
Ing. Gomez Lucio
Scope Ingenieria (scopeingenieria.com)
Scope Ingenieria (scopeingenieria.com)
Re: GMSH macro
As announced, I post my version of the GMSH macro, working under Windows. Sorry for not making a pull request to the githup repo, I do not have the time to perform all the steps at the moment.
The macro works for me under Windows. I did not include the additional GMSH options in the call. This is still to do.
I have changed, how the temporary directory is used.
I changed the arguments for the subprocess call.
The attached file is a real zip. Please unzip it.
Ulrich
The macro works for me under Windows. I did not include the additional GMSH options in the call. This is still to do.
I have changed, how the temporary directory is used.
I changed the arguments for the subprocess call.
The attached file is a real zip. Please unzip it.
Ulrich
- Attachments
-
- GmshMesh2.zip
- This is a real zip!
- (2.6 KiB) Downloaded 715 times
Re: GMSH macro
It works except i had to add an extra directorypsicofil wrote:Any error or if it works please wrote in this post. I do not have a Mac to test the macro.Code: Select all
gmsh_bin = "/Applications/Gmsh.app/Contents/MacOS/gmsh"
Thanks!!