<div dir="auto">Masaki,<div dir="auto"><br></div><div dir="auto">Thank you for your continued interest.   I found my old SAI generating code in <a href="https://github.com/coderextreme/pythonSAI/blob/master/old.py" target="_blank">https://github.com/coderext<wbr>reme/pythonSAI/blob/master/<wbr>old.py</a> .  It's old and out of date with respect to X3DJSAIL and validation, but it might be used as the basis for future work.</div><div dir="auto"><br></div><div dir="auto"><a href="https://github.com/coderextreme/pythonSAI/blob/master/classes.py">https://github.com/coderextreme/pythonSAI/blob/master/classes.py</a> is the current X3Dautoclass.py generating program for X3DJSAIL that might need to be modified.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Aug 11, 2017 10:35 AM, "Masaki Aono" <<a href="mailto:aono@tut.jp" target="_blank">aono@tut.jp</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <p>Dear John,</p>
    <p>Thank you very much.</p>
    <p>I think I begin to understand what is happening beneath the
      HelloWorld.py.</p>
    <p>I could partly succeeded in X3D file output with
      X3D0.setScene(Scene25)</p>
    <p> from your HelloWorld.py for the functions already implemented
      (by pynius?) as attached.</p>
    <p>Hopefully, missing functions are to be implemented soon.</p>
    <p>Sincerely,<br>
    </p>
    <p>------------------------------<wbr>------------------------------<wbr>---<br>
    </p>
    <p>Minor errors I met (other than :ViewpointObject) </p>
    <p>AttributeError: 'org.web3d.x3d.sai.Shape.<wbr>X3DMaterialNode' object
      has no attribute 'setDiffuseColor'</p>
    <p>AttributeError: 'org.web3d.x3d.sai.Texturing.<wbr>X3DTextureNode'
      object has no attribute 'setUrl'</p>
    <p>AttributeError: 'org.web3d.x3d.sai.Grouping.<wbr>Transform' object has
      no attribute 'addChild'<br>
    </p>
    <br>
    <div class="m_3774458644941123831moz-cite-prefix">On 2017/08/11 21:50, John Carlson
      wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="auto">
        <div><br>
          <div class="gmail_extra"><br>
            <div class="gmail_quote">On Aug 11, 2017 8:13 AM, "Masaki
              Aono" <<a href="mailto:aono@tut.jp" target="_blank">aono@tut.jp</a>> wrote:<br type="attribution">
              <blockquote class="m_3774458644941123831quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                <div bgcolor="#FFFFFF" text="#000000"> </div>
              </blockquote>
            </div>
          </div>
        </div>
        <div dir="auto"><br>
        </div>
        <div dir="auto">I believe that pyjnius is not finding
          setCenterOfRotation on ViewpointObject.</div>
        <div dir="auto"><br>
        </div>
        <div dir="auto">John</div>
        <div dir="auto">
          <div class="gmail_extra">
            <div class="gmail_quote">
              <blockquote class="m_3774458644941123831quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                <div bgcolor="#FFFFFF" text="#000000">
                  <p><br>
                  </p>
                  <p> >>> Viewpoint28 =
                    ViewpointObject().setDEF("View<wbr>UpClose").setCenterOfRotation(<wbr>[0,-1,0]).setDescription("<wbr>Hello
                    world!").setPosition([0,-1,7])<br>
                    Traceback (most recent call last):<br>
                      File "<stdin>", line 1, in <module><br>
                    AttributeError: 'org.web3d.x3d.sai.Navigation.<wbr>X3DViewpointNode'
                    object has no attribute 'setCenterOfRotation'<br>
                  </p>
                  <p><br>
                  </p>
                  <p>At this point, I encountered the above error.</p>
                  <p>It looks like "setCenterOfRotation" may not be in
                    X3DViewpointNode (I may be wrong).</p>
                  <p>Please note that Python 3.6 (which is not Python
                    2.7) is not a problem here, I think.</p>
                  <p>Sincerely,  <br>
                    <br>
                    <br>
                    <br>
                  </p>
                  <br>
                  <div class="m_3774458644941123831m_-7894946465718207821moz-cite-prefix">On
                    2017/08/11 8:11, John Carlson wrote:<br>
                  </div>
                  <blockquote type="cite">
                    <div class="m_3774458644941123831m_-7894946465718207821WordSection1">
                      <p class="MsoNormal">Here is HelloWorld.py as
                        generated from my PythonSerializer.js.   Note
                        that I do not use chained calls.</p>
                      <p class="MsoNormal">This is because I was trying
                        to get pyjnius to work. If we had some way of
                        getting code like this running, it would be
                        great.  I could modify my PythonSerializer.js
                        and perhaps include the serializer in X3DJSAIL.</p>
                      <p class="MsoNormal"> </p>
                      <p class="MsoNormal">My JavaScript serializer does
                        not work in X3DJSAIL yet, and I have not been
                        working on it since my initial attempt.  I have
                        compatible, containable changes to the X3DJSAIL
                        stylesheet so that X3DJSAIL should be able to
                        generate JavaScript “SAI”/Nashorn application
                        code.</p>
                      <p class="MsoNormal"> </p>
                      <p class="MsoNormal">The problem appears to be
                        getting the JavaScript XML parsers integrated
                        with X3DJSAIL. We may be able to use JSON
                        instead: XML -> JSON -> DOM -> python. 
                        The long way around, instead of XML -> DOM
                        -> python.</p>
                      <p class="MsoNormal"> </p>
                      <p class="MsoNormal">Or we can just use my
                        serializer in JavaScript, and translate JSON
                        -> DOM -> python. The XML to JSON would be
                        handled by X3dToJson.xslt (X3DJSAIL).</p>
                      <p class="MsoNormal"> </p>
                      <p class="MsoNormal">I do have examples of Java
                        -> TypeScript and JavaScript, but they don’t
                        work.</p>
                      <p class="MsoNormal"> </p>
                      <p class="MsoNormal">I do not have a Java ->
                        Python translator.  Good luck finding one.</p>
                      <p class="MsoNormal"> </p>
                      <p class="MsoNormal">John</p>
                      <p class="MsoNormal"> </p>
                      <p class="MsoNormal">Sent from <a href="https://go.microsoft.com/fwlink/?LinkId=550986" target="_blank">Mail</a> for Windows 10</p>
                      <p class="MsoNormal"> </p>
                      <div style="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" target="_blank">Don Brutzman</a><br>
                          <b>Sent: </b>Thursday, August 10, 2017 5:31
                          PM<br>
                          <b>To: </b><a href="mailto:mwlee@suwon.ac.kr" target="_blank">Myeong Won Lee</a>; <a href="mailto:aono@tut.jp" target="_blank">Masaki
                            Aono</a>; <a href="mailto:roy.walmsley@ntlworld.com" target="_blank">Roy Walmsley</a>; <a href="mailto:yottzumm@gmail.com" target="_blank">John Carlson</a><br>
                          <b>Cc: </b><a href="mailto:x3d-public@web3d.org" target="_blank">X3D Graphics public mailing
                            list</a><br>
                          <b>Subject: </b>Scene Access Interface:
                          autogenerating Python</p>
                      </div>
                      <p class="MsoNormal"> </p>
                      <p class="MsoNormal">Myeong Won Lee and Masaki
                        Aono:</p>
                      <p class="MsoNormal"> </p>
                      <p class="MsoNormal">Thank you for meeting today
                        to discuss X3D Object Model transformation by
                        applying an XSLT stylesheet to autogenerate of
                        SAI codebases.</p>
                      <p class="MsoNormal"> </p>
                      <p class="MsoNormal">Myeong Won Lee, I also
                        thought that your Unity HAnim player is
                        wonderful.  I recommend that you include some
                        examples in the public release, they will
                        generate strong interest.  Having some public
                        examples while also allowing private examples
                        provides appealing choices and the best possible
                        support for your students.</p>
                      <p class="MsoNormal"> </p>
                      <p class="MsoNormal">Here is summary excerpted
                        from this week's Web3D meeting report.</p>
                      <p class="MsoNormal">==============================<wbr>==============================<wbr>====</p>
                      <p class="MsoNormal">3.            Object Model
                        for X3D (OM4X3D)</p>
                      <p class="MsoNormal">a.            The Object
                        Model for X3D (OM4X3D) is a full set of
                        object-oriented interfaces for all nodes, fields
                        and statements in the X3D Abstract
                        Specification.</p>
                      <p class="MsoNormal">b.            OM4X3D is
                        produced by decorating the X3D XML Schema with
                        carefully structured annotations that describe
                        the entire object-oriented nature of the X3D
                        scene graph. <a class="m_3774458644941123831m_-7894946465718207821moz-txt-link-freetext" href="http://www.web3d.org/specifications/OM4X3D/ObjectModelForX3dCreation.png" target="_blank">http://www.web3d.org/specifica<wbr>tions/OM4X3D/ObjectModelForX3d<wbr>Creation.png</a></p>
                      <p class="MsoNormal">c.             Instantiation:
                        Object Model for X3D definitions are explicitly
                        listed in X3DObjectModel 3.3.xml with
                        corresponding XML schema x3dObjectModel.xsd</p>
                      <p class="MsoNormal">d.            Ongoing
                        public/private dialog using the <a class="m_3774458644941123831m_-7894946465718207821moz-txt-link-abbreviated" href="mailto:x3d-public@web3D.org" target="_blank">x3d-public@web3D.org</a>
                        mailing list and presentation at Web3D 2017
                        Conference has been productive.
                        <a class="m_3774458644941123831m_-7894946465718207821moz-txt-link-freetext" href="http://www.web3d.org/specifications/OM4X3D/ObjectModelForX3dMasterClassWeb3dConference2017June7.pdf" target="_blank">http://www.web3d.org/specifica<wbr>tions/OM4X3D/ObjectModelForX3d<wbr>MasterClassWeb3dConference2017<wbr>June7.pdf</a></p>
                      <p class="MsoNormal">e.            Demonstration
                        of strict object model in X3D JSON Encoding,
                        which is 98% complete and undergoing extensive
                        review and testing, initial-draft specification
                        has been prepared.</p>
                      <p class="MsoNormal">f.             Initial
                        implementations are available in JavaScript,
                        Java, and C++.  Also planning to prepare
                        programming-language implementations for C, C#.</p>
                      <p class="MsoNormal">g.            Two new
                        versions for Python are started, with dialog
                        occurring to discern best practices.</p>
                      <p class="MsoNormal">h.            SAI no longer
                        just Script node in Browser object, includes
                        full application-oriented API.  This will lead
                        to some changes and generalizations in 19775-2
                        Abstract SAI specification.</p>
                      <p class="MsoNormal">i.              Multiple
                        emerging SAI specifications and implementations
                        are shown on updated  draft X3D Specifications
                        Relationships diagram (attached)</p>
                      <p class="MsoNormal">j.            
                        Implementation: X3D JSON Loader (X3DJSONLD) <a class="m_3774458644941123831m_-7894946465718207821moz-txt-link-freetext" href="https://github.com/coderextreme/X3DJSONLD" target="_blank">https://github.com/coderextrem<wbr>e/X3DJSONLD</a></p>
                      <p class="MsoNormal">k.            Implementation:
                        X3D Java Scene Access Interface Library
                        (X3DJSAIL)
                        <a class="m_3774458644941123831m_-7894946465718207821moz-txt-link-freetext" href="http://www.web3d.org/specifications/java/X3dJavaSceneAuthoringInterface.html" target="_blank">http://www.web3d.org/specifica<wbr>tions/java/X3dJavaSceneAuthori<wbr>ngInterface.html</a></p>
                      <p class="MsoNormal">l.              Under
                        consideration: integration into X3D Abstract
                        Specification 19775-1 to more thoroughly expand
                        on current abstract interface hierarchy.</p>
                      <p class="MsoNormal">m.           Emerging
                        capability: coherent X3D center, multiple
                        different programming languages that offer
                        common design patterns to programmers to create
                        identical scene graphs.</p>
                      <p class="MsoNormal">==============================<wbr>==============================<wbr>====</p>
                      <p class="MsoNormal"> </p>
                      <p class="MsoNormal">The essence of autogeneration
                        is that proper code patterns must first exist. 
                        Once we get a few classes with the design
                        patterns of interest, and generation of a few
                        classes, then creation of all classes follows in
                        a straightforward manner.</p>
                      <p class="MsoNormal"> </p>
                      <p class="MsoNormal">I recommend that the first
                        example we work with is HelloWorld.x3d into .c
                        .cpp .cs and .py source.</p>
                      <p class="MsoNormal">                <a class="m_3774458644941123831m_-7894946465718207821moz-txt-link-freetext" href="http://www.web3d.org/x3d/content/examples/HelloWorld.x3d" target="_blank">http://www.web3d.org/x3d/conte<wbr>nt/examples/HelloWorld.x3d</a></p>
                      <p class="MsoNormal">                <a class="m_3774458644941123831m_-7894946465718207821moz-txt-link-freetext" href="http://www.web3d.org/x3d/content/examples/HelloWorld.html" target="_blank">http://www.web3d.org/x3d/conte<wbr>nt/examples/HelloWorld.html</a></p>
                      <p class="MsoNormal"> </p>
                      <p class="MsoNormal">Regarding Python: John
                        Carlson has done intriguing work that
                        auto-translates Java source in X3DJSAIL to
                        Python.  This is interesting because it would
                        keep the codebases closely aligned, making it
                        easier to learn and debug.  Consistency is
                        easily maintained across X3D versions and X3D
                        bugfixes by re-running each distribution. 
                        Flexibility is also possible since each codebase
                        will include custom utility classes, methods and
                        examples.</p>
                      <p class="MsoNormal"> </p>
                      <p class="MsoNormal">Next steps for Python:
                        recommend that we</p>
                      <p class="MsoNormal">- Examine Masaki's work and
                        compare it with the pyjnius conversions.</p>
                      <p class="MsoNormal">- Autogenerate Python library
                        (X3DPSAIL perhaps?) to provide Python codebase
                        support.</p>
                      <p class="MsoNormal">- Iterate until we have a
                        good design pattern for HelloWorld and other
                        exemplars.</p>
                      <p class="MsoNormal">- Create an X3dToPython.xslt
                        stylesheet that can convert someModel.x3d to
                        someModel.py source.</p>
                      <p class="MsoNormal">- run that across all scenes
                        X3D Example Archives, detect and resolve errors,
                        publish builds.</p>
                      <p class="MsoNormal">- make T-shirts  8)</p>
                      <p class="MsoNormal"> </p>
                      <p class="MsoNormal">As with JavaScript and Java,
                        it is good to use the x3d-public list for this
                        work.  Also suitable for a weekly update reports
                        and monthly telcon item for X3D Working Group.</p>
                      <p class="MsoNormal"> </p>
                      <p class="MsoNormal">all the best, Don</p>
                      <p class="MsoNormal">-- </p>
                      <p class="MsoNormal">Don Brutzman  Naval
                        Postgraduate School, Code USW/Br       <a class="m_3774458644941123831m_-7894946465718207821moz-txt-link-abbreviated" href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a></p>
                      <p class="MsoNormal">Watkins 270,  MOVES
                        Institute, Monterey CA 93943-5000 USA   <a href="tel:%28831%29%20656-2149" value="+18316562149" target="_blank">+1.831.656.2149</a></p>
                      <p class="MsoNormal">X3D graphics, virtual worlds,
                        navy robotics <a class="m_3774458644941123831m_-7894946465718207821moz-txt-link-freetext" href="http://faculty.nps.edu/brutzman" target="_blank">http://faculty.nps.edu/brutzma<wbr>n</a></p>
                      <p class="MsoNormal"> </p>
                    </div>
                  </blockquote>
                  <br>
                  <pre class="m_3774458644941123831m_-7894946465718207821moz-signature" cols="72">-- 
