[x3d-public] VRML97 and ClassicVRML model validation from command line using view3dscene

Brutzman, Donald (Don) (CIV) brutzman at nps.edu
Sun Aug 13 19:29:26 PDT 2023


x3d.py methods for JSON match the patterns listed in our documentation for this suggested encoding.

 

*	X3D to JSON Stylesheet Converter
*	The X3D to JSON stylesheet converts .x3d XML to .json, supporting the forthcoming JSON Encoding for X3D Graphics.
*	https://www.web3d.org/x3d/stylesheets/X3dToJson.html

 

So do all of the 4,000 autogenerated examples in our X3D Example Archives.

 

*	X3D Resources, Examples: Scene Archives for X3D
*	https://www.web3d.org/x3d/content/examples/X3dResources.html#Examples

 

The overall json build log looks pretty clean to me.  Link and excerpt follow

 

*	https://www.web3d.org/x3d/content/examples/build.json.all.log.txt
*	https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/build.json.all.log.txt

 

X3D examples: X3dForAdvancedModeling.processScenes.json:

C:\x3d-code\www.web3d.org\x3d\content\examples\X3dForAdvancedModeling/AdditiveManufacturing//CaffeinePubChem2519SticksColor.x3d processing with X3dToJson stylesheet

C:\x3d-code\www.web3d.org\x3d\content\examples\X3dForAdvancedModeling/AdditiveManufacturing//CaffeinePubChem2519SticksColor.json validation checking with jslint

C:\x3d-code\www.web3d.org\x3d\content\examples\X3dForAdvancedModeling/AdditiveManufacturing//CaffeinePubChem2519SticksColor.json validation checking with json-schema-validator

... does not support latest JSON Schema, this test is not yet usable

 

By the way, your mention of “x3d-tidy” still seems misnamed since we already have one, for a few years now…

 

*	X3D Tidy for Scene Cleanup, Corrections and Modifications
*	X3D Tidy is an XSLT stylesheet that checks for simple authoring difficulties in X3D scenes and fixes them.
*	https://www.web3d.org/x3d/stylesheets/X3dTidy.html

 

Have fun with X3D using Python and JSON!  8)

 

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

 

From: x3d-public <x3d-public-bounces at web3d.org> On Behalf Of John Carlson
Sent: Sunday, August 13, 2023 2:37 PM
To: GPU Group <gpugroup at gmail.com>
Cc: X3D Public Mailing List (x3d-public at web3d.org) <x3d-public at web3d.org>
Subject: Re: [x3d-public] VRML97 and ClassicVRML model validation from command line using view3dscene

 

AFAIK, JSON output with x3d.py is still a work in progress.

 

x3d-tidy should have .x3dj (JSON) I/O, see:

 

https://www.npmjs.com/package/x3d- <https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.npmjs.com%2Fpackage%2Fx3d-&data=05%7C01%7Cbrutzman%40nps.edu%7Cf9f531f61f1146f6d8b008db9c4592c1%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638275594856167951%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=1bc06Bv4xzzI7qjNya6viyy5NP9vBLNcrvzY%2By5n8VM%3D&reserved=0> 

 

you use it with npx,

 

like

 

$ npx x3d-tidy -i file.x3dv -o file.x3dj

 

I’m trying to figure out why x3dvalidate doesn’t publish properly (maybe it does).  Anyway, when used with npx, parameters are not accepted.  If you want to have a copy in your project, it’s available here:

 

https://github.com/coderextreme/x3dvalidate <https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcoderextreme%2Fx3dvalidate&data=05%7C01%7Cbrutzman%40nps.edu%7Cf9f531f61f1146f6d8b008db9c4592c1%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638275594856167951%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=S8Ms6xLnZ8FE4EEcm0PGz3229OjC2vJHpSpCMY5Gao0%3D&reserved=0> 

 

That should work ok

 

On Sun, Aug 13, 2023 at 12:48 PM GPU Group <gpugroup at gmail.com <mailto:gpugroup at gmail.com> > wrote:

Related: if/once import functions are made for X3D.py, then exports to x3dv, x3d, html, json can be done from there.

 

 

On Sun, Aug 13, 2023 at 9:54 AM Brutzman, Donald (Don) (CIV) <brutzman at nps.edu <mailto:brutzman at nps.edu> > wrote:

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#Examples

 

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://castle-engine.io/view3dscene.php#section_command_line_options <https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcastle-engine.io%2Fview3dscene.php%23section_command_line_options&data=05%7C01%7Cbrutzman%40nps.edu%7Cf9f531f61f1146f6d8b008db9c4592c1%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638275594856167951%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=LijWonezwvWZ39NSfrz9Zggq6k56pjQeImgcRkGMUxs%3D&reserved=0> 

 

*	view3dscene, 4.2. Converting to X3D
*	https://castle-engine.io/view3dscene.php#section_converting <https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcastle-engine.io%2Fview3dscene.php%23section_converting&data=05%7C01%7Cbrutzman%40nps.edu%7Cf9f531f61f1146f6d8b008db9c4592c1%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638275594856167951%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=zWbWuv%2FbTqJvsCIlO%2BVMCEr2d%2FvDdMsDG%2Bz7isNlC%2BE%3D&reserved=0> 

 

Additional options needed, or not seen:

 

a.	Validation report only, plain text via console.  (Perhaps a -validate switch is a variation on your ---write switches.)
b.	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

-- 

Don Brutzman  Naval Postgraduate School, Code USW/Br        brutzman at nps.edu <mailto: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

 

_______________________________________________
x3d-public mailing list
x3d-public at web3d.org <mailto:x3d-public at web3d.org> 
http://web3d.org/mailman/listinfo/x3d-public_web3d.org

_______________________________________________
x3d-public mailing list
x3d-public at web3d.org <mailto:x3d-public at web3d.org> 
http://web3d.org/mailman/listinfo/x3d-public_web3d.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20230814/fb1c0444/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/20230814/fb1c0444/attachment-0001.p7s>


More information about the x3d-public mailing list