this bug's URL: http://intevation.de/rt/webrt?serial_num=2152
-------------------------------------------------------------------------
Subject: VRML 1.0 export
Platform: other (dual-G4 / MacOSX 2)
grass obtained from: Other (CDROM etc) (OpenOSX)
grass binary for platform: Downloaded precompiled Binaries
GRASS Version: 5.0.2
The VRML 1.0 export is not working well. The mesh producted is not standard VRML. It
adds a ' , ' after the last Coordinate3 point description. Same for the last
IndexedFaceSet : should be "a,b,c,-1" and not "a,b,c,-1,"
Yann
-------------------------------------------- Managed by Request Tracker
On Fri, 10 Oct 2003, Request Tracker wrote:
The VRML 1.0 export is not working well. The mesh producted is not standard VRML. It
adds a ' , ' after the last Coordinate3 point description. Same for the last
IndexedFaceSet : should be "a,b,c,-1" and not "a,b,c,-1,"
The attached patch to p.vrml would fix this (presumably the Material Color
section should have the same treatment). But I haven't had any problems
with the current output. Are there some readers the VRML output won't work
with? Can you give a link to somewhere describing the VRML standard that
shows it as you describe? Then we could apply the change to p.vrml
(attachments)
put_grid.c.diff (1.48 KB)
Paul Kelly wrote:
> The VRML 1.0 export is not working well. The mesh producted is not standard VRML. It
> adds a ' , ' after the last Coordinate3 point description. Same for the last
> IndexedFaceSet : should be "a,b,c,-1" and not "a,b,c,-1,"
The attached patch to p.vrml would fix this (presumably the Material Color
section should have the same treatment). But I haven't had any problems
with the current output. Are there some readers the VRML output won't work
with? Can you give a link to somewhere describing the VRML standard that
shows it as you describe? Then we could apply the change to p.vrmlIndex: put_grid.c
The VRML 1.0 standard explicitly permits a trailing comma:
http://www.web3d.org/technicalinfo/specifications/VRML1.0/index.html#Fields
Multiple-valued fields are written as a series of values
separated by commas, all enclosed in square brackets. If the
field has zero values then only the square brackets ("") are
written. THE LAST MAY OPTIONALLY BE FOLLOWED BY A COMMA. If
the field has exactly one value, the brackets may be omitted
and just the value written. For example, all of the following
are valid for a multiple-valued field containing the single
integer value 1:
[Emphasis mine.]
So, it's a bug in the viewer.
FWIW, VRML 97 is even more liberal; the comma is considered a
whitespace character.
--
Glynn Clements <glynn.clements@virgin.net>