Print at Dec 18, 2025, 4:35:40 AM

Posted by Keet at Dec 5, 2022, 9:12:09 PM
Re: ROOF WINDOW / VELUX WINDOWS
If both export and import paid attention to the o line, I think the hinges would not change direction, as I don't believe mechanisms in one object can affect the mechanism in another. It is just the loss of objects and "crushing" of the objects down to a single one in the export/import that cause the misbehaviour.

followin the quote I posted earlier:
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.
If I read that correctly the direction is "from the largest dimension of the global bounding box of the hinge parts".

I suspect what happens is when you combine two hinges into a single piece of furniture the bounding box changes in size because now two hinges set the bounding box. I suspect this because just last week I had this happening with two vertical cylinders on top of each other, each as a hinge for their own half circle turn table. Individually they worked fine but after combining and changing one hinge from 1 to 2 they turned wrong and I had to move the sweethome3d_hinge_ designator to the next g group of each cylinder to correct the deformation. The only reason I can guess at is that by combining the total height made for a different "largest dimension of the global bounding box of the hinge parts".

I still have to experiment with defining hinges using sweethome3d_hinge_1_top and sweethome3d_hinge_1_bottom because from the thread explaining the hinges that should also work and will probably set the direction fixed between the two points.

I think you're on the right track with using the o line. If the bounding box used for the direction calculation limits itself to the actual o part bounding box (for a single hinge) there's far less of a chance that the drirection changes.
----------------------------------------
Dodecagon.nl
1300+ 3D models, manuals, and projects