×

Notice

The forum is in read only mode.

TUI to switch from GEOM module to MESH

More
14 years 5 months ago #4379 by JMB
Hello,

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.

I tried something like:

[code:1]

...

Mesh_1.Compute()

from salome import ImportComponentGUI
gg = ImportComponentGUI("SMESH"«»)
# gg.CreateAndDisplayActor(the_entry)
gg.CreateAndDisplayActor(Mesh_1)

[/code:1]

But that did not work :(



Regards,

JMB
More
14 years 5 months ago #4380 by JMB
Disregard my message. I figured out the solution.

JMB
More
14 years 5 months ago #4381 by kwou
Hoi JMB

and is it allowed to tell us what you found out? Just curious ;-)

kind regard - kees

Interest: structural mechanics, solar energy (picture at 'my location' shows too little pv panels)

--
kind regards - kees
More
14 years 5 months ago #4382 by JMB
Kees Wouters wrote:

Hoi JMB

and is it allowed to tell us what you found out? Just curious ;-)

kind regard - kees


Occasionally, one is not allowed to divulge such discoveries because one can be blind to the "Refresh -F5" feature of the Object Browser window and not seeing it earlier makes one look very stupid! :) Sometimes I think a problem is way more complicated than it really is ... comes from staring at a screen too long!

Regards,
JMB<br /><br />Post edited by: JMB, at: 2010/07/02 03:30
More
14 years 5 months ago #4387 by kwou
Hoi JMB

i sometimes put something like this:

if salome.sg.hasDesktop():
salome.sg.updateObjBrowser(0)


and I *think* this does the marvelous trick (although -once again- I donot fully understand all the objects you need to define).

kind regards - kees

Interest: structural mechanics, solar energy (picture at 'my location' shows too little pv panels)

--
kind regards - kees
More
14 years 5 months ago #4388 by JMB
Kees Wouters wrote:

Hoi JMB

i sometimes put something like this:

and I *think* this does the marvelous trick (although -once again- I donot fully understand all the objects you need to define).

kind regards - kees


Thank you! Yes I have it in my scripts and it works too. If you can help with the part I have yet to solve, I would appreciate it. See my message: caelinux.com/CMS/index.php?option=com_jo...;id=4383&catid=4

Regards,
JMB<br /><br />Post edited by: JMB, at: 2010/07/03 03:30
Moderators: catux
Time to create page: 0.172 seconds
Powered by Kunena Forum