[x3d-public] PyJNIus and X3DJSAIL examples

John Carlson yottzumm at gmail.com
Fri Sep 14 17:20:15 PDT 2018


Outstanding:

Figure out a way to run “npm install” from ant. It should be first in the build.all

Please help.

John

Sent from Mail for Windows 10

From: John Carlson
Sent: Friday, September 14, 2018 8:18 PM
To: Brutzman, Donald (Don) (CIV)
Cc: X3D Graphics public mailing list
Subject: RE: PyJNIus and X3DJSAIL examples

I’ve added the pip installs and the python X3DUOM calls. I’ve upgraded the schemas as well.

John

Sent from Mail for Windows 10

From: John Carlson
Sent: Friday, September 14, 2018 8:02 PM
To: Brutzman, Donald (Don) (CIV)
Cc: X3D Graphics public mailing list
Subject: RE: PyJNIus and X3DJSAIL examples

Here is my first attempt at providing a build.xml script for pythonSAI which may be adapted for x3d/content folders:

https://github.com/coderextreme/pythonSAI/blob/master/build.xml target build.all has 3 sections:

1. RunSaxon to convert X3D XML to X3D JSON (replace with your favorite converter)
2. Json2py.js to convert X3D JSON to python (replace with X3dToPython.xslt)
3. Python to run the python (figure out a short way to call it)

These all work on files in the current folder. But in particular the second one uses a JavaScript program and PythonSerializer.js to convert JSON to python.

Please provide feedback on needed changes to generated python files.

You may use the build.xml under the provided license, since it’s based on yours.  Please double check that the license is complete.

Pull requests are welcome.

I am trying to duplicate what I do in https://github.com/coderextreme/pythonSAI/blob/master/make.sh, but will probably add python installation found there in make.sh to build.xml in the future (or you can).   I think someone who hasn’t installed python etc yet should write that part of the script (add the execs to pip installer).

Anyway this is a start that you can start adding to your x3d/content scripts, after making the included files less concrete.

Collaboration on build.xml welcome.

Thanks,

John

Sent from Mail for Windows 10

From: Brutzman, Donald (Don) (CIV)
Sent: Friday, September 14, 2018 5:40 PM
To: John Carlson
Cc: X3D Graphics public mailing list
Subject: Re: PyJNIus and X3DJSAIL examples

John this all sounds great!

Might you write an Ant build.xml target to create PyJNIus build, then i can integrate into the build process?  Or just provide scripts of whatever sort, and I can create the Ant targets.

i think that after the current round of X3dToJava.xslt improvements and corresponding strict validation of values in field/fieldValue elements, that will be an excellent stable point to test from.

Can you create a HelloWorld.py corresponding to HelloWorld.x3d .json .java etc. that we can use to consider design patterns.

There will be more work to do (of course) but those constructs will move us quite far ahead and prepare the decks for action.

Am hoping that I might be able to help focus on this in a few more weeks, maybe a month from now.

Thanks for your steady work on these possibilities.

On 9/13/2018 9:18 AM, John Carlson wrote:
> I am somewhat back on my feet after a hospitalization and I’m ready to contribute to PyJNIus and X3DJSAIL examples.
> 
> Please review some PyJNIus .py examples @ https://github.com/coderextreme/pythonSAI and provide feedback.  One thing I’d like to see is some chaining of methods.
> 
> Is X3dToPython.xslt in the works yet? Can we try to produce similar code? It should be a fairly simple port.
> 
> One next step is to run the converter/serializer on the x3d resources examples.
> 
> Do we want to integrate the pythonSAI into X3DJSAIL similar to how we did Nashorn?
> 
> I am willing to discuss this tomorrow.
> 
> Thanks,
> 
> John
> 


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




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20180914/3b5873cc/attachment-0001.html>


More information about the x3d-public mailing list