The axis direction of the hinge x is guessed from the largest dimension of the global bounding box of the hinge parts. Thus, if the largest dimension of a hinge is its height, the axis will be vertical, if its largest dimension is its depth the axis will be horizontal in Y direction and if its largest dimension is its width the axis will be also horizontal but in X direction. Axes can only be parallel to X, Y or Z axes at the moment, but this looks largely enough.
This was from the 6.0 version but I suspect that this is still the case: Axes can only be parallel to X, Y or Z axes. That would explain why the movement of parts follow the original horizontal hinge position even if the hinge itself has rotated. This is probably the result of using the bounding box to determine the axis direction, not the line between two points furthest away from each other. This also explains the difference between the first model and the exported/imported model: the bounding box of the hinge has changed.
You can test/see that yourself: create a long thin box. The bounding box will be the same as the box itself. Now rotate the box and export/import it. The bounding box is now a large square with the rotated box inside it. Since the axis direction is determined using the bounding box it wil either remain as before or change in a 90° angle, depending on which side of the bounding box is the longest. Even my single line hinge will create a bounding box much larger than the line itself, depending on how much it is rotated, but the axis direction is still limited to the parallel to X,Y,Z direction of that bounding box, not the actual hinge line.
The solution to fix the bug seems "easy": to calculate the axis direction do not use the bounding box but the line between the two points of the hinge that are the furthest apart . This should eliminate the limitation of only having axis parallel to X, Y or Z.
The bounding box was probably choosen because it is a single form that is the same simple type for any object. Makes it easy to calculate a direction. If you use a stretched box as a hinge the longest distance is a diagonal line between two points on the opposite corners of the ends. That would be the wrong direction. No problem with a box 0.1x0.1 and very long, you will not notice the slight diagonal but in other situations you would rather have one of the long edges to act as the direction.
There is a solution to solve everything but it takes some work to implement and it breaks backward compatibility: special deformation objects for each deformation type: a hinge, a rail, a ball, etc. These are incredibly small, only one or two vertices: the hinge and rail a line between two vertices (like my single line hinge), the ball a single vertice, etc. You could drag them from the inventory and assign a sequence number. That would be the absolute perfect solution but all existing models with deformations would have to be updated using these new objects. I'm not sure if it is possible to retain the current system and still implement new deformation objects. With new deformation objects a lot of the current problems would be solved: remember the Velux window that suddenly changed the rotation angle when rotated in a sloping roof? It would also provide a better base for future enhancements: maybe this will allow a sketch-a-graph type of deformation, a deformation with a relation between multiple other deformation objects.
---------------------------------------- Dodecagon.nl 1000+ 3D models, manuals, and projects