[x3d-public] FW: Fixed problem with X3DPSAIL (again) - need translator updates for best improvements

John Carlson yottzumm at gmail.com
Wed May 8 15:06:38 PDT 2019


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.

I would rather hear you say it runs great than looks great.

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

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.

I believe I have all the sets but not the constructor on a single line.


Things should be checked in.   But I will probably double check soon.

On Wed, May 8, 2019 at 11:03 AM Brutzman, Donald (Don) (CIV) <
brutzman at nps.edu> wrote:

> John this looks great!  8)
>
> repeated apologies for being so intermittent.   am again clobbered on
> schedule - writing proposals under deadline.
>
> 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.
>
> this means that (.x3d -> conversion -> .py -> X3DPSAIL compile/run) must
> occur each time.
>
> thus testing effectiveness of changes in your translator(s) is much easier
> to run/debug/refine.
>
> 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.
>
> opinion: the terser we get, the clearer we get (and dare i say, more
> Pythonic too).  Duck typing, here we come!
>
> 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.
>
> will retry X3D Python again this weekend, or while traveling next week.
>
> thanks + aloha.
>
> v/r Don
>
>
> On 5/6/2019 2:56 PM, John Carlson wrote:
> > 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.
> >
> > Thanks,
> >
> > John
> >
> > import classpath
> >
> > from org.web3d.x3d.jsail.Core.X3DObject import X3DObject as X3D
> >
> > from org.web3d.x3d.jsail.fields.SFStringObject import SFStringObject as
> SFString
> >
> > from org.web3d.x3d.jsail.Core.headObject import headObject as head
> >
> > from org.web3d.x3d.jsail.Core.metaObject import metaObject as meta
> >
> > from org.web3d.x3d.jsail.Core.SceneObject import SceneObject as Scene
> >
> > from org.web3d.x3d.jsail.Grouping.GroupObject import GroupObject as Group
> >
> > from org.web3d.x3d.jsail.Navigation.ViewpointObject import
> ViewpointObject as Viewpoint
> >
> > from org.web3d.x3d.jsail.fields.SFVec3fObject import SFVec3fObject as
> SFVec3f
> >
> > from org.web3d.x3d.jsail.Grouping.TransformObject import TransformObject
> as Transform
> >
> > from org.web3d.x3d.jsail.fields.SFRotationObject import SFRotationObject
> as SFRotation
> >
> > from org.web3d.x3d.jsail.Shape.ShapeObject import ShapeObject as Shape
> >
> > from org.web3d.x3d.jsail.Geometry3D.SphereObject import SphereObject as
> Sphere
> >
> > from org.web3d.x3d.jsail.Shape.AppearanceObject import AppearanceObject
> as Appearance
> >
> > from org.web3d.x3d.jsail.Shape.MaterialObject import MaterialObject as
> Material
> >
> > from org.web3d.x3d.jsail.fields.SFColorObject import SFColorObject as
> SFColor
> >
> > from org.web3d.x3d.jsail.Texturing.ImageTextureObject import
> ImageTextureObject as ImageTexture
> >
> > from org.web3d.x3d.jsail.fields.MFStringObject import MFStringObject as
> MFString
> >
> > from org.web3d.x3d.jsail.Text.TextObject import TextObject as Text
> >
> > from org.web3d.x3d.jsail.Text.FontStyleObject import FontStyleObject as
> FontStyle
> >
> > X3D0 = X3D() \
> >
> >     .setProfile("Immersive") \
> >
> >     .setVersion("3.3") \
> >
> >     .setHead(head() \
> >
> >      .addMeta(meta() \
> >
> >       .setContent("HelloWorld.x3d") \
> >
> >       .setName("title") \
> >
> >      ) \
> >
> >      .addMeta(meta() \
> >
> >       .setContent("Simple X3D scene example: Hello World!") \
> >
> >       .setName("description") \
> >
> >      ) \
> >
> >      .addMeta(meta() \
> >
> >       .setContent("30 October 2000") \
> >
> >       .setName("created") \
> >
> >      ) \
> >
> >      .addMeta(meta() \
> >
> >       .setContent("28 July 2015") \
> >
> >       .setName("modified") \
> >
> >      ) \
> >
> >      .addMeta(meta() \
> >
> >       .setContent("Don Brutzman") \
> >
> >       .setName("creator") \
> >
> >      ) \
> >
> >      .addMeta(meta() \
> >
> >       .setContent("HelloWorld.tall.png") \
> >
> >       .setName("Image") \
> >
> >      ) \
> >
> >      .addMeta(meta() \
> >
> >       .setContent("http://en.wikipedia.org/wiki/Hello_world") \
> >
> >       .setName("reference") \
> >
> >      ) \
> >
> >      .addMeta(meta() \
> >
> >       .setContent("
> https://en.wikipedia.org/wiki/Hello#.22Hello.2C_World.22_computer_program")
> \
> >
> >       .setName("reference") \
> >
> >      ) \
> >
> >      .addMeta(meta() \
> >
> >       .setContent("https://en.wikipedia.org/wiki/\"Hello,_World!\"_program")
> \
> >
> >       .setName("reference") \
> >
> >      ) \
> >
> >      .addMeta(meta() \
> >
> >       .setContent("
> http://en.wikibooks.org/w/index.php?title=Computer_Programming/Hello_world")
> \
> >
> >       .setName("reference") \
> >
> >      ) \
> >
> >      .addMeta(meta() \
> >
> >       .setContent("http://www.HelloWorldExample.net") \
> >
> >       .setName("reference") \
> >
> >      ) \
> >
> >      .addMeta(meta() \
> >
> >       .setContent("http://www.web3D.org") \
> >
> >       .setName("reference") \
> >
> >      ) \
> >
> >      .addMeta(meta() \
> >
> >       .setContent("
> http://www.web3d.org/realtime-3d/news/internationalization-x3d") \
> >
> >       .setName("reference") \
> >
> >      ) \
> >
> >      .addMeta(meta() \
> >
> >       .setContent("
> http://www.web3d.org/x3d/content/examples/HelloWorld.x3d") \
> >
> >       .setName("reference") \
> >
> >      ) \
> >
> >      .addMeta(meta() \
> >
> >       .setContent("
> http://X3dGraphics.com/examples/X3dForAdvancedModeling/HelloWorldScenes")
> \
> >
> >       .setName("reference") \
> >
> >      ) \
> >
> >      .addMeta(meta() \
> >
> >       .setContent("
> http://X3dGraphics.com/examples/X3dForWebAuthors/Chapter01TechnicalOverview/HelloWorld.x3d")
> \
> >
> >       .setName("identifier") \
> >
> >      ) \
> >
> >      .addMeta(meta() \
> >
> >       .setContent("
> http://www.web3d.org/x3d/content/examples/license.html") \
> >
> >       .setName("license") \
> >
> >      ) \
> >
> >      .addMeta(meta() \
> >
> >       .setContent("X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit") \
> >
> >       .setName("generator") \
> >
> >      ) \
> >
> > # Alternate encodings: VRML97, X3D ClassicVRML Encoding, X3D Compressed
> Binary Encoding (CBE), X3DOM, JSON
> >
> >      .addMeta(meta() \
> >
> >       .setContent("HelloWorld.wrl") \
> >
> >       .setName("reference") \
> >
> >      ) \
> >
> >      .addMeta(meta() \
> >
> >       .setContent("HelloWorld.x3dv") \
> >
> >       .setName("reference") \
> >
> >      ) \
> >
> >      .addMeta(meta() \
> >
> >       .setContent("HelloWorld.x3db") \
> >
> >       .setName("reference") \
> >
> >      ) \
> >
> >      .addMeta(meta() \
> >
> >       .setContent("HelloWorld.xhtml") \
> >
> >       .setName("reference") \
> >
> >      ) \
> >
> >      .addMeta(meta() \
> >
> >       .setContent("HelloWorld.json") \
> >
> >       .setName("reference") \
> >
> >      ) \
> >
> >     ) \
> >
> >     .setScene(Scene() \
> >
> > # Example scene to illustrate X3D nodes and fields (XML elements and
> attributes)
> >
> >      .addChild(Group() \
> >
> >       .addChild(Viewpoint() \
> >
> >        .setDEF("ViewUpClose") \
> >
> >        .setCenterOfRotation([0,-1,0]) \
> >
> >        .setDescription("Hello world!") \
> >
> >        .setPosition([0,-1,7]) \
> >
> >       ) \
> >
> >       .addChild(Transform() \
> >
> >        .setRotation([0,1,0,3]) \
> >
> >        .addChild(Shape() \
> >
> >         .setGeometry(Sphere() \
> >
> >         ) \
> >
> >         .setAppearance(Appearance() \
> >
> >          .setMaterial(Material() \
> >
> >           .setDEF("MaterialLightBlue") \
> >
> >           .setDiffuseColor([0.1,0.5,1]) \
> >
> >          ) \
> >
> >          .setTexture(ImageTexture() \
> >
> >           .setDEF("ImageCloudlessEarth") \
> >
> >
> .setUrl(["earth-topo.png","earth-topo.jpg","earth-topo-small.gif","
> http://www.web3d.org/x3d/content/examples/Basic/earth-topo.png","
> http://www.web3d.org/x3d/content/examples/Basic/earth-topo.jpg","
> http://www.web3d.org/x3d/content/examples/Basic/earth-topo-small.gif"]) \
> >
> >          ) \
> >
> >         ) \
> >
> >        ) \
> >
> >       ) \
> >
> >       .addChild(Transform() \
> >
> >        .setTranslation([0,-2,0]) \
> >
> >        .addChild(Shape() \
> >
> >         .setGeometry(Text() \
> >
> >          .setDEF("TextMessage") \
> >
> >          .setString(["Hello","world!"]) \
> >
> >          .setFontStyle(FontStyle() \
> >
> >           .setJustify(["MIDDLE","MIDDLE"]) \
> >
> >          ) \
> >
> >         ) \
> >
> >         .setAppearance(Appearance() \
> >
> >          .setMaterial(Material() \
> >
> >           .setUSE("MaterialLightBlue") \
> >
> >          ) \
> >
> >         ) \
> >
> >        ) \
> >
> >       ) \
> >
> >      ) \
> >
> >     ) \
> >
> > X3D0.toFileX3D("HelloWorld_RoundTrip.x3d")
> >
>
>
> all the best, Don
> --
> Don Brutzman  Naval Postgraduate School, Code USW/Br
> brutzman at nps.edu
> Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
> X3D graphics, virtual worlds, navy robotics
> http://faculty.nps.edu/brutzman
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20190508/65828b17/attachment-0001.html>


More information about the x3d-public mailing list