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

Italy
Joined: Nov 17, 2021
Post Count: 493
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 
Posts: 11   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