batch 'Zoom Frame problem

Moderator: GiD Team

DennisR
Posts: 4
Joined: Fri Oct 12, 2018 1:18 pm

batch 'Zoom Frame problem

Postby DennisR » Fri Oct 12, 2018 1:28 pm

Hi,

I attach a simple flavia.mesh. And also a simple tmp.bch which contains:
Mescape Postprocess
Mescape Files Read -rebuildIndex:0 -- flavia.msh
When I run 'gid -b tmp.bch' I end up with gid opened, and a very small mesh is shown. However when I first start gid with 'gid' and then load the same batch file I get a nice zoomed mesh. So the question is: why does the first something different from the second.

The problem remains when I change the batch file to:
Mescape Postprocess
Mescape Files Read -rebuildIndex:0 -- flavia.msh
'Zoom Frame
Also with this batch file when I run 'gid -b tmp.bch' I get a small (non-zoomed) mesh in the opened gid. This problem prevents me from using gid to create by example png result plots with a batch file. All plots show only a small (non-zoomed) mesh.

I am working in linux. Latest gid 14.1.0d. Help, thank you, Dennis
Attachments
tmp.zip
(497 Bytes) Downloaded 31 times
DennisR
Posts: 4
Joined: Fri Oct 12, 2018 1:18 pm

Re: batch 'Zoom Frame problem

Postby DennisR » Mon Oct 15, 2018 8:26 am

To answer myself a bit, for those who need it, I found that if you only want to generate pictures in batch mode do something like:
gid_offscreen -offscreen 1000x1000 -b tmp.bch

Why gid does something different (when doing 'gid -b tmp.bch' or else 'gid' and load the batch from inside gid) I don't know.

greetings
User avatar
escolano
Posts: 1525
Joined: Thu Sep 18, 2014 3:31 pm

Re: batch 'Zoom Frame problem

Postby escolano » Thu Oct 18, 2018 7:14 pm

With a 'normal' gid.exe maybe the batch flag +g is necessary to obtain graphical screen images
gid -b+g tmp.bch

gid_offscreen is necessary to create an 'OpenGL' image without allow open any window (interesting for example to create images in a web server)

In fact gid.exe and gid_offscreen.exe are two different executable programs.
On Windows platforms gid.exe is linked against the OpenGL library, and gid_offscreen.exe is linked agains the Mesa library,
because OpenGl doesn't allow the 'offscreen' features (to draw in an auxiliary memory buffer), and create a visible window is compulsory.

And about different behavior of a interactive-gid and a batch-driven, take into account that the internal workflow is very different:
- in batch mode there are not mouse or keyboard events
- the answers to all possible questions are available in the batch then interactive dialogs are not opened, etc.
- most scripting Tcl procedures are not registered in the batch and then are not called.
- depending of the batch flags several commands are jumped in batch mode (e.g. graphical commands, windows commands, some events,...)
- etc.

We try that the most important features are available in batch mode, but this is not always possible or easy.

Return to “Other”

Who is online

Users browsing this forum: No registered users and 1 guest