[x3d-public] VRML97 and ClassicVRML model validation; compatible ECMAscript source code

Brutzman, Donald (Don) (CIV) brutzman at nps.edu
Thu Aug 24 08:17:51 PDT 2023


[Subject line shift due to importance]

 

Super progress Michalis.  I agree and will be able to fix points #2 and #3.  Thank you.

 

As for #1, escaping backslashes in ECMAscript source code, we should carefully consider the implications.  First let's look at the existing specification.

 

*	X3D 3.3 encodings Part 2: Classic VRML encoding, clause 6 Encoding of nodes, 6.2.179 Script
*	https://www.web3d.org/documents/specifications/19776-2/V3.3/Part02/EncodingOfNodes.html#Script

 

Script { 

  inputOutput    SFNode   metadata 

  inputOutput    MFString url 

  initializeOnly SFBool   directOutput

  initializeOnly SFBool   mustEvaluate

 

  # and any number of:

 

  inputOnly      fieldType fieldName

  inputOutput    fieldType fieldName

  outputOnly     fieldType fieldName 

  initializeOnly fieldType fieldName 

}

*        […prose omitted here…]

 

Looks like we might actually have three approaches to look at here:

 

a.  Escaped Backslashes.  I agree that the approach you've described is workable.  It matches the approach used with VRML97 encoding, which was originally developed with JavaScript looseness prior to ECMAscript formalization.  So AFAICT it is silent about this. Interestingly, final formalization of amended VRML97 specification referred to ECMAscript standard of that time.

 

*	Virtual Reality Modeling Language, amendment 1, clause 2 Normative references
*	https://www.web3d.org/documents/specifications/14772/V2.0/part1/references.html
*	ISO/IEC DIS 16262 Information technology -- ECMAScript: A general purpose, cross-platform programming language.
*	http://www.ecma.ch
*	http://www.iso.ch/isob/switch-engine-cate.pl?searchtype=refnumber&KEYWORDS=16262

 

However, please note that this means any modern ECMAscript code in a ClassicVRML file might well have different and incompatible syntax compared to the same code block in an XML file.  This divergence of source will almost certainly complicate conversions into other forms of X3D, such as Python or Java etc., which are already each idiosyncratic about handling of backslashes.

 

A strict and diverging approach like this will undoubtedly lead to recurring code failures, user/author grief, and also make X3D conversions be considered unreliable.

 

b.  Compatible. VRML parsers might look for the keyword and allow such characters within “ecmascript:” code-block sections, allowing unmodified ECMAscript source code.  

 

Issuing an optional warning is always allowed. Implementations can also include a browser property if they like, e.g. ecmascriptSyntax=(compatible|escapedBackslashes) perhaps.


If we pursue compatibility, then with further scrutiny we can also look at corresponding support when the url starts with the VRML97 “javascript:” keyword.

 

*	Virtual Reality Modeling Language, amendment 1, clause 4 Concepts, 4.5.4 Scripting language protocols
*	https://www.web3d.org/documents/specifications/14772/V2.0/part1/concepts.html#4.5.4

    #VRML V2.0 utf8 

    Script {

        url [ "javascript: ...",           # custom protocol ECMAScript

              "http://bar.com/foo.js",     # std protocol ECMAScript

              "http://bar.com/foo.class" ] # std protocol Java platform bytecode

    }

*	In the example above, the "..." represents in-line ECMAScript source code.

 

Of likely further relevance are Andreas’ recent efforts to get X3D Script code to be shifted compatibly/directly as HTML Script code.

 

c.  Specification update.  Parsing needs to be deterministic.  We will likely need to address this point explicitly in next version of X3D XML Encoding in any case.  I can think of a few paths in specification prose to accomplish this, but that can wait.

 

Here is example showing need for precise definitions.  Let’s say the author wants to include an explicit backslash in the ECMAscript Browser.print statements.  Which is correct?

 

