[GRASS-dev] Holiday updates to NVIZ

Over the last several days, I was able to continue with the NVIZ GUI update. I also managed to fix a few bugs and hope they stay fixed. Here are the highlights…

I think I’ve fixed a bug causing problems with NVIZ in latlon regions when displaying vector points. At least the points are correctly displayed on my system and NVIZ doesn’t crash. There is still the problem with the height and z-exag
sliders for the surfaces not working properly (at least in some contexts), but you can at least still set a reasonable value manually (by typing into the entries next to the sliders). This may be a C-code issue beyond my control.

I also got the auto draw toggle checkbox to actually work in most panels. When it’s checked, making a change (adding a label or changing a display parameter) will cause the display to be re-rendered and the new feature shown. When it’s not checked, you must press the draw button to re-render the display. This still needs some work in the volumes panel, but it’s working pretty well in the rest of the panels now.

I fixed a bug in the sliders. Previously, they only interacted with the associated value entry widgets correctly if they worked backwards (increase from right to left). Now they work correctly when they increase from left to right.

I completed updating the GUI for all panels except the animations ones. They are next. I’ve gotten rid of several functions that don’t work. If someone wants to resurrect them later, the code is archived of course.

I took out the scale panel. It had no functionality at all. It was just a set of widgets that didn’t do anything. In the docs it is listed as not implemented. I separated the north arrow and fringe functions into separate panels that can be called from the new appearance menu. Bob added new code to make fringe elevation and color selections functional. It would be nice to be able to select the color of the arrow and north “N”. These change in different context, but I don’t know how or why since there are no related commands in the TclTk code.

Probably some derivative of the arrow code could be used to make a true scale bar, since the arrow function takes a size value in map units.

I separated the labels and legend panels, and added a Tk font selection dialog to each. Now you can use any font recognized by TclTk (though some styles like italic or underline don’t work with all font families). Each panel is called from the appearance menu.

I removed the ‘label sites’ panel. In the docs it is listed as not implemented. It has some related code, but it is not functional. Looking at the code, it seems to apply to the old sites format. I don’t know what it would take to make it work with current vector formats.

I took out a few non-functional widgets: the clear screen checkbutton on the main panel and the lower entry in the fringe panel. Neither of these had any functional commands attached. I kept in the z-coord slider for the cutting planes. It doesn’t seem to do anything, but it has code attached. Maybe someone else could look at it. I’m not sure what it is supposed to do, so am not sure what is needed to fix it.

I’ve put some screenshots of each redesigned NVIZ panel, with example visual display on my website at
http://www.public.asu.edu/~cmbarton/files/nviz_screenshots/. Maybe someone can use these to update the NVIZ help.

Michael


Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

Michael,

Great stuff! Several bugs still remain:

A. The picture is re-rendered each time anything covers a part of the
picture, eg. when the bubble-help for eg. "z-exag" or "Decorations..."
in the "Raster surfaces" pops up, when the help menu is clicked, or any
window is moved over the picture. Could that be avoided?

B. Once the north arrow placement function is chosen, it is never
deactivated:

1. Appearance > North Arrow > Place arrow (placed, OK)
2. Visualize > Raster Query
3. click on the picture: still the Arrow location is changed instead of
raster query performed

C. A segfault (propably not a concern of Michael); in spearfish60:

1. g.region rast=elevation.10m -a
2. nviz elevation=elevation.10m
3. Appearance > Fringe > S&E > Draw Fringe

Segmentation fault (core dumped)

(gdb) bt
<snip>
#31 0x0805fd5b in main (argc=3, argv=0xbfb44874) at nvizMain.c:50

(gdb) l
29
*----------------------------------------------------------------------30
      */
