Features

Download

Online

Gallery

Blog

  Index  | Recent Threads  | List Attachments  | Help  | 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: 14
Posts: 14   Pages: 2   [ 1 2 | Next Page ]
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 6082 times and has 13 replies Next Thread
youseeus
Newbie
Member's Avatar


Joined: Aug 31, 2012
Post Count: 9
Status: Offline
Reply to this Post  Reply with Quote 
love struck Thoughts about roof-plugin

Hi, I'm working with sh3d since more than 5 years. love struck
But I'm still unhappy with the way roofs are created. devilish

I'm a developer so I'm thinking about, how to improve it. But I don't know if I'll have the time to get it done all myself*) tongue.

  • roofs align with the shape of the outer walls
  • roofs have gabels and eaves (mostly aligned with the outer walls)
  • there are different shapes in between: roof documentation for OSM
So how to Build a roof:
atm: place several models to come as close to the original as possible.
My idea:

  • create a new level
  • Place the gabel (vertices and edges)
  • add properties like roof overhang, pitch and other (vertices and edges can have different properties each)
  • place pitched windows (models)
  • let the program calculate the roof
  • the program will

    • create a model for rendering
    • align the inner walls so no wall is sticking through the roof
what do you think about the idea? Have i forgotten a big blocker? confused

*)We are building a house rn, there isn't so much time left for programming
[May 12, 2018 5:52:40 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
hansmex
Advanced Member
Member's Avatar

Netherlands
Joined: Sep 26, 2009
Post Count: 3297
Status: Online
Reply to this Post  Reply with Quote 
Re: Thoughts about roof-plugin

Your description of an algorithm is just the start. The truth is quite a bit more complex. The OSM list describes many roof types, but hardly covers everything.

Take a look here : this kind of house with dormers, and many different roof sections is quite common in the US.

Trying to write a plug-in that could make such a roof wouldn't be easy.

H
[May 14, 2018 6:17:09 AM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 6636
Status: Offline
Reply to this Post  Reply with Quote 
Re: Thoughts about roof-plugin

Thanks for the roof document link, it gives a good idea of various roofs and their parameters. But to ensure you reach your goal, you should probably start with a few roof simple models.

I would suggest that you inspire yourself from ShapeGenerator plug-in source code (it's included in the plug-in), i.e. create roof shapes with Java 3D classes, then export those shapes at OBJ format with OBJWriter class, finally create a HomePieceOfFurniture instance and add it to the edited home.
If you need to keep some parameters for the computed roof to update it afterwards, feel free to set your own properties on the HomePieceOfFurniture instance.

As it's possible to rotate objects around an horizontal axis, you could also try to create a roof by assembling flat boxes and triangles, but I think this will be more complicated to program.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[May 14, 2018 11:08:03 AM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest    http://www.eteks.com [Link] Report threatening or abusive post: please login first  Go to top 
youseeus
Newbie
Member's Avatar


Joined: Aug 31, 2012
Post Count: 9
Status: Offline
Reply to this Post  Reply with Quote 
Re: Thoughts about roof-plugin

yes i know its just the description of the general idea. And you can't cover every roof type. But your link would be covered by my idea. The most complex thing i see is to get the align of the subroof right. But i wouldn't go for absolute perfection in the first Version. There are still the current ways.

thanks for the ShapeGenerator-hint smile
[May 18, 2018 6:51:51 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
youseeus
Newbie
Member's Avatar


Joined: Aug 31, 2012
Post Count: 9
Status: Offline
Reply to this Post  Reply with Quote 
Re: Thoughts about roof-plugin

Hi, I have a first draft for the roof designer at the bottom of this post.
You draw the gabel and enter your properties in the dialog.

Currently i just use a polyline and store all informations in the properties.
The next step is to generate a roof object from that informations.

I'm not really happy with the polyline approach. But I have no better idea how to draw and store the gabel at this moment.
My goal is that you can see the gabel in the plan.

What do you think?



[Jun 20, 2018 6:15:20 AM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
okh
Advanced Member




Joined: May 12, 2013
Post Count: 1556
Status: Offline
Reply to this Post  Reply with Quote 
Re: Thoughts about roof-plugin

Very interesting (even if I agree with the posts saying that it will be complicated in the real world)

Several years ago I briefly used some software or other (IMSI Floor plan, I think), with an automatic roof option. For a simple roof, on a simple plan, it worked beautifully. But was not much help when it came to a plan with more than two walls of equal height and two walls with a gable.

On the other hand, my guess is that a simple roof might still be useful. And to that effect, your approach with a clean interface looks very good.

So - yes - idea very interesting. Looking forward to trying anything you come up with.

ok
[Jun 20, 2018 8:43:29 AM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
youseeus
Newbie
Member's Avatar


Joined: Aug 31, 2012
Post Count: 9
Status: Offline
Reply to this Post  Reply with Quote 
Re: Thoughts about roof-plugin

do you mean something like this?:

[Jun 20, 2018 9:20:39 AM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 6636
Status: Offline
Reply to this Post  Reply with Quote 
Re: Thoughts about roof-plugin

It's great that you could start to program this plug-in.
The polyline is a nice way to get some coordinates by reusing existing features of Sweet Home 3D. I would suggest that you request to draw this line in a clone of the current home that will display only walls. You could display this clone in your dialog box with your own plan component / controller, using subclasses of PlanComponent and PlanController classes (VideoPanel class uses for example a subclass of PlanComponent). If you're interested by this, just ask for more details.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Jun 20, 2018 1:32:57 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest    http://www.eteks.com [Link] Report threatening or abusive post: please login first  Go to top 
ndorigatti
Member



Italia
Joined: May 12, 2017
Post Count: 48
Status: Offline
Reply to this Post  Reply with Quote 
Re: Thoughts about roof-plugin

This thread is very interesting and I'm following this! I would like to have the time to help, but I neither have the time to update my home unfortunately.

I currently created custom components for my roof, and i do have a dormer that "cuts" half of the roof to create space for a big door window.
I would also point out that usually (at least here where i live) roofs extends over the walls and covers also the outside!
[Jun 20, 2018 1:48:54 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
okh
Advanced Member




Joined: May 12, 2013
Post Count: 1556
Status: Offline
Reply to this Post  Reply with Quote 
Re: Thoughts about roof-plugin

do you mean something like this?
Not even that, where the other software failed was a little, rectangular cabin 22m² with a gabled roof. So far so good. However, my father had built a 9m² annexe on the long side with a roof angle different from the main construction. This I could never create with the automatic roof function in the other software.

Now even if I had to make the roof myself, the result was much better in SH3D.

My point being - that even a simple automated roof can be a great help. But I agree with hansmex and the others, that getting (even slightly) more complicated designs to work, may not be possible.

ok

P.S. Maybe hard to see, but to the left of the building the roof is slightly different. So with SH3D I could get the roof right.

(Sorry, this is an old image from an old thread .)
[Jun 20, 2018 5:14:09 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Posts: 14   Pages: 2   [ 1 2 | Next Page ]
[ 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-2019 eTeks - All rights reserved