*	Browser.print ('\ntimeEvent inputValue=' + inputValue);   # compatible form:   no prepended backslash
*	Browser.print ('\\ntimeEvent inputValue=' + inputValue);  # compatible form: adds prepended backslash
*	Browser.print ('\\\ntimeEvent inputValue=' + inputValue);
*	Browser.print ('\\\\ntimeEvent inputValue=' + inputValue);
*	[arrgh…]

 

Hmmm.  So, as usual with any parsing, this is all gets a little bit complicated pretty quickly.  Nevertheless the end goal is simple: we want Script code to work consistently in every form of X3D.

 

Personally am leaning hard towards a Compatible approach, with satisfactory corresponding updates to X3D 4.0 XML Encoding specification that cover it precisely.  Implementation efforts are then fenced to browser and parser builders, who are strict anyway, without impacting (approximately) everyone else in the world that might be writing or using such Script code, hopefully with reckless abandon across every form of X3D encoding/programming.

 

What do you think?  Are there perhaps some other choices or issues?  Is compatible ECMAscript source code achievable?

 

all the best, Don

-- 

Don Brutzman  Naval Postgraduate School, Code USW/Br        brutzman at nps.edu

Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA    +1.831.656.2149

X3D graphics, virtual worlds, navy robotics https://faculty.nps.edu/brutzman

 

-----Original Message-----
From: Michalis Kamburelis <michalis.kambi at gmail.com> 
Sent: Thursday, August 24, 2023 6:00 AM
To: Brutzman, Donald (Don) (CIV) <brutzman at nps.edu>
Cc: X3D Public Mailing List (x3d-public at web3d.org) <x3d-public at web3d.org>
Subject: Re: VRML97 and ClassicVRML model validation from command line using view3dscene

 

 

Don,

 

1. As for backslashes: From what I can tell, view3dscene / tovrmlx3d warning is correct. And, while we had some threads on x3d-public about backslashes in X3D XML encoding, I think X3D classic encoding was always clear.

 

    Tested on  <https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter04ViewingNavigation/BindingOperations.x3dv> https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter04ViewingNavigation/BindingOperations.x3dv

.

 

    Backslash inside MFString needs to be doubled if you want to literally say "1 backslash", otherwise it certain cases it would be ambiguous (since backslash is also used to prevent double-qoute from ending the string).

 

    So e.g.  <https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter04ViewingNavigation/BindingOperations.x3dv> https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter04ViewingNavigation/BindingOperations.x3dv

has this in X3D:

 

    """

        url [ "ecmascript:

        ...

        // Browser.print ('\ntimeEvent inputValue=' + inputValue);

    """

 

    But that's not correct. You need to write

 

    """

        url [ "ecmascript:

        ...

        // Browser.print ('\\ntimeEvent inputValue=' + inputValue);

    """

 

    Then the X3D parser reads this as one backslash, and the ECMAScript contents have one backslash.

 

2. As for  <https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter05AppearanceMaterialTextures/TwoSidedMaterialExample.x3dv> https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter05AppearanceMaterialTextures/TwoSidedMaterialExample.x3dv

error:

 

    The model is indeed wrong, the field name is missing. It says

 

    """

      appearance Appearance {

        TwoSidedMaterial {

    """

 

    It should say

 

    """

      appearance Appearance {

        material TwoSidedMaterial {

    """

 

3. As for  <https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter01TechnicalOverview/EmptySceneCoreProfile.x3dv> https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter01TechnicalOverview/EmptySceneCoreProfile.x3dv

:

 

    The model is indeed wrong, again the field name is missing. It says

 

    """

    WorldInfo {

        title "EmptySceneCoreProfile.x3d"

        # metadata

        MetadataSet {

    """

 

    Why is the "metadata" commented out? :) It was actually good! The correct version is

 

    """

    WorldInfo {

        title "EmptySceneCoreProfile.x3d"

        metadata MetadataSet {

    """

 

Regards,

Michalis

 

