VRMLLoader: fails to load wrl files of crystal models

I’m a university teacher teaching Crystallography. I have built a lot of crystal models in .wrl format exported from WinXmorph and Krystalshaper, two software of crystal morphology drawing. These files can be opened correctly by many PC software.

Recently, I tried to share these models on web, so that my students could view them through the browser whatever using PC, Phone or Pad.
These .wrl files are much simpler than house.wrl, however, cannot be loaded by VRMLLoader.

I will be very appreciated if you can help me to solve the problem. It’s very significant for me and my students.

Attachment is several entire files for testing.

Look forward to your reply.

models for testing.zip

Author: Fantashit

3 thoughts on “VRMLLoader: fails to load wrl files of crystal models

  1. I’ve tested one of your VRML files (Cube.wrl) today and found a couple of issue in VRMLLoader:

    • the loader can’t handle definitions of ROUTE so far (this produces a runtime error)
    • the loader is not able to process IndexedLineSet
    • the loader is not able to parse malformed VRML files. E.g. the current regular expressions are not able to parses lines like: Transform{rotation 1 0 0 0.0 children[. The loaders thinks it’s an invalid quaternion format because it interprets this line as 1, 0, 0, 0, children. The expected value would be 1, 0, 0, 0.

    Solving all these issues is actually quite a lot of work^^

  2. Also, Transform{rotation 1 0 0 0.0 children[ isn’t malformed, it’s valid VRML because commas between numbers are optional.

Comments are closed.