Joined: Apr 16, 2014
Post Count: 22
Status:
Offline
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.
France
Joined: Nov 7, 2005
Post Count: 9420
Status:
Offline
Re: Open door bug. The Real Problem
Sorry, but "open door bug" as you call it has nothing to do with unit. See bug #154 for more information.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
Joined: Apr 16, 2014
Post Count: 22
Status:
Offline
Re: Open door bug. The Real Problem
Okay, perhaps I may be wrong about the units, nevertheless all my open doors are working with no distortion whatsoever. Here is a quick solution... Insert one open door on a wall with magnetism on. Insert one open door not attached to a wall. Export all to .obj. Measure the depth of both open doors in your favorite .obj editor Calculate the percentage difference between the depth of each. Subtract the difference in percentage from your depth property. You might have to tweak the value by a tenth or so.
Done, open doors are now compensated for with magnetism on. Mine all work. Sorry I referred to an obvious error in calculating geometry as a "bug."
Joined: Apr 16, 2014
Post Count: 22
Status:
Offline
Re: Open door bug. The Real Problem
Okay so on average the open door is roughly 60% larger applied to a wall when magnetism is on than the original model without magnetism. Interestingly enough the percentage decrease from 2.54 to 1 is roughly 60%. 2.54 Being the number of centimeters in an inch. That makes a units conversion error hugely suspect in my book.