czw., 24 sie 2023 o 00:39 Brutzman, Donald (Don) (CIV) < <mailto:brutzman at nps.edu> brutzman at nps.edu> napisał(a):

> 

> Sounds good Michalis.  The  --enable-downloads switch worked great and noticeably improved the output logs, each of which is now updated online and in version control.

> 

> 

> 

> Corresponding detection of geovrml.org issues was particularly useful, separate correspondence posted.

> 

> 

> 

> Here is an example of backslash diagnostic, knowing line numbers will help (if possible, some tests have trouble with that).  I can probably figure these out, but thought that you would want consistent exception diagnostic outputs.

> 

> 

> 

> ClassicVRML validation: tovrmlx3d.exe 

> C:\x3d-code\www.web3d.org\x3d\content\examples\X3dForWebAuthors\Chapte

> r04ViewingNavigation/BindingOperations.x3dv --validate 

> --enable-downloads

> tovrmlx3d: Warning: X3D: Invalid X3D file: Invalid sequence in a string: "\n". Backslash must be followed by another backslash or double quote, for SFString and MFString (in X3D classic (VRML) encoding) and for MFString (in X3D XML encoding).

> (21 more occurrences follow)

> Offending text is within embedded javascript code and seems legal, for example:

>   Browser.print ('\n===========\n time t0');

> 

> 

> 

> ClassicVRML validation: tovrmlx3d.exe 

> C:\x3d-code\www.web3d.org\x3d\content\examples\X3dForWebAuthors\Chapte

> r11LightingEnvironmentalEffects/BackgroundTimeOfDay.x3dv --validate 

> --enable-downloads

> tovrmlx3d: Warning: X3D: Invalid X3D file: Invalid sequence in a string: "\n". Backslash must be followed by another backslash or double quote, for SFString and MFString (in X3D classic (VRML) encoding) and for MFString (in X3D XML encoding).

> (11 more occurrences follow)

> Similar case.  Offending text is within embedded javascript code and seems legal, for example:

>     Browser.print ('groundColorSunrise length=' + 

> groundColorSunrise.length + ' '  + groundColorSunrise.toString() + 

> '\n');

> 

> 

> 

> Here is an example that I first thought was an unrecognized node, but is actually an incorrect conversion that is a required missing field name.  I’ll fix the converter.

> 

> 

> 

> ClassicVRML validation: tovrmlx3d.exe 

> C:\x3d-code\www.web3d.org\x3d\content\examples\X3dForWebAuthors\Chapte

> r05AppearanceMaterialTextures/TwoSidedMaterialExample.x3dv --validate 

> --enable-downloads

> tovrmlx3d: Warning: VRML/X3D: Error when reading, will skip the rest of X3D file: Error at line 56 column 25: Invalid X3D node content (probably unknown or not allowed field, prototype or VRML 1.0-style children) inside "Appearance": got "TwoSidedMaterial"

> 

> 

> 

> Other entries that appear to be incorrectly failing “Invalid X3D node” content follow.  Long form provided here in case you want to test further.

> 

> 

> 

> ClassicVRML validation: tovrmlx3d.exe 

> C:\x3d-code\www.web3d.org\x3d\content\examples\X3dForWebAuthors\Chapte

> r01TechnicalOverview/EmptySceneCoreProfile.x3dv --validate 

> --enable-downloads

> tovrmlx3d: Warning: VRML/X3D: Error when reading, will skip the rest of X3D file: Error at line 40 column 14: Invalid X3D node content (probably unknown or not allowed field, prototype or VRML 1.0-style children) inside "WorldInfo": got "MetadataSet"

> 

> 

> 

> ClassicVRML validation: tovrmlx3d.exe 

> C:\x3d-code\www.web3d.org\x3d\content\examples\X3dForWebAuthors\Chapte

> r15Metadata/MetadataNodeExamplesX3D3.x3dv --validate 

> --enable-downloads

> tovrmlx3d: Warning: VRML/X3D: Node "MetadataString" is not allowed at 

