TUI to switch from GEOM module to MESH

TUI to switch from GEOM module to MESH

I have written two scripts. One to create the geometry I need (geom.py) and a second one (mesh.py) to mesh it. The reason I have two separate script files is because I run the geom.py in the GEOM module (via GUI interface), then manually switch over to the MESH module and run the (mesh.py) meshing script.

What I would like to do is have one script file that does the geometry construction, then switches over to the MESH module and runs the meshing, (subsequently the application of boundary conditions and loads) and of course finally generating an output file ready for a solver.

If I append the mesh.py to the end of the geom.py and run it as one script only the geometry creation part works, none of the meshing code works. What I am missing the "switch over" code. Can somebody tell me what I need to do please? Thank you.

Re: TUI to switch from GEOM module to MESH

myVisu = visu_gui.myVisumyVisu.SetCurrentStudy(salome.myStudy)myViewManager = myVisu.GetViewManager()myView = myViewManager.Create3DView() # Use this only if a VTK view is not available# myView = myViewManager.GetCurrentView() # Use this only if a VTK view is availablemyView.SetView((VISU.View3D.TOP))

... might work for you. Although you may have to click on the icon that selects the MESH module then click on the actual mesh to see it. If you can figure that out, let me(us) know. Regards, JMB