|
Sweet Home 3D Forum » List all forums » » Forum: Developers » » » Thread: Thoughts about roof-plugin |
|
| Print at Dec 18, 2025, 9:17:20 PM | |
| Posted by youseeus at May 12, 2018, 5:52:40 PM |
Thoughts about roof-pluginHi, I'm working with sh3d since more than 5 years. But I'm still unhappy with the way roofs are created. 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*) .
atm: place several models to come as close to the original as possible. My idea:
*)We are building a house rn, there isn't so much time left for programming |
| Posted by hansmex at May 14, 2018, 6:17:09 AM |
|
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 ---------------------------------------- Hans new website - under constuction hansdirkse.info |
| Posted by Puybaret at May 14, 2018, 11:08:03 AM |
|
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 creator |
| Posted by youseeus at May 18, 2018, 6:51:51 PM |
|
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 ![]() |
| Posted by youseeus at Jun 20, 2018, 6:15:20 AM |
|
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? ![]() |
| Posted by okh at Jun 20, 2018, 8:43:29 AM |
|
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 |
| Posted by youseeus at Jun 20, 2018, 9:20:39 AM |
|
Re: Thoughts about roof-plugin do you mean something like this?: ![]() |
| Posted by Puybaret at Jun 20, 2018, 1:32:57 PM |
|
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 creator |
| Posted by ndorigatti at Jun 20, 2018, 1:48:54 PM |
|
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! |
| Posted by okh at Jun 20, 2018, 5:14:09 PM |
|
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 .) |
| Posted by youseeus at Jun 20, 2018, 5:23:50 PM |
|
Re: Thoughts about roof-plugin 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). Thanks for the suggestion :) I think this approach could be used in a future version. One of my main goals is, to store the roof-model (the gabels and the properties, so you can recalculate the roof after adding some jutty) so it would 'survive' to be opened and saved again by a blank SH3D (no plugins). i didn't get familiar with the saving process so i'll follow the first approach for my MVP. 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. This dormer has a gabel. So just add the gabel.To join Roofs is one of my main goals... so 'checked' I would also point out that usually (at least here where i live) roofs extends over the walls and covers also the outside! i called this feature overhang. It will be part of the MVP |
| Posted by youseeus at Jun 20, 2018, 5:48:58 PM |
|
Re: Thoughts about roof-plugin If someone want to get involved... i created a private repro at bitbucket, but i can add everyone who is interested. If the first version is finished i'll open that repro. |
| Posted by youseeus at Jun 21, 2018, 8:45:07 AM |
|
Re: Thoughts about roof-plugin i confused gable with ridge in all of my posts ![]() |
| Posted by clentl at Mar 6, 2019, 2:14:47 AM |
|
Re: Thoughts about roof-plugin This is great idea . I used to design pools using pool studio and it had great auto roof maker. I'm really confused by this program doesn't have it. I think even the sims 1 had an auto roof...I hope you get this finished! |
| Posted by Gildaniel at Apr 1, 2020, 7:47:25 PM |
|
Re: Thoughts about roof-plugin Hello! Some ideas about roofing: 1. Draw roof on plane view point by point by polyline, then feature create projection of it on needed angle with specified roof tickness 2. I'm not sure if this logic easy to implement to SH or not, but roof could be created with frontal sloping walls. Big bonus of this - standard windows could be used as roof window. Now if i need roof with windows - I create wall (adjust ens heights if needed), put window there, copy as a furniture, paste and adjust needed angle. But I need to do it many times, because very hard to find good heights and lenght after angled. So, use case: draw wall, adjust up and lower heights and set needed andgle. After I can adjust heights and dimensions in parameters 2. Is it possible to make "adjustable box", tuning it like posing of mannequin? |
| Posted by JustRosy at Sep 16, 2020, 6:45:17 PM |
|
Re: Thoughts about roof-plugin If the interior walls are 4" thick and the exterior walls are 6" thick (this is standard in Architectural Drafting), then couldn't the algorithm just automatically snap the edges of a roof to the endpoints of the 6" thick exterior walls, and be set to draw center-lines either vertically or horizontally, so they connect with the longest center line perpendicularly or at an angle selected by the user when right clicking on them? |
| Posted by Xlance at Nov 28, 2020, 8:28:02 PM |
|
Re: Thoughts about roof-plugin Hello All If someone has programming experience and still interested in creating a plugin for Roofs, I have 40 sample images + 40 different palettes to import into "Eclipse" to create Java dialogues with details / dimensions of each Roof Type. Cheers 01_A-Frame-Roof-Dim.png 02_Bonnet-Roof-Dim.png 03_Butterfly-Roof-Dim.png 04_Gable-and-Valley-Roof-Dim.png 05_Flat-Roof-Dim.png 06_Gable-Roof-with-Dormer-Window-Dim.png 07_Gambrel-Roof-Dim.png 08_Hip-and-Valley-Roof-Dim.png 09_Hip-Roof-Dim.png 10_Pyramid-Mansard-Roof-Dim.png 11_Mansard-Roof-that-Flares-Out-Dim.png 12_Mansard-Roof-Design-Dim.png 13_Pyramid-Hip-Roof-Dim.png 14_Saltbox-Roof-Dim.png 15_Shed-Roof-or-Sloped-Roof-Dim.png 16_Box-Gable-Roof-Dim.png 17_Clerestory-Roof-Dim.png 18_Combination-Roof-Dim.png 19_Cross-Gabled-Roof-Dim.png 20_Cross-Hipped-Roof-Dim.png 21_Curved-Roof-Dim.png 22_Dome-Roof-Dim.png 23_Dormer-Roof-Dim.png 24_Dutch-Gable-Roof-Dim.png 25_Front-Gable-Roof-Dim.png 26_Gable-Roof-with-Shed-Roof-Addition-Dim.png 27_Half-Hipped-Roof-Dim.png 28_Hexagonal-Gazebo-Dim.png 29_Jerkinhead-Gazebo-Dim.png 30_Mansard-Roof-Dim.png 31_M-Shaped-Roof-Dim.png 32_Open-Gable-Roof-Dim.png 33_Parapet-Roof-Dim.png 34_Shed-Roof-or-Skillion-Dim.png 35_Simple-Hip-Roof-Dim.png 36_SkillionRoof-Dim.png 37_Double-Hipped-Roof-Dim.png 38_Well-Hipped-Roof-Dim.png 39_Lean-to-Roof-Dim.png 40_Custom-Roof-Dim.png ---------------------------------------- Windows 64bit | Intel i7 | 8GB Ram | SH3D 7.5 + Plugins |
| Posted by dorin at Nov 29, 2020, 9:57:14 PM |
|
Re: Thoughts about roof-plugin If someone has programming experience I don't have BUT still interested in creating a plugin for Roofs I am. I have 40 sample images + 40 different palettes to import into "Eclipse" BUT where is the png and sources for Eclipse ??? Make a zip and put it somewhere to be downloaded. Don't expect too much from me but who knows?? BTW Why don't try to give us some codes? I usually stole it but now I accept it for free. PS I'll by You a beer when I meet You. ---------------------------------------- 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 |
| Posted by youseeus at Nov 30, 2020, 12:52:53 AM |
|
Re: Thoughts about roof-plugin I didn't do much since my last post. (except i built a house 😅) I'm still interested in this plug-in. But my priorities just shifted a bit :) i invested some time on understanding the code. I'm a professional java developer, but at some points i just didn't understand the data structure and -flow. |
| Posted by Xlance at Dec 1, 2020, 1:39:52 PM |
|
Re: Thoughts about roof-plugin @youseeus Source code: https://sourceforge.net/p/sweethome3d/feature-requests/1007/#b78b It's a work in Progress, any improvements / suggestions or modifications are welcomed! ---------------------------------------- Windows 64bit | Intel i7 | 8GB Ram | SH3D 7.5 + Plugins |
| Posted by Gildaniel at Dec 9, 2020, 1:00:49 PM |
|
Re: Thoughts about roof-plugin Good luck, looking forward to it! |
| Posted by uncleadjei at May 11, 2021, 3:34:54 PM |
|
Re: Thoughts about roof-plugin So when will we get a new set of roofing plugin |
| Posted by dorin at Aug 2, 2021, 7:51:40 PM |
|
Re: Thoughts about roof-plugin We will have to wait. "Something is more than nothing" It took me 2 mounts for this and maybe will be other 6 for something acceptable. I've start from this Straight_skeleton and I've try to do something in this direction. At that moment is unusable. What You see are only polylines. ![]() ![]() ![]() ---------------------------------------- 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 |
| Posted by Mike53 at Aug 5, 2021, 7:18:56 AM |
|
Re: Thoughts about roof-plugin Hi Dorin, appreciate the work you are putting into to this plugin, i am sure many people will appreciate it. Just an idea, would it be possible to "tweak" the new "Terrain Generator" from Puybaret |
| Posted by dorin at Aug 5, 2021, 10:23:44 AM |
|
Re: Thoughts about roof-plugin Hi Mike, I've already try to learn and understand how Terrain Generator work but I have to many holes in my general knowledge. I have to learn more about 3D objects and the terminology used in 3D space and programing. That's mean a lot of time. At that moment I'm stuck here: I don't know how to use this polylines or what is the next step to convert them in 3D object. ---------------------------------------- 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 |
| Posted by youseeus at Aug 5, 2021, 10:59:45 AM |
|
Re: Thoughts about roof-plugin Wow, I'm really excited about your progress. I'm not sure if i can contribute in the near future. I too was stuck at the generation of objects. I'm more into geo-information. |
| Posted by dorin at Aug 9, 2021, 8:51:26 PM |
|
Re: Thoughts about roof-plugin @youseeus If someone want to get involved... i created a private repro at bitbucket I'll be happy to see Your code even I'm not a programmer. Of course if You have finish the real roof for Your house! At that moment I'm in a process to learn basic 3D notions. The way suggested by Emmanuel is correct with update to use Terran Generator. My problem now is I don't know how to use java 3D principle BUT I will learn. ---------------------------------------- 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 |
| Posted by dorin at Sep 16, 2021, 8:44:56 PM |
|
Re: Thoughts about roof-plugin I made a little egg and now I'm cuddling like a hen. @Mike53 Thanks for inspiration! @Emmanuel & @youseeus Thanks for moral support! I wasted a month struggling with some angles but finally I made something. The most important thing is that I found a direction: - stright-skeleton - 2D polynons - 3D polygons from 2D polygons - 3D object Another thing was to cut back on claims. I preferred it to be something (imperfect) than nothing. That's what I've done so far: I start with failures: The thin red lines are unclosed polygons and thick red lines with arrow are wrong polygons. The blue polygons are good 2D faces Few acceptable Finaly the Roof Generator plugin beta After installation select a room and Tools -> Generate..Bla..Bla... ---------------------------------------- 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 |
| Posted by kotbasikcom at Sep 17, 2021, 6:50:03 PM |
|
Re: Thoughts about roof-plugin Eh, I wanted to try, but mediafire.com is being blocked because of someone's copyright infringement. Alas. |
| Posted by dorin at Sep 23, 2021, 6:40:23 PM |
|
Re: Thoughts about roof-plugin !!!WARNING!!! 0. Now is full of bugs and errors! 1. I forget to mention: this is not intended to be used by common users; it don't produce noting useful (yet). 2. I was in hurry to share it because I'm very close to end of statistically hope of life in my country. 3. Wile already are more than 44 downloads I want to share also few files for developers testing: Exemple2 , Exemple4 , Exemple5 , Exemple7 and also Eclipse folder 4. Possible hint: find something between roof3D faces and obj insert in plan from ShapeGenerator or TerrainGenerator. I'll be happy to receive some attempt or contributions or at least some idea to follow. ---------------------------------------- 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 |
| Posted by hansmex at Sep 24, 2021, 9:21:16 AM |
|
Re: Thoughts about roof-plugin Dorin, 1 - I draw a house of 5x10 mtr, with a dividing wall in the middle, and add two rooms 2 - When I apply the roof function, it draws TWO roofs, not one. Would it not be better <?> to base your plugin on the walls, instead of the rooms? Hans ---------------------------------------- Hans new website - under constuction hansdirkse.info |
| Posted by dorin at Sep 24, 2021, 11:20:14 AM |
|
Re: Thoughts about roof-plugin Hans, as usual You're right. In my mind was to generate a roof projection (room also) from exterior walls and then compute roof from it. That was the purpose for add this function in Auto dimension plugin v.1.5. Maybe someone in the future will write a more clever plugin. At this moment I try to cut a path to a roof and then turn it into a highway. Thanks for testing and suggestions! ---------------------------------------- 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 |
| Posted by dorin at Sep 29, 2021, 7:16:23 PM |
|
Re: Thoughts about roof-plugin I've made an other egg!!! Finally I've see a small candle in The dark forest . I wheel see if is good or bad. Here are first roof home furniture generated: I don't know what I've done but I mixed few stoles codes and I end up to a file with around 4000 lines of something. Anyway it's a little hard for a "One man show" ---------------------------------------- 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 |
| Posted by hansmex at Sep 29, 2021, 7:51:00 PM |
|
Re: Thoughts about roof-plugin Looks like a roof!! WOW ---------------------------------------- Hans new website - under constuction hansdirkse.info |
| Posted by Wiebenor at Dec 18, 2021, 11:16:34 PM |
|
Re: Thoughts about roof-plugin It'll be nice to see a roof generator added directly into the application sometime, or at least, a better one, if one already exists, if that's how you all want to release it when it's finally working without many bugs, because that is really the only thing missing on my plans, is a roof... However, one thing I've noticed with SH3D is that if you don't finish your room/building correctly, and there's a tiny gap between the start and end points of the auto framing thing, it doesn't treat the created object as a room for putting textures in, or something like that, because it doesn't, or at least doesn't want to consider it a closed space, if I'm not mistaken, and I'm wondering if your roof plugin will account for that(if that's even a problem that would affect that) |
|
|
Current timezone is GMT Dec 18, 2025, 9:17:20 PM |