> the top level of the X3D file

> tovrmlx3d: Warning: VRML/X3D: Error when reading, will skip the rest of X3D file: Error at line 47 column 6: Invalid X3D node content (probably unknown or not allowed field, prototype or VRML 1.0-style children) inside "WorldInfo": got keyword "DEF"

> 

> 

> 

> That’s it for now.  Your validation is very high quality!  Lots of 

> other content errors for me to fix that were previously undetected… 8)

> 

> 

> 

> all the best, Don

> 

> --

> 

> Don Brutzman  Naval Postgraduate School, Code USW/Br         <mailto:brutzman at nps.edu> brutzman at nps.edu

> 

> Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA    +1.831.656.2149

> 

> X3D graphics, virtual worlds, navy robotics 

>  <https://faculty.nps.edu/brutzman> https://faculty.nps.edu/brutzman

> 

> 

> 

> -----Original Message-----

> From: Michalis Kamburelis < <mailto:michalis.kambi at gmail.com> michalis.kambi at gmail.com>

> Sent: Wednesday, August 23, 2023 7:09 AM

> To: Brutzman, Donald (Don) (CIV) < <mailto:brutzman at nps.edu> brutzman at nps.edu>

> Cc: X3D Public Mailing List ( <mailto:x3d-public at web3d.org> x3d-public at web3d.org) 

> < <mailto:x3d-public at web3d.org> x3d-public at web3d.org>

> Subject: Re: VRML97 and ClassicVRML model validation from command line 

> using view3dscene

> 

> 

> 

> Don,

> 

> 

> 

> 1. As for some missing X3D 4.0 nodes: Yes, this can happen, as in the past I didn't carefully check whether all X3D 4.0 nodes have been added to CGE/view3dscene, and indeed I was fixing later some missing ones (like H-Anim nodes from X3D 4.0).

> 

> 

> 

>     If you can extract the list of missing X3D 4.0 nodes from above logs, I'll be grateful -- I didn't find relevant messages now from the logs you linked, but admittedly I only looked quickly.

> 

> 

> 

> 2. To avoid the "Error EDownloadError when loading inline file from URL ...: Downloading network resources (from "http" or "https"

> 

> protocols) is not enabled. Set global EnableBlockingDownloads:=true to 

> enable." pass the additional command-line option

> 

> 

> 

>     --enable-downloads

> 

> 

> 

>     to tovrmlx3d. Note that it will definitely increase the validation time. The tovrmlx3d will download the linked resources (Inline X3D content, X3D content referred by EXTERNPROTOs etc.) from the Internet at validation.

> 

> 

> 

> Regards,

> 

> Michalis

> 

> 

> 

> śr., 23 sie 2023 o 08:18 Brutzman, Donald (Don) (CIV) < <mailto:brutzman at nps.edu> brutzman at nps.edu> napisał(a):

> 

> >

> 

> > Michalis, appreciate your adding this feature as part of tovrmlx3d executable.  I’ve integrated into the Ant build scripts and tested operation satisfactorily for all .wrl and .x3dv conversions in the X3D Examples Archives.

> 

> >

> 

> >

> 

> >

> 

> > Example command-line invocation on windows, a little terser works out OK for these logs:

> 

> >

> 

> >

> 

> >

> 

> > tovrmlx3d.exe

> 

> > C:\x3d-code\www.web3d.org\x3d\content\examples\X3dForWebAuthors\Chap

> > te

> 

> > r04ViewingNavigation/CollisionExample.x3dv --validate

> 

> >

> 

> >

> 

> >

> 

> > Regression-test results online (and in version control to track progress) as follows.  Most look clean.

> 

> >

> 

> >

> 

> >

> 

> >  <https://www.web3d.org/x3d/content/examples/build.validate.VRML.all.l> https://www.web3d.org/x3d/content/examples/build.validate.VRML.all.l

> > og

> 

> > .txt

> 

