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: 12
Posts: 12   Pages: 2   [ Previous Page | 1 2 ]
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 250299 times and has 11 replies Next Thread
Daniels118
Advanced Member
Member's Avatar

Italy
Joined: Nov 17, 2021
Post Count: 496
Status: Offline
Reply to this Post  Reply with Quote 
Re: Furniture to Solid

The "center" is a relative concept. SH3D calculates the center of a furniture as follows:
it iterates over all vertices and creates a bounding box; then it uses the midpoint of XZ boundaries along with the lowest Y. This value is then negated and used as a translation offset in the transform matrix. No value is modified in the vertex array.
When you move the furniture in the plan, an additional transform matrix is applied based on position, rotation and scale of the furniture in plan (the values which you see in the furniture properties window). Again, no value is modified in the vertex array; this happens in the rendering pipeline at each frame rendering.
When you export the selection to OBJ, a new vertex array is built with all transforms applied. I don't remember if a further step is made to center the resulting model within the boundaries, but if you need it you can do it yourself as described before: iterate to build the bounding box, calculate the center offset, the iterate again to apply the offset.
[Nov 26, 2025, 4:13:17 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
dorin
Advanced Member
Member's Avatar

Romania
Joined: Apr 24, 2014
Post Count: 752
Status: Offline
Reply to this Post  Reply with Quote 
Re: Furniture to Solid

Somehow, I managed to solve this part.
Of course, 99 new problems arose.
I have all the time in the world to solve them.
----------------------------------------
A computer program does what you tell it to do, not what you want it to do. Murphy's Law
When all else fails, read the instructions. Murphy's Law
If you don't like "AS IS", DIY. Dorin's law
[Dec 7, 2025, 7:22:55 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Posts: 12   Pages: 2   [ Previous Page | 1 2 ]
[ 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 2024 Space Mushrooms - All rights reserved