ILLEGAL2VRML(1)

NAME
illegal2vrml - convert VRML97 files with illegal extensions

SYNOPSIS
illegal2vrml [ -prefix prefix ] protofile.wrl file.wrl

DESCRIPTION
illegal2vrml convert Virtual Reality Modeling Language (VRML97) files with illegal extensions to valid VRML97, according to ISO/IEC 14772 Annex F. Annex F decribe, how extensions to the VRML language should be implemented: using a EXTERNPROTO with a "urn" (fake URL) that sign the VRML browser the extension and not to use the following URL.

illegal2vrml read the file protofile.wrl which should contain such EXTERNPROTOs. The names of the EXTERNPROTOs should start with the same prefix. The prefix is needed to deal with additional illegal field names in valid VRML97 nodes.
In the next step illegal2vrml read the file file.wrl and replace all node names which are identical to the EXTERNPROTOs without the prefix with the names of the EXTERNPROTOs (with the prefix).
In the last step, the result is written to standard output.

OPTIONS

-prefix prefix
    set the name of the prefix of the EXTERNPROTOs. If this option is not used, the prefix is calculated from the proto names in protofile.wrl

EXAMPLE

Imagine a VRML97 file with a illegal extension to the WorldInfo node

$ cat $HOME/worldinfo.wrl
    #VRML V2.0 utf8 WorldInfo
    {
      copyright "(C) illegal extension Inc."
      info "a existing VRML97 node with a illegal extension"
    }

A matching file with a EXTERNPROTO would be

$ cat $HOME/protofile.wrl
    #VRML V2.0 utf8 EXTERNPROTO PrefixWorldInfo
    [
    field SFString copyright
    field MFString info
    field SFString title
    ]
    ["urn:inet:browser.com:library:PrefixWorldInfo" "PrefixWorldInfo.wrl"]

To convert to a valid VRML97 file, use

$ illegal2vrml -prefix Prefix  $HOME/protofile.wrl $HOME/worldinfo.wrl
    #VRML V2.0 utf8 EXTERNPROTO PrefixWorldInfo
    [
    field SFString copyright
    field MFString info
    field SFString title
    ]
    ["urn:inet:browser.com:library:PrefixWorldInfo" "PrefixWorldInfo.wrl"] PrefixWorldInfo
      {
      copyright "(C) illegal extension Inc."
      info
        [
        "a existing VRML97 node with a illegal extension"
        ]
      }

COPYRIGHT
    illegal2vrml convert VRML97 files with illegal extensions
    Copyright (C) 2000-2003 J. "MUFTI" Scheurich, Stephen F. White
    This program is free software; you can redistribute it
    and/or modify it under the terms of the
    GNU General Public License
    as published by the Free Software Foundation; either
    version 2 of the License, or (at your option) any later
    version.

BUGS
Inside PROTOs, the conversion program do not parse for node names (yet). Therefore only a string based replacement is made inside PROTOs.

DIAGNOSTICS
Exit status is 0 for sucessfull operation, 1 if inputfiles can not be sucessfully read or other error

SEE ALSO

VRML97 International Standard
    http://www.web3d.org/x3d/specifications/vrml/ISO-IEC-14772-IS-VRML97WithAmendment1

VRML97 International Standard Annex F
    http://www.web3d.org/x3d/specifications/vrml/ISO-IEC-14772-IS-VRML97WithAmendment1/part1/extensions.html