> >

> 

> >  <https://www.web3d.org/x3d/content/examples/build.validate.x3dv.all.l> https://www.web3d.org/x3d/content/examples/build.validate.x3dv.all.l

> > og

> 

> > .txt

> 

> >

> 

> >

> 

> >

> 

> >  <https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fso> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fso

> > ur%2F&data=05%7C01%7Cbrutzman%40nps.edu%7C3d80318df4e84ffb9bd808dba4

> > a2128e%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C6382847882598770

> > 64%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBT

> > iI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Fq0vPC53Uj%2BOgThMOO

> > VGrDCEqFzscCmotwNW2HoWjKE%3D&reserved=0

> 

> > ceforge.net%2Fp%2Fx3d%2Fcode%2FHEAD%2Ftree%2Fwww.web3d.org%2Fx3d%2Fc

> > on

> 

> > tent%2Fexamples%2Fbuild.validate.VRML.all.log.txt&data=05%7C01%7Cbru

> > tz

> 

> > man%40nps.edu%7C2baece0d2d40458e15cb08dba3e28885%7C6d936231a51740ea9

> > 19

> 

> > 9f7578963378e%7C0%7C0%7C638283965717273937%7CUnknown%7CTWFpbGZsb3d8e

> > yJ

> 

> > WIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C30

> > 00

> 

> > %7C%7C%7C&sdata=q%2BSZdNZqtAMSJlRxmJai8uHirMFpE3N2czqe0LSgyh8%3D&res

> > er

> 

> > ved=0

> 

> >  <https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fso> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fso

> > ur%2F&data=05%7C01%7Cbrutzman%40nps.edu%7C3d80318df4e84ffb9bd808dba4

> > a2128e%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C6382847882598770

> > 64%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBT

> > iI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Fq0vPC53Uj%2BOgThMOO

> > VGrDCEqFzscCmotwNW2HoWjKE%3D&reserved=0

> 

> > ceforge.net%2Fp%2Fx3d%2Fcode%2FHEAD%2Ftree%2Fwww.web3d.org%2Fx3d%2Fc

> > on

> 

> > tent%2Fexamples%2Fbuild.validate.x3dv.all.log.txt&data=05%7C01%7Cbru

> > tz

> 

> > man%40nps.edu%7C2baece0d2d40458e15cb08dba3e28885%7C6d936231a51740ea9

> > 19

> 

> > 9f7578963378e%7C0%7C0%7C638283965717273937%7CUnknown%7CTWFpbGZsb3d8e

> > yJ

> 

> > WIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C30

> > 00

> 

> > %7C%7C%7C&sdata=Ng9yOUpVA392Jy9gjqoPqCF4vu106L2Zu3kC%2BtFwA8A%3D&res

> > er

> 

> > ved=0

> 

> >

> 

> >

> 

> >

> 

> > Execution is fast!  Execution took around a half hour for over 4000 examples, most of that time was likely writing test-result outputs to console.

> 

> >

> 

> >

> 

> >

> 

> > I haven’t tried fixing any model errors or X3dToVrml97.xslt stylesheet conversion errors yet (e.g. true false vice TRUE FALSE etc.) – that will happen.

> 

> >

> 

> >

> 

> >

> 

> > You might see some issues in there that relate to your side, saw a 

> > few

> 

> > such as

> 

> >

> 

> > new X3D4 nodes that might not yet be included in view3dscene,

> 

> > Backslash and \n error reports didn’t include line numbers (might be

> 

> > hard to isolate),

> 

> >

> 

> >

> 

> >

> 

> > Saw this error message, but not sure how to implement setting the property via command line, please advise:

> 

> >

> 

> >

> 

> >

> 

> > tovrmlx3d: Warning: X3D: Error EDownloadError when loading inline file from URL  <https://www.web3d.org/x3d/content/examples/Basic/HumanoidAnimation/NancyDiving.x3d> https://www.web3d.org/x3d/content/examples/Basic/HumanoidAnimation/NancyDiving.x3d: Downloading network resources (from "http" or "https"  protocols) is not enabled. Set global EnableBlockingDownloads:=true to enable.

