[x3d-public] X3DJSAIL update: improved output when exporting ClassicVRML/VRML97 models

John Carlson yottzumm at gmail.com
Sat Jun 22 02:50:23 PDT 2024


Don is quite good! He fixed a bug before I could stumble around writing a
ticket for it!
We have different Java coding styles.  Diversity of test cases is good,
which is one reason why I maintain X3DJSONLD.  I'd still like to have a
discussion of how to break up huge HAnim Java programs and Pascal programs
into smaller pieces (yes, I know with VRML and X3D). My mind is percolating.

Now if I could only convince Michalis it's a good idea to add a fluent
interface to Castle in good order.  This bodes well for SAI in general, and
I've also suggested a fluent interface to the C++ SAI to Myeong, too (but
it's not so critical there, as I'm not creating any running programs, just
using C++ as a network protocol/DOM-like thing. No, I'm not sending
binaries over the network).

On Sat, Jun 22, 2024 at 3:29 AM Brutzman, Donald (Don) (CIV) via x3d-public
<x3d-public at web3d.org> wrote:

> Am happy to report an X3DJSAIL update: improved output when exporting
> ClassicVRML/VRML97 models.
>
>
>
>    - X3D Java Scene Access Interface Library (X3DJSAIL)
>    - X3D Java Scene Access Interface Library (X3DJSAIL) supports
>    programmers with standards-based X3D Java interfaces and objects, all as
>    open source.
>    - https://www.web3d.org/specifications/java/X3DJSAIL.html
>
>
>
> Motivating problem: excellent sleuthing and a well-stated issue report by
> John Carlson revealed a significant issue with the ClassicVRML export.
>
>
>
>    - X3DJSAIL: VRML head and Scene out of order
>    - https://sourceforge.net/p/x3d/tickets/27
>
>
>
> To improve quality assurance (QA) of ClassicVRML and VRML97 output by
> X3DJSAIL.  I applied command-line validation of the ClassicVRML .x3dv
> output using the *castle-model-converter* application by Michalis
> Kamburelis, all to good effect.  Troubleshooting led to fixes of the
> original reported problem and perhaps a dozen other errors also.  This
> validation is now part of the build scripts so that further regression
> testing is always produced as part of X3DJSAIL library development.
>
>
>
>    - Castle Model Converter (formerly tovrmlx3d)
>    - https://castle-engine.io/castle-model-converter
>
>
>
> Test program and output:
>
>
>
>    - HelloWorldProgram.java
>    - Description:  Example "smoke test" program to create a highly
>    detailed X3D model using the X3D Java Scene Access Interface Library
>    (X3DJSAIL).
>    -
>    https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/java/examples/HelloWorldProgram.java
>
>
>
>    - HelloWorldProgram output, ClassicVRML and VRML97
>    -
>    https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/java/examples/HelloWorldProgramOutput.x3dv
>    -
>    https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/java/examples/HelloWorldProgramOutput.wrl
>    - note that other outputs are also provided:  XML .x3d, pretty-print
>    .html, Java, Python.py, compressed .exi, X_ITE and X3DOM html, etc.
>
>
>
>    - Build test log is in version control to track improvements and avoid
>    backsliding:
>    -
>    https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/java/build.test.X3DJSAIL.txt
>    - Excerpt showing castle-model-converter validation:
>
>
>
> ClassicVRML validation: castle-model-converter.exe C:\x3d-code\
> www.web3d.org\x3d\stylesheets\java\examples/HelloWorldProgramOutput.x3dv
> --validate --enable-downloads
>
> castle-model-converter: Warning: X3D: Invalid X3D file: Invalid sequence
> in a string: "\n". Backslash must be followed by another backslash or
> double quote, for SFString and MFString (in X3D classic (VRML) encoding)
> and for MFString (in X3D XML encoding).
>
> castle-model-converter: Warning: VRML/X3D: Prototype "ArtDeco02"
> referenced by external prototype "ArtDeco02" doesn't have field
> "description"
>
> castle-model-converter: Warning: VRML/X3D: Inline node name "inlineScene"
> not found (or nothing was EXPORTed from it), cannot IMPORT
>
> castle-model-converter: Warning: X3D: Invalid X3D file: Invalid sequence
> in a string: "\n". Backslash must be followed by another backslash or
> double quote, for SFString and MFString (in X3D classic (VRML) encoding)
> and for MFString (in X3D XML encoding).
>
> castle-model-converter: Warning: X3D: Node "Anchor" is not allowed in the
> field "watchList" of the node "LoadSensor"
>
> castle-model-converter: Warning: X3D: Node "GeoMetadata" is not allowed in
> the field "watchList" of the node "LoadSensor"
>
> Exception "Exception":
>
> Validation failed (consult the warnings above), exiting with non-zero
> status
>
>
>
> Michalis was informed of the last two watchlist errors and reportedly has
> already fixed them.  Many of the other warnings are also fixable if the
> test program is improved to use actual file addresses instead of
> pseudo-urls.  Progress steadily continues…  the only “really bad errors”
> are the ones you don’t know about!
>
>
>
> Javadoc documentation for X3DJSAIL programmers:
>
>    - https://www.web3d.org/specifications/java/javadoc
>
>
>
> Over 4000 examples using X3DJSAIL, converted automatically from .x3d to
> .java in the X3D Example Models Archives:
>
>    - https://www.web3d.org/specifications/java/X3DJSAIL.html#Examples
>
>
>
> So X3DJSAIL is excellent for plain-old Java handling of X3D, and keeps
> getting better.  Again thanks to John and Michalis for their contributions
> to identify problems that are now fixed.
>
>
>
> Have fun with X3D Java!  😊
>
>
>
> 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
> https://faculty.nps.edu/brutzman
>
>
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20240622/0cf25730/attachment.html>


More information about the x3d-public mailing list