Let’s start over once more, because I think there is some confusion (we need a blackboard! )
Note: the STL standard does not say anything about the “world” frame of reference. It only specifies the ordering of the vertices to define the unit normal vector to the facet ( STL (file format) - Wikipedia ) So, any frame defined by an orthonormal basis and is right-handed works, in principle.
There is no concept of a specific coordinate being “up” in the file format, as long as the frame of reference used to define normals is right-handed. Consequently, swapping coordinates seems unexpected.
Now let’s take a look at what babylon.js does with the STL file I attached above.
That file has a bounding box as follows, extracted parsing the STL:
-439 <= x <= 445
-868 <= y <= 1532
-311 <= z <= 683
Let’s see what babylon.js does.
Default settings: left-handed system
The STL loader, swaps y and z, so we get:
-439 <= x <= 445
-311 <= y <= 683
-868 <= z <= 1532
Now, as a user, I read this and try to apply it to the STL file externally to babylon.js, and find out it is incorrect.
Modified settings: right-handed system
Let’s repeat the experiment done above with the setting
scene.useRightHandedSystem = true;
The bounding box found by babylon.js is now:
-439 <= x <= 445
-311 <= y <= 683
-868 <= z <= 1532
the same as in the left-handed system, again unexpected
So to the very least, if you continue swapping coordinates, at least the frame of reference should be consistent: if a left-handed system is used, z needs to be changed in sign (the clean way to switch from z-up right-handed to y-up left-handed is a rotation of 90 around x followed by negating z).
On top of that, to me, aside from agreeing on what coordinate is up and down (it does not matter), the concern is that if I import a file, I expect to read coordinates that are consistent with the file I import because I may need to use those outside of the viewer. This has really nothing to do with the convention used for the frame of reference, which is an arbitrary choice, not specified in the input STL, but with the consistency between what information is provided (STL) and what is done by the code.
The same applies to OBJ: they specify handedness, not “up” direction ( Wavefront .obj file - Wikipedia ).