Print at Dec 17, 2025, 4:15:18 AM

Posted by Keet at Feb 24, 2024, 1:10:18 PM
Re: Bug in Pan3Dview plugin with chained deformation
Yes, the rotation axe is computed on the highest dimension but in other words that means it looks for the longest distance between two points to use as the direction.
For hinges the position is also important since the rotation should use it as the center point for rotating. Rails don't have that problem, they can be far away from the parts that use the rail and the rail just prescribes the path for sliding. A ball has a similar situation as the hinge but the only important data point is the center for rotating around the point.

The main point is that when a hinge rotates it changes the direction for other hinges connected to it. Besides that, my test with the Scopia turn window proved that a start position of the furniture in a diagonal position is already enough to cause the deformation to go wrong. That one I can't explain because it shouldn't be a problem with just a single hinge.

The Sweet Home 3D dialog doesn't have this problem because it simply takes the object and displays it in the preview in it's default (horizontal) position. Your deformation in the 3Dview is much more difficult because you have to determine the changed angles of the hinges. On the other hand, in that dialog the code must recalculate for chained deformations using the hinge one up in the chain as the start point.

When you get to looking into this, try and log the original hinge directions and the directions as calculated from the 3Dview. Maybe that helps in finding the place to recalculate. It's a difficult problem which might have either a very difficult solution or an amazingly simple one.

As I said, no hurry to fix this. There are more important things that come first.
----------------------------------------
Dodecagon.nl
1300+ 3D models, manuals, and projects