Download

Online

Gallery

Blog

  Index  | Recent Threads  | List Attachments  | Search
 Welcome Guest  |  Register  |  Login
Login Name  Password
 

Sweet Home 3D Forum



No member browsing this thread
Thread Status: Active
Total posts in this thread: 4
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 6055 times and has 3 replies Next Thread
Ferraro
Member




Joined: Apr 16, 2014
Post Count: 22
Status: Offline
Reply to this Post  Reply with Quote 
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.
[Apr 23, 2014, 7:13:59 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9141
Status: Offline
Reply to this Post  Reply with Quote 
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 developer
[Apr 25, 2014, 10:40:42 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Ferraro
Member




Joined: Apr 16, 2014
Post Count: 22
Status: Offline
Reply to this Post  Reply with Quote 
smile 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."

Good luck, hope this works for people.
[Apr 25, 2014, 4:13:26 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Ferraro
Member




Joined: Apr 16, 2014
Post Count: 22
Status: Offline
Reply to this Post  Reply with Quote 
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.
[Apr 25, 2014, 7:09:36 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
[ Jump to Last Post ]
Show Printable Version of Thread  Post new Thread

    Get Sweet Home 3D at SourceForge.net. Fast, secure and Free Open Source software downloads
   
© Copyright 2006-2024 eTeks - All rights reserved