how to create NURBS surface (Automatic) through batch file (i.e command line)

Moderator: GiD Team

jurepriimek
Posts: 5
Joined: Wed Aug 01, 2018 10:26 am

how to create NURBS surface (Automatic) through batch file (i.e command line)

Postby jurepriimek » Wed Aug 01, 2018 10:47 am

Hello,
I am creating a Voronoi grid with separation (between the Voronoi shapes) through a batch file created by Python. After I import my batch file I end up with something that you can see in picture1. Then, I use the "Geometry Create NURBS surface Automatic" to create all the surfaces as it can be seen in picture2.
Since I want to do some other things to my project after that, I am trying to find a way to automate the process of creating NURBS surfaces through a batch file (i.e. through the command line).
Hope there is a way!

Thank you in advance!
Attachments
picture2.png
picture2.png (259.96 KiB) Viewed 1046 times
picture1.png
picture1.png (229.69 KiB) Viewed 1046 times
User avatar
escolano
Posts: 1568
Joined: Thu Sep 18, 2014 3:31 pm

Re: how to create NURBS surface (Automatic) through batch file (i.e command line)

Postby escolano » Wed Aug 01, 2018 8:06 pm

You can write the GiD keyword needed to do something in a text file (.bch extension recommended)
and then load this batchfile in GiD (from the command line gid.exe -b batchfile, or from menus like Files->Import->Batch file...)

To know the syntax of these keyword, for example, do before the action as user (e.g. create automatic surfaces) and then open the Undo window (Utilities->Undo) to see the words.

have a look to GiD help about Files->Import->Batch file
jurepriimek
Posts: 5
Joined: Wed Aug 01, 2018 10:26 am

Re: how to create NURBS surface (Automatic) through batch file (i.e command line)

Postby jurepriimek » Thu Aug 02, 2018 3:55 pm

escolano wrote:You can write the GiD keyword needed to do something in a text file (.bch extension recommended)
and then load this batchfile in GiD (from the command line gid.exe -b batchfile, or from menus like Files->Import->Batch file...)

To know the syntax of these keyword, for example, do before the action as user (e.g. create automatic surfaces) and then open the Undo window (Utilities->Undo) to see the words.

have a look to GiD help about Files->Import->Batch file



Thank you very much for your reply!
I already have a batch file that creates the Voronoi grid and I know how to use it. However, when it comes to this specific command, i.e. "Geometry Create NurbsSurface Automatic" the Dialog Window still pops up and you have to click cancel to finish and exit. And specifically this (how to exit the Dialog window) through a batch file is what is causing me problems, since I cannot find a command that would do that (the normal "Mescape" does not work).
I hope this sheds more light on what the problem actually is! Thank you again!
User avatar
escolano
Posts: 1568
Joined: Thu Sep 18, 2014 3:31 pm

Re: how to create NURBS surface (Automatic) through batch file (i.e command line)

Postby escolano » Fri Aug 03, 2018 2:43 pm

In general we try that is the answer is previously provided we don't open the window to ask it.

The tool to create automatic surfaces ask for a 'number of boundary lines'
e.g.
try to create only surfaces with 3 lines, 4 lines ,...
if you don't provide this amount of lines in the batch line the popup window will ask you.

e.g. if do you want to allow find surfaces with 3 to 7 sides use this (and finish the command with escape)

Mescape Geometry Create NurbsSurface Automatic 3 4 5 6 7 escape
jurepriimek
Posts: 5
Joined: Wed Aug 01, 2018 10:26 am

Re: how to create NURBS surface (Automatic) through batch file (i.e command line)

Postby jurepriimek » Sat Aug 11, 2018 12:24 am

Thank you, I managed to work around this problem since it still isnt working. This forum is great though, its been very helpful with other things! Thanks again escolano :)

Return to “Other”

Who is online

Users browsing this forum: No registered users and 1 guest