31
32 int main(int argc, /* Number of command-line
arguments. */
33 char **argv /* Values of command-line
arguments. */
34 )
35 {
36 int i;
37
38 Tcl_FindExecutable(argv[0]);

D. View method > Fly > fly help: hovering over the sliders activates
the NVIZ's window like if I clicked the window's top panel.

E. icon size in Visualize > Vector Points doesn't respond to manually
entered size (followed by Enter key), it responds only if the value is
changed by clicking the size controls with mouse.

F. After loading a 2D vector points artifact lines happen to be
rendered; they look like the DEM's profile I guess. To reproduce try
loading archsites, zoom out, delete it and load it back (repeat until
you can see it). Something like "g.region rast=elevation.10m -a; nviz
elevation=elevation.10m points=archsites" should bring this artifact too.

G. 3D points are displayed on the very bottom, under the DEM raster,
when "Display on the surface(s):" is selected.

See http://intevation.de/rt/webrt?serial_num=4492, for some further
hints on related issues.

Using tcl/tk 8.4.12, gcc 4.03, Ubuntu Dapper 32bit, 2.6.15-27-686.

Maciek

Michael,

I haven't yet chance to try it but the screen shots look very nice, much cleaner layout
and hopefully more intuitive. I have a question - during the workshop in Lausanne I had
a chance to watch people using nviz and one thing that people struggled with was figuring out that
the list of available/loaded surfaces or vector files is under Current - there is just plain text with no
indication that when you click on it a list of files will show up. Is there any way to make this more intuitive?
It was also interesting to see how quickly people got working with paraview - apparently their GUI design
is pretty good.

As for the z-coord. slider for cutting planes - have your tried it for tilted cutting plane? It should move it
in z-direction (you won't see anything happening if your cutting plane is vertical). I am not sure
whether it actually works but that was the intention.

Thanks a lot for all the great GUIs,

Helena

On Nov 28, 2006, at 12:33 AM, Michael Barton wrote:

Over the last several days, I was able to continue with the NVIZ GUI update. I also managed to fix a few bugs and hope they stay fixed. Here are the highlights...

I think I’ve fixed a bug causing problems with NVIZ in latlon regions when displaying vector points. At least the points are correctly displayed on my system and NVIZ doesn’t crash. There is still the problem with the height and z-exag
sliders for the surfaces not working properly (at least in some contexts), but you can at least still set a reasonable value manually (by typing into the entries next to the sliders). This may be a C-code issue beyond my control.

I also got the auto draw toggle checkbox to actually work in most panels. When it’s checked, making a change (adding a label or changing a display parameter) will cause the display to be re-rendered and the new feature shown. When it’s not checked, you must press the draw button to re-render the display. This still needs some work in the volumes panel, but it’s working pretty well in the rest of the panels now.

I fixed a bug in the sliders. Previously, they only interacted with the associated value entry widgets correctly if they worked backwards (increase from right to left). Now they work correctly when they increase from left to right.

I completed updating the GUI for all panels except the animations ones. They are next. I've gotten rid of several functions that don't work. If someone wants to resurrect them later, the code is archived of course.

I took out the scale panel. It had no functionality at all. It was just a set of widgets that didn't do anything. In the docs it is listed as not implemented. I separated the north arrow and fringe functions into separate panels that can be called from the new appearance menu. Bob added new code to make fringe elevation and color selections functional. It would be nice to be able to select the color of the arrow and north “N”. These change in different context, but I don’t know how or why since there are no related commands in the TclTk code.

Probably some derivative of the arrow code could be used to make a true scale bar, since the arrow function takes a size value in map units.

I separated the labels and legend panels, and added a Tk font selection dialog to each. Now you can use any font recognized by TclTk (though some styles like italic or underline don’t work with all font families). Each panel is called from the appearance menu.

I removed the ‘label sites’ panel. In the docs it is listed as not implemented. It has some related code, but it is not functional. Looking at the code, it seems to apply to the old sites format. I don't know what it would take to make it work with current vector formats.

I took out a few non-functional widgets: the clear screen checkbutton on the main panel and the lower entry in the fringe panel. Neither of these had any functional commands attached. I kept in the z-coord slider for the cutting planes. It doesn't seem to do anything, but it has code attached. Maybe someone else could look at it. I’m not sure what it is supposed to do, so am not sure what is needed to fix it.

I’ve put some screenshots of each redesigned NVIZ panel, with example visual display on my website at
<http://www.public.asu.edu/~cmbarton/files/nviz_screenshots/&gt;\. Maybe someone can use these to update the NVIZ help.

Michael

__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

_______________________________________________
grass-dev mailing list
grass-dev@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass-dev

On 11/28/06 10:56 PM, "Helena Mitasova" <hmitaso@unity.ncsu.edu> wrote:

Michael,

I haven't yet chance to try it but the screen shots look very nice,
much cleaner layout
and hopefully more intuitive. I have a question - during the workshop
in Lausanne I had
a chance to watch people using nviz and one thing that people
struggled with was figuring out that
the list of available/loaded surfaces or vector files is under
Current - there is just plain text with no
indication that when you click on it a list of files will show up. Is
there any way to make this more intuitive?
It was also interesting to see how quickly people got working with
paraview - apparently their GUI design
is pretty good.

As for the z-coord. slider for cutting planes - have your tried it
for tilted cutting plane? It should move it
in z-direction (you won't see anything happening if your cutting
plane is vertical). I am not sure
whether it actually works but that was the intention.

Thanks a lot for all the great GUIs,

Helena

Thanks for the input Helena. I agree with you about the current map list
widget. It was such a pain to change that I pretty much left it alone for
the moment so that I could focus on the other stuff. However, there is
probably a much better way to do it. Maybe a bwidget ComboBox.

I'll try the z-slider in cutting planes now that I know what to look for. Of
course, the shaded cutting plane is ONLY visible if it is vertical. Can this
be changed?

Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

Hi,

Maciej Sieczka wrote:

Great stuff! Several bugs still remain:

Out of the issues I mentioned in my previous mail, bug "C" (fringe
segfaulting) was fixed by Michael in the CVS. Cool.

All the other issues remain...

Maciek