> 

> >

> 

> >

> 

> >

> 

> > Happy to now have these post-conversion tests available, enabling continued deliberate improvements in quality assurance (QA).  Again thanks for a tremendous capability, very helpful.

> 

> >

> 

> >

> 

> >

> 

> > Have fun with VRML!  8)

> 

> >

> 

> >

> 

> >

> 

> > all the best, Don

> 

> >

> 

> > --

> 

> >

> 

> > Don Brutzman  Naval Postgraduate School, Code USW/Br         <mailto:brutzman at nps.edu> brutzman at nps.edu

> 

> >

> 

> > Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA    +1.831.656.2149

> 

> >

> 

> > X3D graphics, virtual worlds, navy robotics

> 

> >  <https://faculty.nps.edu/brutzman> https://faculty.nps.edu/brutzman

> 

> >

> 

> >

> 

> >

> 

> >

> 

> >

> 

> > -----Original Message-----

> 

> > From: Michalis Kamburelis < <mailto:ichalis.kambi at gmail.com> ichalis.kambi at gmail.com>

> 

> > Sent: Monday, August 14, 2023 5:40 AM

> 

> > To: Brutzman, Donald (Don) (CIV) < <mailto:brutzman at nps.edu> brutzman at nps.edu>

> 

> > Cc: X3D Public Mailing List ( <mailto:x3d-public at web3d.org> x3d-public at web3d.org)

> 

> > < <mailto:x3d-public at web3d.org> x3d-public at web3d.org>

> 

> > Subject: Re: VRML97 and ClassicVRML model validation from command 

> > line

> 

> > using view3dscene

> 

> >

> 

> >

> 

> >

> 

> > Don,

> 

> >

> 

> >

> 

> >

> 

> > In short: I added now –validate option to tovrmlx3d 😊

> 

> >

> 

> >

> 

> >

> 

> > Example usage on a valid model:

> 

> >

> 

> >

> 

> >

> 

> > ```

> 

> >

> 

> > $ ./tovrmlx3d ../demo-models/x3d/axis.x3d –validate $ echo $?

> 

> >

> 

> > 0

> 

> >

> 

> > ```

> 

> >

> 

> >

> 

> >

> 

> > So empty output, and exit status 0, as expected from most tools. You can use this with Ant, Make or anything else.

> 

> >

> 

> >

> 

> >

> 

> > Example usage on a model with problems:

> 

> >

> 

> >

> 

> >

> 

> > ```

> 

> >

> 

> > $ ./tovrmlx3d

> 

> > ../demo-models/x3d/warnings/invalid_statement_omitted_1.x3dv

> 

> >

> 

> > --validate

> 

> >

> 

> > tovrmlx3d: Warning: VRML/X3D: Error when reading, will skip the rest of X3D file: Error at line 15 column 2: Expected node type or DEF or USE, got “}”

> 

> >

> 

> > Exception “Exception”:

> 

> >

> 

> > Validation failed (consult the warnings above), exiting with 

> > non-zero

> 

> > status

> 

> >

> 

> >

> 

> >

> 

> > $ echo $?

> 

> >

> 

> > 1

> 

> >

> 

> > ```

> 

> >

> 

> >

> 

> >

> 

> > So you get output on stderr, and non-zero exit status.

> 

> >

> 

> >

> 

> >

> 

> > Please give ~1 hour for Jenkins to process it, and this new version 

> > of

> 

> > tovrmlx3d will be part of “snapshot" version on

> 

> >

> 

