Print at Dec 20, 2025, 1:50:19 PM

Posted by Ferraro at Apr 23, 2014, 7:13:59 PM
Open door bug. The Real Problem
I was developing an open door and discovered this bug. The current work-a-rounds are unsatisfactory since they involve either placing 2 objects, or turning-off magnetism. The source of the problem has to do with the units handling in Sweet Home. Sweet Home handles units in centimeters, and multiplies by 2.54 to size to inches. Some geometry attributes is stored in actual inches for dimension display on walls, while the other geometry is in centimeters (divided by 2.55 to display inches.) The reason the open door gets stretched when magnetism is turned on, is because of the code handling inches on the wall. To get a door to scale properly on a wall with magnetism turned on, you have to add the total depth of the door in inches to the wall thickness in cm. This will result in a squished looking door, however it will scale properly when used with magnetism.

For example, if you had a door .obj that had a depth of 30 inches, SH3D would multiply 30 x 2.54 to display the depth as 76.2 in your properties file. If you want that open door to display as 30 inches when magnetism is turned on , you would have to take 30 + your wall width in cm (in my case 4" wall so 4 x 2.54= 10.16). So if you set your depth property to 40.16, you will end up with a a squished door that sizes correctly when magnetism is used on the wall. This result worked for me with no issues other than having to have magnetism on. A simple multiplier in the code is either missing, or not working properly making one have to add a sum of inches to a sum of centimeters (door obj depth in inches + wall width in cm.)

Try with your own open door model and let me know the results.