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: 2
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 1427 times and has 1 reply Next Thread
adoberito
Newbie




Joined: May 4, 2022
Post Count: 1
Status: Offline
Reply to this Post  Reply with Quote 
Bug?: home plan doesn't update when plugin resizes furniture

I've encountered what seems to be a bug, where when I have a plugin modify the size of a HomePieceOfFurniture, it correctly updates everywhere except in the home plan view.

For example, if my plugin says:

HomePieceOfFurniture projector = // ...
projector.setDepth(1000);
home.addPieceOfFurniture(projector);


The projector seems very stretched in the home 3D view, but appears as its default dimensions in the home plan view.

If I then double-click it and go to the "Modify furniture" window, the correct (large) depth is visible. If I make some other change to the dimensions (for example changing the height), when I click "OK" the depth is now correct in the home plan view.

---

If this is a bug, I assume you'll fix it in a later version. I'm using a version provided by Debian, so it'll probably be a long time for a fix. Is there some workaround I can use in the meantime to force the home plan view to recalculate the dimensions?

Thanks!
[May 4, 2022, 12:46:34 AM] 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: Bug?: home plan doesn't update when plugin resizes furniture

The size used to display a piece of furniture in the plan is actually coming from the values returned by the methods getWidthInPlan and getDeprhInPlan which may return values different from getWidth and getDeprh if the piece is rotated around a horizontal axis.
As this size in the plan is automatically updated by the plan controller on any piece added to the edited home, you could simply call addPieceOfFurniture before setDepth. If you prefer not to change the order of these calls, you’ll have to call projector.setDepthInPlan(1000) after calling setDepth.

If possible, it would be nice to explain what you want to achieve smile
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[May 4, 2022, 8:35:58 AM] 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