×

Notice

The forum is in read only mode.

scripting

  • Nicky
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
15 years 5 months ago #2992 by Nicky
scripting was created by Nicky
Hi! I need to mesh a geometry several times so I would need to do it automatically. Is it possible to script so that I can use Salome to do this? From where would I get the commands? thanks!
More
15 years 4 months ago #3004 by Alessandro
Replied by Alessandro on topic Re:scripting
In the Salome GUI, you ahve the command:

"dump study"

It creates a python script that you can execute again reimporting it in Salome. I think it is possible to change some parameters in the script and to execute it automatically, but I don't know how to do that.
More
15 years 4 months ago #3008 by kwou
Replied by kwou on topic Re:scripting
Hoi Alessandro, Nicholai

"dump study"
It creates a python script that you can execute again reimporting it in Salome. I think it is possible to change some parameters in the script and to execute it automatically, but I don't know how to do that.


Maybe I misunderstood your remark on 'automatically', so forgive me if the next part is not relevant:

You can change all parameters you like, as long as they are python variables.
After 'dump study' e.g. dump.py, you can just as easily load the study. First 'File' --> 'close' or 'new', select geometry module again and 'File' --> 'load script' or 'ctrl T' and select dump.py. All information appear as before, of course if you did not change anything the script.

After the dump dump.py you may get additional files dump_GEOM.py, dump_MESH.py and dump_VISU.py, depending on whether work has been done in the geometry, mesh or post-pro module. If you want to change the geometry, you can make changes in the dump_GEOM.py script.

I still would like to have an easier way to edit the geometry in Salome though.

** kind regards - kees

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

--
kind regards - kees
More
15 years 4 months ago #3009 by Alessandro
Replied by Alessandro on topic Re:scripting
Kees Wouters wrote:


Maybe I misunderstood your remark on 'automatically', so forgive me if the next part is not relevant:

[/quote]

What I mean is, for example:

You have an openoffice spreadsheet where you write dimenions of a pipe, and it could be a great thing if Salome can manage the python script to entering in it variables taken by the spreadsheet, or by another database.

For the moment it could be enough to have an easier way to modify geometries after theay are builded, at the same way that commercial cad packages do (sketches, constraints, guide-dimensioning....
  • Nicky
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
15 years 4 months ago #3038 by Nicky
Replied by Nicky on topic Re:scripting
ok, thanks! I'll have a look at the options of that command. so for example I could import a geometry, mesh it and then use that script over and over again right?
More
15 years 4 months ago #3042 by Andy Foan
Replied by Andy Foan on topic Re:scripting
I prepared a tutorial recently (as I was learning myself) which might help. Split into 3 zip files - to follow.<br /><br />Post edited by: Andy Foan, at: 2009/06/16 18:41
Attachments:
Moderators: catux
Time to create page: 0.146 seconds
Powered by Kunena Forum