******************************<wbr>************************
青野雅樹
豊橋技術科学大学 情報・知能工学系
知識データ工学・情報検索研究室
〒441-8580 豊橋市天伯町雲雀ヶ丘1-1
<a class="m_3774458644941123831m_-7894946465718207821moz-txt-link-freetext" href="TEL:%280532%29" target="_blank">TEL:(0532)</a> 44-6764
FAX:(0532) 44-6757

Masaki Aono
Professor
Knowledge Data Engineering Laboratory
Dept. of Computer Science and Engineering
Toyohashi University of Technology
1-1 Hibarigaoka, Tempaku-cho,
Toyohashi-shi, Aichi 441-8580 JAPAN
TEL: 81+532-44-6764
FAX:81+532-44-6757
email: <a class="m_3774458644941123831m_-7894946465718207821moz-txt-link-abbreviated" href="mailto:aono@tut.jp" target="_blank">aono@tut.jp</a>
******************************<wbr>************************ </pre>
  </div>

</blockquote></div>
</div></div></div>



</blockquote>
<pre class="m_3774458644941123831moz-signature" cols="72">-- 
******************************<wbr>************************
青野雅樹
豊橋技術科学大学 情報・知能工学系
知識データ工学・情報検索研究室
〒441-8580 豊橋市天伯町雲雀ヶ丘1-1
<a class="m_3774458644941123831moz-txt-link-freetext" href="TEL:(0532)" target="_blank">TEL:(0532)</a> 44-6764
FAX:(0532) 44-6757

Masaki Aono
Professor
Knowledge Data Engineering Laboratory
Dept. of Computer Science and Engineering
Toyohashi University of Technology
1-1 Hibarigaoka, Tempaku-cho,
Toyohashi-shi, Aichi 441-8580 JAPAN
TEL: 81+532-44-6764
FAX:81+532-44-6757
email: <a class="m_3774458644941123831moz-txt-link-abbreviated" href="mailto:aono@tut.jp" target="_blank">aono@tut.jp</a>
******************************<wbr>************************ </pre></div></blockquote></div></div>