<div><div dir="auto">So you can’t run the python file standalone with PYTHONPATH set?   1 was trying to show you than your suggested changes do not work.</div></div><div dir="auto"><br></div><div dir="auto">I would rather hear you say it runs great than looks great.</div><div dir="auto"><br></div><div dir="auto">I don’t want to check in code which breaks the build.  What would be the point of that?   Note: I’ve been able to use Ctrl break to stop the build</div><div dir="auto"><br></div><div dir="auto">I will try to send you a modified, but broken translator.   It’s quite annoying to try to send JavaScript through mail.   One has to convert to zip or txt.</div><div dir="auto"><br></div><div dir="auto">I believe I have all the sets but not the constructor on a single line.</div><div dir="auto"><br></div><div dir="auto"><br></div><div><div dir="auto">Things should be checked in.   But I will probably double check soon.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 8, 2019 at 11:03 AM Brutzman, Donald (Don) (CIV) <<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">John this looks great!  8)<br>
<br>
repeated apologies for being so intermittent.   am again clobbered on schedule - writing proposals under deadline.<br>
<br>
please be advised that for me, testing is difficult with end files like these because i don't have single-file checking implemented properly yet, and so must use the build chains in Ant.<br>
<br>
this means that (.x3d -> conversion -> .py -> X3DPSAIL compile/run) must occur each time.<br>
<br>
thus testing effectiveness of changes in your translator(s) is much easier to run/debug/refine.<br>
<br>
also, either you or i can relax some of the line breaking; please put each node's field initialization on one long line, similar to the Java syntax.  this significantly helps human recognition and cross-language comparison.<br>
<br>
opinion: the terser we get, the clearer we get (and dare i say, more Pythonic too).  Duck typing, here we come!<br>
<br>
recommendation: please check in changes to your translator(s) in pyjnius directory. alternatively just send email updates for those translation programs, and i will overwrite/diff/merge/refine/test/confirm.<br>
<br>
will retry X3D Python again this weekend, or while traveling next week.<br>
<br>
thanks + aloha.<br>
<br>
v/r Don<br>
<br>
<br>
On 5/6/2019 2:56 PM, John Carlson wrote:<br>
> Here is a program (again) without wrappers. Don, can you run this on your system, and report either success or figure out how to fix it.<br>
> <br>
> Thanks,<br>
> <br>
> John<br>
> <br>
> import classpath<br>
> <br>
> from org.web3d.x3d.jsail.Core.X3DObject import X3DObject as X3D<br>
> <br>
> from org.web3d.x3d.jsail.fields.SFStringObject import SFStringObject as SFString<br>
> <br>
> from org.web3d.x3d.jsail.Core.headObject import headObject as head<br>
> <br>
> from org.web3d.x3d.jsail.Core.metaObject import metaObject as meta<br>
> <br>
> from org.web3d.x3d.jsail.Core.SceneObject import SceneObject as Scene<br>
> <br>
> from org.web3d.x3d.jsail.Grouping.GroupObject import GroupObject as Group<br>
> <br>
> from org.web3d.x3d.jsail.Navigation.ViewpointObject import ViewpointObject as Viewpoint<br>
> <br>
> from org.web3d.x3d.jsail.fields.SFVec3fObject import SFVec3fObject as SFVec3f<br>
> <br>
> from org.web3d.x3d.jsail.Grouping.TransformObject import TransformObject as Transform<br>
> <br>
> from org.web3d.x3d.jsail.fields.SFRotationObject import SFRotationObject as SFRotation<br>
> <br>
> from org.web3d.x3d.jsail.Shape.ShapeObject import ShapeObject as Shape<br>
> <br>
> from org.web3d.x3d.jsail.Geometry3D.SphereObject import SphereObject as Sphere<br>
> <br>
> from org.web3d.x3d.jsail.Shape.AppearanceObject import AppearanceObject as Appearance<br>
> <br>
> from org.web3d.x3d.jsail.Shape.MaterialObject import MaterialObject as Material<br>
> <br>
> from org.web3d.x3d.jsail.fields.SFColorObject import SFColorObject as SFColor<br>
> <br>
> from org.web3d.x3d.jsail.Texturing.ImageTextureObject import ImageTextureObject as ImageTexture<br>
> <br>
> from org.web3d.x3d.jsail.fields.MFStringObject import MFStringObject as MFString<br>
> <br>
> from org.web3d.x3d.jsail.Text.TextObject import TextObject as Text<br>
> <br>
> from org.web3d.x3d.jsail.Text.FontStyleObject import FontStyleObject as FontStyle<br>
> <br>
> X3D0 = X3D() \<br>
> <br>
>     .setProfile("Immersive") \<br>
> <br>
>     .setVersion("3.3") \<br>
> <br>
>     .setHead(head() \<br>
> <br>
>      .addMeta(meta() \<br>
> <br>
>       .setContent("HelloWorld.x3d") \<br>
> <br>
>       .setName("title") \<br>
> <br>
>      ) \<br>
> <br>
>      .addMeta(meta() \<br>
> <br>
>       .setContent("Simple X3D scene example: Hello World!") \<br>
> <br>
>       .setName("description") \<br>
> <br>
>      ) \<br>
> <br>
>      .addMeta(meta() \<br>
> <br>
>       .setContent("30 October 2000") \<br>
> <br>
>       .setName("created") \<br>
> <br>
>      ) \<br>
> <br>
>      .addMeta(meta() \<br>
> <br>
>       .setContent("28 July 2015") \<br>
> <br>
>       .setName("modified") \<br>
> <br>
>      ) \<br>
> <br>
>      .addMeta(meta() \<br>
> <br>
>       .setContent("Don Brutzman") \<br>
> <br>
>       .setName("creator") \<br>
> <br>
>      ) \<br>
> <br>
>      .addMeta(meta() \<br>
> <br>
>       .setContent("HelloWorld.tall.png") \<br>
> <br>
>       .setName("Image") \<br>
> <br>
>      ) \<br>
> <br>
>      .addMeta(meta() \<br>
> <br>
>       .setContent("<a href="http://en.wikipedia.org/wiki/Hello_world" rel="noreferrer" target="_blank">http://en.wikipedia.org/wiki/Hello_world</a>") \<br>
> <br>
>       .setName("reference") \<br>
> <br>
>      ) \<br>
> <br>
>      .addMeta(meta() \<br>
> <br>
>       .setContent("<a href="https://en.wikipedia.org/wiki/Hello#.22Hello.2C_World.22_computer_program" rel="noreferrer" target="_blank">https://en.wikipedia.org/wiki/Hello#.22Hello.2C_World.22_computer_program</a>") \<br>
> <br>
>       .setName("reference") \<br>
> <br>
>      ) \<br>
> <br>
>      .addMeta(meta() \<br>
> <br>
>       .setContent("<a href="https://en.wikipedia.org/wiki/%5C" rel="noreferrer" target="_blank">https://en.wikipedia.org/wiki/\</a>"Hello,_World!\"_program") \<br>
> <br>
>       .setName("reference") \<br>
> <br>
>      ) \<br>
> <br>
>      .addMeta(meta() \<br>
> <br>
>       .setContent("<a href="http://en.wikibooks.org/w/index.php?title=Computer_Programming/Hello_world" rel="noreferrer" target="_blank">http://en.wikibooks.org/w/index.php?title=Computer_Programming/Hello_world</a>") \<br>
> <br>
>       .setName("reference") \<br>
> <br>
>      ) \<br>
> <br>
>      .addMeta(meta() \<br>
> <br>
>       .setContent("<a href="http://www.HelloWorldExample.net" rel="noreferrer" target="_blank">http://www.HelloWorldExample.net</a>") \<br>
> <br>
>       .setName("reference") \<br>
> <br>
>      ) \<br>
> <br>
>      .addMeta(meta() \<br>
> <br>
>       .setContent("<a href="http://www.web3D.org" rel="noreferrer" target="_blank">http://www.web3D.org</a>") \<br>
> <br>
>       .setName("reference") \<br>
> <br>
>      ) \<br>
> <br>
>      .addMeta(meta() \<br>
> <br>
>       .setContent("<a href="http://www.web3d.org/realtime-3d/news/internationalization-x3d" rel="noreferrer" target="_blank">http://www.web3d.org/realtime-3d/news/internationalization-x3d</a>") \<br>
> <br>
>       .setName("reference") \<br>
> <br>
>      ) \<br>
> <br>
>      .addMeta(meta() \<br>
> <br>
>       .setContent("<a href="http://www.web3d.org/x3d/content/examples/HelloWorld.x3d" rel="noreferrer" target="_blank">http://www.web3d.org/x3d/content/examples/HelloWorld.x3d</a>") \<br>
> <br>
>       .setName("reference") \<br>
> <br>
>      ) \<br>
> <br>
>      .addMeta(meta() \<br>
> <br>
>       .setContent("<a href="http://X3dGraphics.com/examples/X3dForAdvancedModeling/HelloWorldScenes" rel="noreferrer" target="_blank">http://X3dGraphics.com/examples/X3dForAdvancedModeling/HelloWorldScenes</a>") \<br>
> <br>
>       .setName("reference") \<br>
> <br>
>      ) \<br>
> <br>
>      .addMeta(meta() \<br>
> <br>
>       .setContent("<a href="http://X3dGraphics.com/examples/X3dForWebAuthors/Chapter01TechnicalOverview/HelloWorld.x3d" rel="noreferrer" target="_blank">http://X3dGraphics.com/examples/X3dForWebAuthors/Chapter01TechnicalOverview/HelloWorld.x3d</a>") \<br>
> <br>
>       .setName("identifier") \<br>
> <br>
>      ) \<br>
> <br>
>      .addMeta(meta() \<br>
> <br>
>       .setContent("<a href="http://www.web3d.org/x3d/content/examples/license.html" rel="noreferrer" target="_blank">http://www.web3d.org/x3d/content/examples/license.html</a>") \<br>
> <br>
>       .setName("license") \<br>
> <br>
>      ) \<br>
> <br>
>      .addMeta(meta() \<br>
> <br>
>       .setContent("X3D-Edit 3.3, <a href="https://savage.nps.edu/X3D-Edit" rel="noreferrer" target="_blank">https://savage.nps.edu/X3D-Edit</a>") \<br>
> <br>
>       .setName("generator") \<br>
> <br>
>      ) \<br>
> <br>
> # Alternate encodings: VRML97, X3D ClassicVRML Encoding, X3D Compressed Binary Encoding (CBE), X3DOM, JSON<br>
> <br>
>      .addMeta(meta() \<br>
> <br>
>       .setContent("HelloWorld.wrl") \<br>
> <br>
>       .setName("reference") \<br>
> <br>
>      ) \<br>
> <br>
>      .addMeta(meta() \<br>
> <br>
>       .setContent("HelloWorld.x3dv") \<br>
> <br>
>       .setName("reference") \<br>
> <br>
>      ) \<br>
> <br>
>      .addMeta(meta() \<br>
> <br>
>       .setContent("HelloWorld.x3db") \<br>
> <br>
>       .setName("reference") \<br>
> <br>
>      ) \<br>
> <br>
>      .addMeta(meta() \<br>
> <br>
>       .setContent("HelloWorld.xhtml") \<br>
> <br>
>       .setName("reference") \<br>
> <br>
>      ) \<br>
> <br>
>      .addMeta(meta() \<br>
> <br>
>       .setContent("HelloWorld.json") \<br>
> <br>
>       .setName("reference") \<br>
> <br>
>      ) \<br>
> <br>
>     ) \<br>
> <br>
>     .setScene(Scene() \<br>
> <br>
> # Example scene to illustrate X3D nodes and fields (XML elements and attributes)<br>
> <br>
>      .addChild(Group() \<br>
> <br>
>       .addChild(Viewpoint() \<br>
> <br>
>        .setDEF("ViewUpClose") \<br>
> <br>
>        .setCenterOfRotation([0,-1,0]) \<br>
> <br>
>        .setDescription("Hello world!") \<br>
> <br>
>        .setPosition([0,-1,7]) \<br>
> <br>
>       ) \<br>
> <br>
>       .addChild(Transform() \<br>
> <br>
>        .setRotation([0,1,0,3]) \<br>
> <br>
>        .addChild(Shape() \<br>
> <br>
>         .setGeometry(Sphere() \<br>
> <br>
>         ) \<br>
> <br>
>         .setAppearance(Appearance() \<br>
> <br>
>          .setMaterial(Material() \<br>
> <br>
>           .setDEF("MaterialLightBlue") \<br>
> <br>
>           .setDiffuseColor([0.1,0.5,1]) \<br>
> <br>
>          ) \<br>
> <br>
>          .setTexture(ImageTexture() \<br>
> <br>
>           .setDEF("ImageCloudlessEarth") \<br>
> <br>
>           .setUrl(["earth-topo.png","earth-topo.jpg","earth-topo-small.gif","<a href="http://www.web3d.org/x3d/content/examples/Basic/earth-topo.png" rel="noreferrer" target="_blank">http://www.web3d.org/x3d/content/examples/Basic/earth-topo.png</a>","<a href="http://www.web3d.org/x3d/content/examples/Basic/earth-topo.jpg" rel="noreferrer" target="_blank">http://www.web3d.org/x3d/content/examples/Basic/earth-topo.jpg</a>","<a href="http://www.web3d.org/x3d/content/examples/Basic/earth-topo-small.gif" rel="noreferrer" target="_blank">http://www.web3d.org/x3d/content/examples/Basic/earth-topo-small.gif</a>"]) \<br>
> <br>
>          ) \<br>
> <br>
>         ) \<br>
> <br>
>        ) \<br>
> <br>
>       ) \<br>
> <br>
>       .addChild(Transform() \<br>
> <br>
>        .setTranslation([0,-2,0]) \<br>
> <br>
>        .addChild(Shape() \<br>
> <br>
>         .setGeometry(Text() \<br>
> <br>
>          .setDEF("TextMessage") \<br>
> <br>
>          .setString(["Hello","world!"]) \<br>
> <br>
>          .setFontStyle(FontStyle() \<br>
> <br>
>           .setJustify(["MIDDLE","MIDDLE"]) \<br>
> <br>
>          ) \<br>
> <br>
>         ) \<br>
> <br>
>         .setAppearance(Appearance() \<br>
> <br>
>          .setMaterial(Material() \<br>
> <br>
>           .setUSE("MaterialLightBlue") \<br>
> <br>
>          ) \<br>
> <br>
>         ) \<br>
> <br>
>        ) \<br>
> <br>
>       ) \<br>
> <br>
>      ) \<br>
> <br>
>     ) \<br>
> <br>
> X3D0.toFileX3D("HelloWorld_RoundTrip.x3d")<br>
> <br>
<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>
</blockquote></div></div>