> >  <https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcastle-engine.io%2Fview3dscene.php&data=05%7C01%7Cbrutzman%40nps.edu%7C3d80318df4e84ffb9bd808dba4a2128e%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638284788259877064%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=75DKhwwy035S0ZfUVYy6dTNZ9IjbjvHwR8Ji76HLmWg%3D&reserved=0> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcastle-engine.io%2Fview3dscene.php&data=05%7C01%7Cbrutzman%40nps.edu%7C3d80318df4e84ffb9bd808dba4a2128e%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638284788259877064%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=75DKhwwy035S0ZfUVYy6dTNZ9IjbjvHwR8Ji76HLmWg%3D&reserved=0 .

> 

> >

> 

> >

> 

> >

> 

> > I used above test models from  <https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcastle-engine%2Fdemo-models&data=05%7C01%7Cbrutzman%40nps.edu%7C3d80318df4e84ffb9bd808dba4a2128e%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638284788259877064%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=a2Ap%2Bauwo09e6xt2ESBDAxArENobUPpMWpeZlrfvr5s%3D&reserved=0> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcastle-engine%2Fdemo-models&data=05%7C01%7Cbrutzman%40nps.edu%7C3d80318df4e84ffb9bd808dba4a2128e%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638284788259877064%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=a2Ap%2Bauwo09e6xt2ESBDAxArENobUPpMWpeZlrfvr5s%3D&reserved=0 .

> 

> >

> 

> >

> 

> >

> 

> > Details:

> 

> >

> 

> >

> 

> >

> 

> > So far, we did validation just by converting and piping output to

> 

> > /dev/null, so "tovrmlx3d xxxx.x3d > /dev/null". But I agree this was

> 

> >

> 

> > unoptimal:

> 

> >

> 

> >

> 

> >

> 

> > - Explicit "--validate" means we don't needlessly waste time converting to /dev/null if you actually just want to validate. We also don't produce eventual warnings when writing, that would sometimes appear and duplicate warnings we already did when reading.

> 

> >

> 

> >

> 

> >

> 

> > - In the future, maybe, explicit "--validate" may allow to run some additional tasks dedicated to validation (maybe because they are time-consuming and not necessary for just usual opening). We don't have such tasks right now, but it would be nice to have such option available.

> 

> >

> 

> >

> 

> >

> 

> > - With explicit "--validate", any warning or error causes non-zero

> 

> > exit status. Makes sense, since a warning (even if we can continue

> 

> >

> 

> > working) still means validation failed.

> 

> >

> 

> >

> 

> >

> 

> > So ... I added "--validate" option to tovrmlx3d.

> 

> >

> 

> >

> 

> >

> 

> > Of note: A rename is on the horizon, for a few reasons (glTF export, consistency with other CGE tools). Most likely:

> 

> >

> 

> > - tovrmlx3d -> caste-scene-process

> 

> >

> 

> > - view3dscene -> castle-scene-view

> 

> >

> 

> > I haven't made up my mind 100% yet, if rename happens I will of 

> > course

> 

> > announce it prominently everywhere :)

> 

> >

> 

> >

> 

> >

> 

> > Regards,

> 

> >

> 

> > Michalis

> 

> >

> 

> >

> 

> >

> 

> > niedz., 13 sie 2023 o 17:53 Brutzman, Donald (Don) (CIV) < <mailto:brutzman at nps.edu> brutzman at nps.edu> napisał(a):

> 

> >

> 

> > >

> 

> >

> 

> > > Hi Michalis.  Thanks for all of your immense, continuing work.

> 

> >

> 

> > >

> 

> >

> 

> > > I am hoping to add validation of converted .wrl and .x3dv files to the regression test suite for X3D Example Archives.  This will check the quality of output from the X3dToVrml.xslt stylesheets, and improve the quality assurance (QA) of all VRML models offered there – over 4000 in each case. In each case I’ll create and commit a build.log text file so that we can keep track of compliance and progress.

> 

> >

> 

> > >

> 

> >

> 

> > > X3D Resources, Examples: Scene Archives for X3D

> 

> >

> 

> > >  <https://www.web3d.org/x3d/content/examples/X3dResources.html#Examp> https://www.web3d.org/x3d/content/examples/X3dResources.html#Examp

