<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>Don,</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>We should work on a conda installation instead of pip I think for python.</p><p class=MsoNormal>In otherwords, we may just have a renderer for python following the below instructions(untested).</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Can some send me a scene written in X3D XML (one file for now) that they’d like to see converted to Python and the web?   It should be X3DOM compatible since that’s what I’m going to show on the web.  No scripts please.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I will return the conversion to you for your own experimentation.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Don, we should probably just have 1 file for X3DPSAIL, and then have a single symbol, say</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>import x3dpysail</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>then use x3dpysail.X3D, x3dpsail.Transform, etc.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I believe that’s per Loren.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Thanks!</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:yottzumm@gmail.com">John Carlson</a><br><b>Sent: </b>Tuesday, May 14, 2019 1:32 PM<br><b>To: </b><a href="mailto:x3d-public@web3d.org">X3D Graphics public mailing list</a>; <a href="mailto:holger.seelig@yahoo.de">Holger Seelig</a>; <a href="mailto:x3d@web3d.org">X3D Graphics member mailing list</a>; <a href="mailto:brutzman@nps.edu">Don Brutzman</a>; <a href="mailto:lepeitso@nps.edu">lepeitso@nps.edu</a>; <a href="mailto:aono@tut.jp">aono@tut.jp</a><br><b>Subject: </b>Jupyter Lab + beta-X3DPSAIL Testers, help! with X3DOM wanted (poorman's Python port of X3DJSAIL to python)</p></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Install anaconda<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Use this command to install pyjnius into Jupyter lab.  Don’t forget your virtual environment:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>conda install -c conda-forge pyjnius<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Then launch anaconda navigator from start menu, then launch jupyter lab, and type in some python below<o:p></o:p></p><p class=MsoNormal>=========================================================================================<o:p></o:p></p><p class=MsoNormal>import jnius_config<o:p></o:p></p><p class=MsoNormal># specify path to jar.   Set Java CLASSPATH<o:p></o:p></p><p class=MsoNormal>jnius_config.set_classpath('.', 'c:/x3d-code/www.web3d.org/x3d/stylesheets/java/jars/X3DJSAIL.3.3.full.jar')<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal># put the fully qualified Java class inside the quotes<o:p></o:p></p><p class=MsoNormal>from jnius import autoclass<o:p></o:p></p><p class=MsoNormal>Shape = autoclass('org.web3d.x3d.jsail.Shape.ShapeObject')<o:p></o:p></p><p class=MsoNormal>Transform = autoclass('org.web3d.x3d.jsail.Grouping.TransformObject')<o:p></o:p></p><p class=MsoNormal>IS = autoclass('org.web3d.x3d.jsail.Core.ISObject')<o:p></o:p></p><p class=MsoNormal>X3D = autoclass('org.web3d.x3d.jsail.Core.X3DObject')<o:p></o:p></p><p class=MsoNormal># declare the rest of the X3DJSAIL classes you are going to load into python using autoclass<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal># Type your Python code involving Shape, Transform and IS here—basically using X3DJSAIL-like API in python<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal># generate XML from X3DObject instance Using X3DJSAIL into a variable.<o:p></o:p></p><p class=MsoNormal>xml = X3D().setProfile("Immersive").setVersion("3.3").toStringX3D(2)<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>#  Then some tell me best way to get the xml scenegraph into a web page in Jupyter.  Do something like:<o:p></o:p></p><p class=MsoNormal><a href="https://stackoverflow.com/questions/25698448/how-to-embed-html-into-ipython-output">https://stackoverflow.com/questions/25698448/how-to-embed-html-into-ipython-output</a><o:p></o:p></p><div style='border:none;border-bottom:double windowtext 2.25pt;padding:0in 0in 1.0pt 0in'><p class=MsoNormal><br># Note that the released/approved X3DPSAIL might be different<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal># It might be a bumpy ride! If all else falls, don’t chain sets and adds in a single expression.<o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Have fun with Python and beta-X3DPSAIL!   Would love to see some exported HTML or PDF!   Want to give it a whirl, Andreas? Holger?<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>It’s kind of a let down that all we did was provided a small layer on top of X3DJSAIL.  I’d really like it well tested in the browser.  I haven’t tested it much inside Jupyter, just got really excited this morning when I saw some expressions working, so I thought I’d share.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><a href="http://www.web3d.org/specifications/java/X3DJSAIL.html">http://www.web3d.org/specifications/java/X3DJSAIL.html</a><o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>