<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style></head><body lang=EN-US link=blue vlink="#954F72"><div class=WordSection1><p class=MsoNormal>d) If we put everything in one import, then we will have to prepend something like X3Dautoclass to all our constructor calls, if we do it the right way (according to my understanding from Loren).  So probably not a big win either way.  This probably goes in the IDE.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>a, b) I added the SF and MF constructors to fix the AttributeError issues. SF*Object and MF*Object do not appear in interfaces, so it pulls the result of the outer method to the concrete class.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Will work on c, eventually.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>John</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Sent from <a href="https://go.microsoft.com/fwlink/?LinkId=550986">Mail</a> for Windows 10</p><p class=MsoNormal><o:p> </o:p></p><div style='mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal style='border:none;padding:0in'><b>From: </b><a href="mailto:brutzman@nps.edu">Brutzman, Donald (Don) (CIV)</a><br><b>Sent: </b>Tuesday, April 30, 2019 11:53 AM<br><b>To: </b><a href="mailto:yottzumm@gmail.com">John Carlson</a>; <a href="mailto:lepeitso@nps.edu">Peitso, Loren (CIV)</a><br><b>Cc: </b><a href="mailto:x3d-public@web3d.org">X3D Graphics public mailing list</a><br><b>Subject: </b>Re: Status, X3DPSAIL: clean build achieved! next steps on Pythonsyntax</p></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>All the example archives have been published.  Am still compiling/testing the simple syntax, but only the pipeline syntax is published.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>                http://www.web3d.org/x3d/content/examples/X3dResources.html#Examples</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>http://x3dgraphics.com/examples/X3dForWebAuthors/Chapter01TechnicalOverview/HelloWorldIndex.html</p><p class=MsoNormal>http://x3dgraphics.com/examples/X3dForWebAuthors/Chapter01TechnicalOverview/HelloWorld.py</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Current version attached for perusal and archival retention, since we are likely to keep improving syntax.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Now we are finally getting to some of the more fun stuff... Here are some suggested changes in python syntax, what do you think?</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>- - - -</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>a. Work to avoid need for superfluous typing, for example SFString("hello") and SFInt32(1) and SFFloat(5.0) etc.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>- - - -</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>b. Work to avoid need for more complex typing, as more Pythonic; most of these might be supported already, as shown in Java examples. For example:</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>                .setDiffuseColor(SFColor([0.1,0.5,1]))</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>ought to work as</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>                .setDiffuseColor([0.1,0.5,1))</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>or even</p><p class=MsoNormal>                .setDiffuseColor(0.1,0.5,1)</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>- - - -</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>c. continue field setting on single line for each node, matching readability of Java examples.  For example:</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>      .addChild(Transform() \</p><p class=MsoNormal>       .setTranslation(SFVec3f([0,-2,0])) \</p><p class=MsoNormal>       .addChild(Shape() \</p><p class=MsoNormal>        .setGeometry(Text() \</p><p class=MsoNormal>         .setDEF(SFString("TextMessage")) \</p><p class=MsoNormal>         .setString(MFString(["Hello","world!"])) \</p><p class=MsoNormal>         .setFontStyle(FontStyle() \</p><p class=MsoNormal>          .setJustify(MFString(["MIDDLE","MIDDLE"])) \</p><p class=MsoNormal>         ) \</p><p class=MsoNormal>        ) \</p><p class=MsoNormal>        .setAppearance(Appearance() \</p><p class=MsoNormal>         .setMaterial(Material() \</p><p class=MsoNormal>          .setUSE(SFString("MaterialLightBlue")) \</p><p class=MsoNormal>         ) \</p><p class=MsoNormal>        ) \</p><p class=MsoNormal>       ) \</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>to</p><p class=MsoNormal>      .addChild(Transform().setTranslation(SFVec3f([0,-2,0])) \</p><p class=MsoNormal>        .addChild(Shape() \</p><p class=MsoNormal>          .setGeometry(Text().setDEF(SFString("TextMessage")).setString(MFString(["Hello","world!"])) \</p><p class=MsoNormal>            .setFontStyle(FontStyle().setJustify(MFString(["MIDDLE","MIDDLE"])))) \</p><p class=MsoNormal>          .setAppearance(Appearance() \</p><p class=MsoNormal>            .setMaterial(Material().setUSE(SFString("MaterialLightBlue"))))) \</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>perhaps eye-of-the-beholder but i like indentation with 2 space characters, as shown here, since the result shows scene-graph structure.  also isolates all errors for a single node, simplifying troubleshooting.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>- - - -</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>d. Are we ever going to be able to condense all of the imports into a single line or two?  Currently way too much work for a plain old programmer looking for something that works.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Perhaps this awaits pip module.  Or perhaps we can move the full customization into pyjnius (or even X3DJSAIL) somehow?</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>from org.web3d.x3d.jsail.Core.X3DObject import X3DObject as X3D</p><p class=MsoNormal>from org.web3d.x3d.jsail.fields.SFStringObject import SFStringObject as SFString</p><p class=MsoNormal>from org.web3d.x3d.jsail.Core.headObject import headObject as head</p><p class=MsoNormal>from org.web3d.x3d.jsail.Core.metaObject import metaObject as meta</p><p class=MsoNormal>from org.web3d.x3d.jsail.Core.SceneObject import SceneObject as Scene</p><p class=MsoNormal>from org.web3d.x3d.jsail.Grouping.GroupObject import GroupObject as Group</p><p class=MsoNormal>from org.web3d.x3d.jsail.Navigation.ViewpointObject import ViewpointObject as Viewpoint</p><p class=MsoNormal>from org.web3d.x3d.jsail.fields.SFVec3fObject import SFVec3fObject as SFVec3f</p><p class=MsoNormal>from org.web3d.x3d.jsail.Grouping.TransformObject import TransformObject as Transform</p><p class=MsoNormal>from org.web3d.x3d.jsail.fields.SFRotationObject import SFRotationObject as SFRotation</p><p class=MsoNormal>from org.web3d.x3d.jsail.Shape.ShapeObject import ShapeObject as Shape</p><p class=MsoNormal>from org.web3d.x3d.jsail.Geometry3D.SphereObject import SphereObject as Sphere</p><p class=MsoNormal>from org.web3d.x3d.jsail.Shape.AppearanceObject import AppearanceObject as Appearance</p><p class=MsoNormal>from org.web3d.x3d.jsail.Shape.MaterialObject import MaterialObject as Material</p><p class=MsoNormal>from org.web3d.x3d.jsail.fields.SFColorObject import SFColorObject as SFColor</p><p class=MsoNormal>from org.web3d.x3d.jsail.Texturing.ImageTextureObject import ImageTextureObject as ImageTexture</p><p class=MsoNormal>from org.web3d.x3d.jsail.fields.MFStringObject import MFStringObject as MFString</p><p class=MsoNormal>from org.web3d.x3d.jsail.Text.TextObject import TextObject as Text</p><p class=MsoNormal>from org.web3d.x3d.jsail.Text.FontStyleObject import FontStyleObject as FontStyle</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>onward and upward, getting terser as we go...  having fun with X3D Python!  8)</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>On 4/27/2019 8:36 PM, Brutzman, Donald (Don) (CIV) wrote:</p><p class=MsoNormal>> John, great news we have long been working towards: we now have clean builds running for both syntax forms using scripts in the java/src/pyjnius directory.  8)</p><p class=MsoNormal>> </p><p class=MsoNormal>> Example output attached for HelloWorld.x3D round tripping.  Fixed some diagnostics in X3DJSAIL also.</p><p class=MsoNormal>> </p><p class=MsoNormal>> Everything is checked in.  Please look at the subversion diffs to see what happened, i made multiple small modifications to .xml .py and .js files but all your code is essentially intact.</p><p class=MsoNormal>> https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/java/src/python/pyjnius/</p><p class=MsoNormal>> </p><p class=MsoNormal>> Tonite am running full regression on all X3D example archive scenes, mostly running cleanly.  Will upload log and report when done.  Unless you made a converter change, all of the SceneName.py and SceneName.future.py files will be unchanged from last time.</p><p class=MsoNormal>> </p><p class=MsoNormal>> Suggested next steps:</p><p class=MsoNormal>> </p><p class=MsoNormal>> a. review and tweak, further corrections, list open issues.</p><p class=MsoNormal>> b. rename our two syntax examples SceneName1.py and SceneName2.py (others may occur), republish archives.</p><p class=MsoNormal>> c. begin looking at whether pip install is possible for X3DPSAIL with a java dependency.</p><p class=MsoNormal>> d. document everything fully.</p><p class=MsoNormal>> </p><p class=MsoNormal>> Request: am hoping you could add some more prose to your workflow powerpoint to explain what is going on at each transformation.  Some files are source, others are products.  Current version attached, TIA.</p><p class=MsoNormal>> </p><p class=MsoNormal>> Big corner turned... incremental improvement is much easier than digging around in the fog!  Thanks for your sustained efforts on this one, totally crucial.  Higher ground is coming into view.</p><p class=MsoNormal>> </p><p class=MsoNormal>> Have fun with X3D Python!   8)</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>all the best, Don</p><p class=MsoNormal>-- </p><p class=MsoNormal>Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman@nps.edu</p><p class=MsoNormal>Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149</p><p class=MsoNormal>X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman</p><p class=MsoNormal><o:p> </o:p></p></div></body></html>