<div><div dir="auto">I say go ahead with Loren’s suggestion.   If we can find a way to do this in Typescript, all the better.</div></div><div dir="auto"><br></div><div dir="auto">We might want a meta library which deals with X3DUOM, schema, ontology (Meta file formats).   Similar to what we have for JSON, XML, VRML, knowledge base (file formats). Aka X3DJSAIL, X3DJSONLD.   Let me know if you want me to sketch out a schema or package/class hierarchy—perhaps based on X3DUOM’s schema.</div><div dir="auto"><br></div><div dir="auto">I am thinking of another package, org.web3d.x3d.reflect... if we can’t find an existing one.   This will allow us to convert between schemas, ontologies and object models.</div><div dir="auto"><br></div><div dir="auto">Obviously, we will leverage existing stylesheets which convert schema to object model and convert object model to schema and ontology.</div><div dir="auto"><br></div><div dir="auto">I propose the term X3D Reflect for the artifact, but some may prefer X3DMOP.</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">I will volunteer for implementing a JSON schema input/output library for X3D Reflect.  I can also provide the base for a python library for reading some of  the X3DUOM into python classes (requires more of an OO library)</div><div dir="auto"><br></div><div dir="auto">Should we bring this up in some meeting?</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">John</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Dec 23, 2019 at 9:58 PM Don Brutzman <<a href="mailto:brutzman@nps.edu">brutzman@nps.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Several good improvements to X3D Python implementation.  Thanks to my being able to configure a second laptop in "plain old Python user" mode, have finally unraveled a few PYTHONPATH problems that complicated previous releases.<br>
<br>
* Python X3D Package x3d.py<br>
   <a href="https://www.web3d.org/x3d/stylesheets/python/python.html" rel="noreferrer" target="_blank">https://www.web3d.org/x3d/stylesheets/python/python.html</a><br>
<br>
=============================<br>
🔖 Installation<br>
<br>
Download and install Python (<a href="https://www.python.org" rel="noreferrer" target="_blank">https://www.python.org</a>) on your system.<br>
<br>
Python x3d.py package installation and update options:<br>
<br>
     *pip install x3d*<br>
     or<br>
     *python -m pip install x3d*<br>
<br>
That should be all that is needed for most Python X3D programmers!<br>
Here is an example screenshot for PythonX3dSmokeTests.py using IDLE.<br>
<a href="https://www.web3d.org/x3d/stylesheets/python/images/PythonX3dSmokeTestsIDLE.png" rel="noreferrer" target="_blank">https://www.web3d.org/x3d/stylesheets/python/images/PythonX3dSmokeTestsIDLE.png</a><br>
(image attached)<br>
=============================<br>
<br>
Test reports welcome.  Anyone else using X3D Python?<br>
<br>
More development details:<br>
<br>
Examples now include /HelloWorldPrefixed.py/ which is produced from HelloWorld.x3d by the X3dToPython.xslt stylesheet with invocation parameter insertPackagePrefix=true.<br>
<br>
* <a href="https://www.web3d.org/x3d/stylesheets/python/examples/HelloWorldPrefixed.py" rel="noreferrer" target="_blank">https://www.web3d.org/x3d/stylesheets/python/examples/HelloWorldPrefixed.py</a><br>
<br>
Tests for /HelloWorld.py/ and /HelloWorldPrefixed.py/ and /PythonX3dSmokeTests.py/ are all satisfactory.<br>
<br>
* <a href="https://www.web3d.org/x3d/stylesheets/python/build.examples.log.txt" rel="noreferrer" target="_blank">https://www.web3d.org/x3d/stylesheets/python/build.examples.log.txt</a><br>
<br>
As described in the Design Features section, this library tracks with latest draft X3DUOM for X3Dv4.<br>
<br>
On 11/18/2019 6:01 AM, Brutzman, Donald (Don) (CIV) wrote:<br>
> have upgraded to 3.8 and made significant improvement in numeric MF types, now handling lists of tuples satisfactorily.<br>
> <br>
> TODO is handling field/fieldValue declarations for Script and Proto, they still default to string.<br>
<br>
So the good news is that the converter is now able to represent strict numeric types in field and fieldValue initialization values, not just strings.<br>
<br>
Thus the next line of work will be to get the x3d.py package to properly parse non-SFString field and fieldValue initialization values.<br>
<br>
Getting that squared away handles most of the remaining issues in the comprehensive build of X3D Examples.  At that point we can consider whether further extensions (such as the following interesting suggestion from Loren) ought to be added to the core x3d.py module, or else better left as a separate technique for programmers.<br>
<br>
> On 11/15/2019 12:26 PM, Peitso, Loren (CIV) wrote:<br>
>> Subject: Re: python 3.8 addition that could be very useful for the X3D code<br>
>><br>
>> <a href="https://www.python.org/dev/peps/pep-0589/" rel="noreferrer" target="_blank">https://www.python.org/dev/peps/pep-0589/</a><br>
>><br>
>> Representing an object or structured data using (potentially nested) dictionaries with string keys (instead of a user-defined class) is a common pattern in Python programs. Representing JSON objects is perhaps the canonical use case, and this is popular enough that Python ships with a JSON library. This PEP proposes a way to allow such code to be type checked more effectively.<br>
>><br>
>> v/r  Loren<br>
<br>
Have fun with X3D Python!<br>
<br>
all the best, Don<br>
-- <br>
Don Brutzman  Naval Postgraduate School, Code USW/Br       <a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a><br>
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149<br>
X3D graphics, virtual worlds, navy robotics <a href="http://faculty.nps.edu/brutzman" rel="noreferrer" target="_blank">http://faculty.nps.edu/brutzman</a><br>
_______________________________________________<br>
x3d-public mailing list<br>
<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br>
<a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" rel="noreferrer" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br>
</blockquote></div></div>