[x3d-public] updates to X3DJSAIL, plus python and java versions of X3D Examples, X3DPSAIL

Brutzman, Donald (Don) (CIV) brutzman at nps.edu
Wed Jun 12 05:22:14 PDT 2019


Hi John.  Yesterday I belatedly noticed that, following last week's build, you recently changed the syntax of X3D .py in the default conversion output.

4. Syntax evolution.  Excerpt from our exemplar scene:

http://x3dgraphics.com/examples/X3dForWebAuthors/Chapter01TechnicalOverview/HelloWorld.py
=======================
import x3dpsail

X3D0 = (x3dpsail.X3D().setProfile(x3dpsail.SFString("Immersive")).setVersion(x3dpsail.SFString("3.3"))
       .setHead(x3dpsail.head()
         .addMeta(x3dpsail.meta().setContent(x3dpsail.SFString("HelloWorld.x3d")).setName(x3dpsail.SFString("title")))
// etc.
=======================

a. Like how you were able to condense all the import statements into one, that is an important step forward.  Please explain how you did that.

b. Don't like the change in the base syntax, we must remain terse/portable/pythonic.  Certainly OK for developmental testing but not our final target.  As listed in paragraph 3 of prior message below, our Python syntax goal remains using native types in the prior style:

    X3D0 = X3D().setProfile("Immersive").setVersion(3.3)
       .setHead(head()
         .addMeta(meta().setContent("HelloWorld.x3d").setName("title")) // etc.

c. Towards that end, I have been studying Pyjnius and I think I know how we can get rid of those SFString/x3dpsail.SFString type wrappers so that Pyjnius employs the correct return type.  Basically instead of trying to fix Pyjnius internals at this point, we might instead explicitly define interfaces for each of the set methods throughout X3D and coerce correct behavior, so that Pyjnius doesn't mistakenly return abstract node types.  More work needed.

d. Am finally back from extended travels and can re-engage at a higher rate. Hoping we can pick a time later this week to discuss so that our continued co-development can proceed without collision, let's coordinate offline to find a good time.

Thanks for your continuing efforts, looks like we are getting closer.  Sure would be great if we can land on a fully working X3DPSAIL implementation prior to Web3D 2019 conference next month!

v/r Don

On 5/27/2019 5:42 PM, Brutzman, Donald (Don) (CIV) wrote:
> X3D Java Scene Access Interface Library (X3DJSAIL) supports programmers with standards-based X3D Java interfaces and objects, all as open source.
> 
> 	http://www.web3d.org/specifications/java/X3DJSAIL.html
> 
> 1. Two useful improvements in X3DJSAIL have been applied, checked into version control and published.
> 
> a. Have fixed long-running overzealous regular expression (regex) warnings that were getting triggered when validating large X3D models.  Since regex patterns are applied against strings, pattern matching is not needed after numbers have been parsed and read into memory.  Eliminating those extra warnings greatly reduced the extra messages.
> 
> 	http://www.web3d.org/specifications/java/X3DJSAIL.html#EXI
> 
> b. Exificient has been available for some time as an implementation of Efficient XML Interchange (EXI) compression standard by World World Web Consortium (W3C).  Thanks t oefforts by Terry Norbraten NPS, OpenEXI is now integrated as a second implementation for EXI compression.  Further work will continue on exposing options and testing across-tool compatibility as part of regular unit tests.
> 
> c. As ever, example program HelloWorldProgram.java tests numerous features and a log of outputs is provided.
> 
> 	http://www.web3d.org/specifications/java/X3DJSAIL.html#Examples
> 	http://www.web3d.org/specifications/java/examples/HelloWorldProgram.java
> 	http://www.web3d.org/specifications/java/examples/HelloWorldProgramOutputLog.txt
> 
> -----
> 
> 2. Updates have been applied and tested on X3D Examples Archives using these many scenes as a gigantic unit-testing suite.
> 
> 	X3D Examples Archives
> 	http://www.web3d.org/x3d/content/examples/X3dResources.html#Examples
> 
> Build logs:
> 
> 	https://www.web3d.org/x3d/content/examples/build.java.all.log.txt
> 	https://www.web3d.org/x3d/content/examples/build.python.all.log.txt
> 
> Primary example scene with multiple conversions including Java and Python source:
> 
> 	http://x3dgraphics.com/examples/X3dForWebAuthors/Chapter01TechnicalOverview/HelloWorldIndex.html
> 	http://x3dgraphics.com/examples/X3dForWebAuthors/Chapter01TechnicalOverview/HelloWorld.java
> 	http://x3dgraphics.com/examples/X3dForWebAuthors/Chapter01TechnicalOverview/HelloWorld.py
> 
> -----
> 
> 3. Development efforts continue on the X3D Python encoding using X3DJSAIL as an implementation engine.  Primary tasks:
> 
> a. Document current X3D Python implementation using Pyjnius and X3DJSAIL as X3DPSAIL, X3D Python Scene Access Interface Library (X3DPSAIL).
> 
> b. Fix Pyjnius error which returns abstract interfaces or superclasses instead of original concrete classes.  This is basis of most existing errors in the Python example builds.
> 
> c. Move set of "import" statements from .py source to Pyjnius configuration of X3DJSAIL.
> 
> Development efforts continue to be reflected on x3d-public mailing list.
> 
> Having fun with X3D Java and Python!  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 http://faculty.nps.edu/brutzman


More information about the x3d-public mailing list