> > Hello Moritz, > Works for me starting it both those ways, and also from command-line. I > even tried make distclean and compiling from scratch in case there was > something I'd manually fixed that kept it working on my system. So I don't > know what could be up with yours. Maybe you have an old nviz.exe lying > around in your PATH somewhere that is getting picked up when the GUI runs > "nviz", instead of Glynn's new nviz.bat? > > A couple of side-notes though: > 1) In general the GUI is terrible at catching and reporting errors from > modules it calls in the background and this leads to cryptic error > messages or nothing happening all over the place. IMHO it is a really > pervasive problem that definitely needs fixed in the next GUI. Hopefully > it already is there (ISTR discussions about every call to a GRASS module > going through some other function where the error trapping could > presumably be added, to avoid code repetition).
Actually, error trapping is pretty good in the GUI now, except for NVIZ (but which doesn't run much in the way of GRASS commands anyway). There are traps around all (or perhaps nearly all) GRASS commands that run through the GUI that will kick out any GRASS errors to the terminal or a message box. However, on top of that are GUI errors. TclTk does a pretty good job of reporting these, but they only make sense if you understand TclTk of course. At least they are not obscure error codes. > > 2) When the displayed layers start up in NVIZ the colour of the displayed > vector map isn't preserved. I'm guessing this is because it can't be > specified on the command-line, but perhaps the code that starts NVIZ using > the displayed layers should write a temporary NVIZ state file and then > start NVIZ with that file? I've no idea how complicated that would be to > do though. E.g. might be better only focussing on it in the new GUI. This probably complicated, but I really don't know as I don't understand these files. Probably Bob or Helena does. > > I would love the functionality of NVIZ (most of which is implemented using > the gsurf library AIUI), to be available from the command-line as well as > through the Tcl/Tk interface. Would be cool to be able to generate 3-D > images with specified observer location and attitude and so on from a > shell script (or scripting language of your choice), rather than having to > do it with Tcl scripting in NVIZ. Issuing commands to have an output file created is not a problem. Getting an image to *display somewhere* is the problem. NVIZ is a display/visualization application which displays images in a TclTk/OpenGL canvas. That is how the rest of the GUI works now (i.e., a TclTk canvas, albeit without openGL). To display something in a TclTk canvas requires TclTk scripting. A wxPython canvas requires wxPython scripting; a Java canvas needs Java scripting, and so on. The only reason it appears that you can type a command and have it display in GRASS outside of this is that GRASS also has display drivers that can send an image to an old-style xterminal (textronic emulation I think). In other words, displaying an image in a "GRASS canvas" requires GRASS scripting. You could write code that would let you type in stuff and translate that into TclTk script commands needed to display the output in a TclTk canvas. We've done with with wxPython, where it's a bit easier to do, but still something of a chore (since modern GUI's usually assume that you want to use a GUI to display something in their canvases). In fact it is possible to write NVIZ script code that can do pretty much what you want. I don't know how to do it, but you should be able type script commands to control the visualization and open NVIZ with this script (Maybe you can even cat these into NVIZ in a *nix system--though I don't know if this is possible or not). This is what d.nviz does--or would do if it wasn't broken. Michael > > Paul __________________________________________ Michael Barton, Professor of Anthropology Director of Graduate Studies School of Human Evolution & Social Change Center for Social Dynamics and Complexity Arizona State University phone: 480-965-6213 fax: 480-965-7671 www: http://www.public.asu.edu/~cmbarton _______________________________________________ grass-dev mailing list [email protected] http://grass.itc.it/mailman/listinfo/grass-dev