> > > le

> 

> > > s

> 

> >

> 

> > >

> 

> >

> 

> > > To do so, am thinking that command-line invocation (CLI) of your view3dscene or tovrmlx3d executable tools can be accomplished through addition to the existing Ant build.xml scripts.  Am keen to proceed with that task.

> 

> >

> 

> > >

> 

> >

> 

> > > Am looking through the view3dscene CLI documentation, but am not exactly sure how to accomplish this.

> 

> >

> 

> > >

> 

> >

> 

> > > view3dscene, 4. Command-line options

> 

> >

> 

> > >  <https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2F> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2F

> > > ca%2F&data=05%7C01%7Cbrutzman%40nps.edu%7C3d80318df4e84ffb9bd808db

> > > a4a2128e%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638284788259

> > > 877064%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzI

> > > iLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=vi6H9tx9Fdmw

> > > sXQoC83tRiLuho6Vr3lsqGBlh9cklmk%3D&reserved=0

> 

> > > stle-engine.io%2Fview3dscene.php%23section_command_line_options&da

> > > ta

> 

> > > =05%7C01%7Cbrutzman%40nps.edu%7C2baece0d2d40458e15cb08dba3e28885%7

> > > C6

> 

> > > d936231a51740ea9199f7578963378e%7C0%7C0%7C638283965717273937%7CUnk

> > > no

> 

> > > wn%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1ha

> > > Ww

> 

> > > iLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Wxt6n6awK8i1MHeaKC1Wv8%2Fbdn

> > > %2

> 

> > > FsWIo4JGaCBfRFzkw%3D&reserved=0

> 

> >

> 

> > >

> 

> >

> 

> > > view3dscene, 4.2. Converting to X3D

> 

> >

> 

> > >  <https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2F> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2F

> > > ca%2F&data=05%7C01%7Cbrutzman%40nps.edu%7C3d80318df4e84ffb9bd808db

> > > a4a2128e%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638284788259

> > > 877064%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzI

> > > iLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=vi6H9tx9Fdmw

> > > sXQoC83tRiLuho6Vr3lsqGBlh9cklmk%3D&reserved=0

> 

> > > stle-engine.io%2Fview3dscene.php%23section_converting&data=05%7C01

> > > %7

> 

> > > Cbrutzman%40nps.edu%7C2baece0d2d40458e15cb08dba3e28885%7C6d936231a

> > > 51

> 

> > > 740ea9199f7578963378e%7C0%7C0%7C638283965717273937%7CUnknown%7CTWF

> > > pb

> 

> > > GZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI

> > > 6M

> 

> > > n0%3D%7C3000%7C%7C%7C&sdata=NZk2EMKFQcYMv11ajbUJrWXvp07dmDOhxr4QLS

> > > pz

> 

> > > nKE%3D&reserved=0

> 

> >

> 

> > >

> 

> >

> 

> > > Additional options needed, or not seen:

> 

> >

> 

> > >

> 

> >

> 

> > > Validation report only, plain text via console.  (Perhaps a

> 

> > > -validate

> 

> >

> 

> > > switch is a variation on your ---write switches.) Avoid creation 

> > > of

> 

> >

> 

> > > additional files, if possible.  (I might send each output to a

> 

> > > single

> 

> >

> 

> > > temp file, but all that file writing will likely slow down the

> 

> >

> 

> > > already-long overall process.)

> 

> >

> 

> > >

> 

> >

> 

> > > Please advise if there is a way to invoke one of your tools to accomplish this.  CLI example will be helpful.  Thanks in advance for all guidance.

> 

> >

> 

> > >

> 

> >

> 

> > > Have fun with VRML!   8)

> 

> >

> 

> > >

> 

> >

> 

> > > all the best, Don

> 

> >

> 

> >

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20230824/ea3b20f0/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5464 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20230824/ea3b20f0/attachment-0001.p7s>


More information about the x3d-public mailing list