<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Don, I will probably begin working on JSON export testing after I
take the JSON import example for a short spin. It's good to get a
code download.</p>
<p>Note that SFVec3f should put a tuple in the structure when
parsing JSON...normal JSON does not include tuples, so there needs
to be a type conversion.</p>
<p>That is, centerOfRotation and position in Viewpoint should be
tuples, not lists as JSON provides.</p>
<p>I sent a previous message about HelloWorld.py and how the fields
might be converted to lists in the the constructor call.</p>
<p>I will probably talk to you about how to make MF fields iterable
in the next few days and whether they need to be</p>
<p>I think that pretty much summarizes previous messages.<br>
</p>
<div class="moz-cite-prefix">On 12/5/21 23:47, Brutzman, Donald
(Don) (CIV) wrote:<br>
</div>
<blockquote type="cite"
cite="mid:BY3PR13MB4884E578467EAE89565704AEC46D9@BY3PR13MB4884.namprd13.prod.outlook.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style>@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}.MsoChpDefault
{mso-style-type:export-only;}div.WordSection1
{page:WordSection1;}ol
{margin-bottom:0in;}ul
{margin-bottom:0in;}</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal">Am happy to report that after a bunch of
work, X3DPSAIL x3d.py package is updated and deployed to
x3d.py<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Python users can update using PyPy with the
command “pip install x3d” – pretty simple!<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:.25in"><a class="moz-txt-link-freetext" href="https://pypi.org/project/x3d">https://pypi.org/project/x3d</a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Documentation:<o:p></o:p></p>
<ul style="margin-top:0in" type="disc">
<li class="MsoListParagraph"
style="margin-left:0in;mso-list:l3 level1 lfo1">Python X3D
Package x3d.py, X3D Python Scene Access Interface Library
(X3DPSAIL)<o:p></o:p></li>
<li class="MsoListParagraph"
style="margin-left:0in;mso-list:l3 level1 lfo1">The x3d.py
Python X3D Package supports programmers with Python
interfaces and objects for standards-based X3D programming,
all as open source.<o:p></o:p></li>
<li class="MsoListParagraph"
style="margin-left:0in;mso-list:l3 level1 lfo1"><a class="moz-txt-link-freetext" href="https://www.web3d.org/x3d/stylesheets/python/python.html">https://www.web3d.org/x3d/stylesheets/python/python.html</a><o:p></o:p></li>
</ul>
<p class="MsoListParagraph"><o:p> </o:p></p>
<p class="MsoNormal">Improvements include:<o:p></o:p></p>
<ol style="margin-top:0in" type="a" start="1">
<li class="MsoListParagraph"
style="margin-left:0in;mso-list:l5 level1 lfo2">VRML export
improvements and JSON export added, though likely with a few
bugs still.<o:p></o:p></li>
<li class="MsoListParagraph"
style="margin-left:0in;mso-list:l5 level1 lfo2">added method
XMLvalidate() for well-formed checkes and schema validation,<o:p></o:p></li>
<li class="MsoListParagraph"
style="margin-left:0in;mso-list:l5 level1 lfo2">added
utility function prepend_line_numbers() for prettier file
outputs/excerpts when desired,
<o:p></o:p></li>
<li class="MsoListParagraph"
style="margin-left:0in;mso-list:l5 level1 lfo2">fixed
hasChild() function,<o:p></o:p></li>
<li class="MsoListParagraph"
style="margin-left:0in;mso-list:l5 level1 lfo2">confirmed
fixed-value functions working as constants (no set methods),<o:p></o:p></li>
<li class="MsoListParagraph"
style="margin-left:0in;mso-list:l5 level1 lfo2">added
appropriate @classmethod and @staticmethod annotations for
simpler invocation,<o:p></o:p></li>
<li class="MsoListParagraph"
style="margin-left:0in;mso-list:l5 level1 lfo2">VRML and
JSON export smoke tests,
<o:p></o:p></li>
<li class="MsoListParagraph"
style="margin-left:0in;mso-list:l5 level1 lfo2">Display
selected REGEX_XML() values (available for all field types)
and TOOLTIP_URL() values (available for all types, nodes and
statements).<o:p></o:p></li>
</ol>
<p class="MsoListParagraph"><o:p> </o:p></p>
<p class="MsoNormal">Repeating and refining rapid-fire smoke
tests and also immense regression tests for all X3D Example
Archives.<o:p></o:p></p>
<ol style="margin-top:0in" type="1" start="1">
<li class="MsoListParagraph"
style="margin-left:0in;mso-list:l4 level1 lfo6">Example
usage in detail:
<a class="moz-txt-link-freetext" href="https://www.web3d.org/x3d/stylesheets/python/examples/PythonX3dSmokeTests.py">https://www.web3d.org/x3d/stylesheets/python/examples/PythonX3dSmokeTests.py</a><o:p></o:p></li>
<li class="MsoListParagraph"
style="margin-left:0in;mso-list:l4 level1 lfo6">Example
usage results:
<a class="moz-txt-link-freetext" href="https://www.web3d.org/x3d/stylesheets/python/build.examples.log.txt">https://www.web3d.org/x3d/stylesheets/python/build.examples.log.txt</a><o:p></o:p></li>
<li class="MsoListParagraph"
style="margin-left:0in;mso-list:l4 level1 lfo6">Sample IDLE
screenshot:
<a class="moz-txt-link-freetext" href="https://www.web3d.org/x3d/stylesheets/python/images/PythonX3dSmokeTestsIDLE.png">https://www.web3d.org/x3d/stylesheets/python/images/PythonX3dSmokeTestsIDLE.png</a><o:p></o:p></li>
</ol>
<p class="MsoListParagraph"><o:p> </o:p></p>
<ol style="margin-top:0in" type="1" start="4">
<li class="MsoListParagraph"
style="margin-left:0in;mso-list:l4 level1 lfo6">X3D
Resources, Examples: Scene Archives for X3D - model links
and build log follows.<o:p></o:p></li>
<li class="MsoListParagraph"
style="margin-left:0in;mso-list:l4 level1 lfo6"><a class="moz-txt-link-freetext" href="https://www.web3d.org/x3d/content/examples/X3dResources.html#Examples">https://www.web3d.org/x3d/content/examples/X3dResources.html#Examples</a><o:p></o:p></li>
<li class="MsoListParagraph"
style="margin-left:0in;mso-list:l4 level1 lfo6"><a class="moz-txt-link-freetext" href="https://www.web3d.org/x3d/content/examples/build.python.all.log.txt">https://www.web3d.org/x3d/content/examples/build.python.all.log.txt</a><o:p></o:p></li>
<li class="MsoListParagraph"
style="margin-left:0in;mso-list:l4 level1 lfo6">Once again
X3dToPython.xslt stylesheet applies latest greatest code
patterns and includes a self-test block at the end,
self-reporting either success or a problem.<o:p></o:p></li>
</ol>
<div
style="mso-element:para-border-div;border:none;border-bottom:solid
windowtext 1.5pt;padding:0in 0in 1.0pt 0in">
<p class="MsoNormal" style="border:none;padding:0in"><o:p> </o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Vince, your reported apostrophe/quotation
serialization issues look to be fixed according to the
following test excerpts. How are these:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<ul style="margin-top:0in" type="disc">
<li class="MsoListParagraph"
style="margin-left:0in;mso-list:l3 level1 lfo1"><a class="moz-txt-link-freetext" href="https://www.web3d.org/x3d/stylesheets/python/examples/HelloWorld.x3d">https://www.web3d.org/x3d/stylesheets/python/examples/HelloWorld.x3d</a>
<o:p></o:p></li>
</ul>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-family:"Courier
New",serif"> <Scene><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier
New",serif"> <!-- Example scene to illustrate X3D
nodes and fields (XML elements and attributes) --><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier
New",serif"> <WorldInfo title='Hello World!'/><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier
New",serif"> <WorldInfo title='Hello '
apostrophe 1'/><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier
New",serif"> <WorldInfo title="Hello ' apostrophe
2"/><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier
New",serif"> <WorldInfo title='Hello " quotation
mark 3'/><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier
New",serif"> <WorldInfo title="Hello "
quotation mark 4"/><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier
New",serif"> <MetadataSet name="items'"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier
New",serif"> <MetadataInteger
containerField="value" name="one" value="1"/><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier
New",serif"> <MetadataInteger
containerField="value" name="two" value="2"/><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier
New",serif"> </MetadataSet><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier
New",serif"> <Group><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<ul style="margin-top:0in" type="disc">
<li class="MsoListParagraph"
style="margin-left:0in;mso-list:l3 level1 lfo1"><a class="moz-txt-link-freetext" href="https://www.web3d.org/x3d/stylesheets/python/examples/HelloWorld.py">https://www.web3d.org/x3d/stylesheets/python/examples/HelloWorld.py</a><o:p></o:p></li>
</ul>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Courier
New",serif">Scene=Scene(<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Courier
New",serif"> # Example scene to illustrate X3D
nodes and fields (XML elements and attributes)
<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Courier
New",serif"> children=[<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Courier
New",serif"> WorldInfo(title='Hello World!'),<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Courier
New",serif"> WorldInfo(title="Hello ' apostrophe
1"),<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Courier
New",serif"> WorldInfo(title="Hello ' apostrophe
2"),<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Courier
New",serif"> WorldInfo(title='Hello " quotation mark
3'),<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Courier
New",serif"> WorldInfo(title='Hello " quotation mark
4'),<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Courier
New",serif"> MetadataSet(name="items'",<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Courier
New",serif"> value=[<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Courier
New",serif">
MetadataInteger(name='one',value=[1]),<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Courier
New",serif">
MetadataInteger(name='two',value=[2])]),<o:p></o:p></span></p>
<div
style="mso-element:para-border-div;border:none;border-bottom:solid
windowtext 1.5pt;padding:0in 0in 1.0pt 0in">
<p class="MsoNormal" style="border:none;padding:0in"><span
style="font-size:10.0pt;font-family:"Courier
New",serif"> Group(<o:p></o:p></span></p>
<p class="MsoNormal" style="border:none;padding:0in"><span
style="font-size:10.0pt;font-family:"Courier
New",serif"><o:p> </o:p></span></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Lots and lots of code tuneups performed by
paying attention to pylint warnings. Hopefully no unintended
side effects for others, meanwhile the test cases all seem
stable. This pylint quest originally started with over 100K
lines of warning (urrk cough cough cough) and is now down to
700 lines... The great bug hunt continues.<o:p></o:p></p>
<ul style="margin-top:0in" type="disc">
<li class="MsoListParagraph"
style="margin-left:0in;mso-list:l3 level1 lfo1"><a class="moz-txt-link-freetext" href="https://www.web3d.org/x3d/stylesheets/python/build.pylint.log.txt">https://www.web3d.org/x3d/stylesheets/python/build.pylint.log.txt</a><o:p></o:p></li>
<li class="MsoListParagraph"
style="margin-left:0in;mso-list:l3 level1 lfo1">pylint
reports: “Your code has been rated at 9.89/10 (previous run:
9.89/10, +0.00)”<o:p></o:p></li>
</ul>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">John, please collect your comments and
examples regarding JSON export flaws. The
build.examples.log.txt file is a good place to start. Am
returning to work this week, finishing up everything not yet
done this year…<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">New TODOs include figuring out how to apply
regexes on each field during XML export for additional quality
assurance.
<o:p></o:p></p>
<ul style="margin-top:0in" type="disc">
<li class="MsoListParagraph"
style="margin-left:0in;mso-list:l3 level1 lfo1"><a class="moz-txt-link-freetext" href="https://www.web3d.org/specifications/X3dRegularExpressions.html">https://www.web3d.org/specifications/X3dRegularExpressions.html</a><o:p></o:p></li>
</ul>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Issue reports always welcome. Have fun
with X3D Python! 8)<o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Courier
New",serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Courier
New",serif">all the best, Don<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Courier
New",serif">--
<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Courier
New",serif">Don Brutzman Naval Postgraduate School,
Code USW/Br <a class="moz-txt-link-abbreviated" href="mailto:brutzman@nps.edu">brutzman@nps.edu</a><o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Courier
New",serif">Watkins 270, MOVES Institute, Monterey CA
93943-5000 USA +1.831.656.2149<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Courier
New",serif">X3D graphics, virtual worlds, navy robotics
https://</span>
<span style="font-size:10.0pt;font-family:"Courier
New",serif">faculty.nps.edu/brutzman<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</blockquote>
</body>
</html>