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: 302
Posts: 302   Pages: 31   [ Previous Page | 22 23 24 25 26 27 28 29 30 31 | Next Page ]
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 805017 times and has 301 replies Next Thread
dorin
Advanced Member
Member's Avatar

Romania
Joined: Apr 24, 2014
Post Count: 676
Status: Offline
Reply to this Post  Reply with Quote 
Re: Generate roof plugin

1. Thanks for your willing to help.
2. Don't forget: there is all kind of irregular 3D polygons so I need an universal formula (preferably some java code)
3. The bad news: I've put in hold this plugin for around 8 months. I continue to fight with Stair Builder.
4. The good news: I'll think about this along the others when I'll have time.
----------------------------------------
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
[Jan 2, 2025, 6:01:58 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
k005
Member



TURKEY
Joined: Aug 6, 2022
Post Count: 54
Status: Offline
Reply to this Post  Reply with Quote 
Re: Generate roof plugin

Yes you are right. There must be a universal formula.

Of course, when you have time. Thank you for developing and sharing such a plugin.
[Jan 2, 2025, 6:23:58 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
k005
Member



TURKEY
Joined: Aug 6, 2022
Post Count: 54
Status: Offline
Reply to this Post  Reply with Quote 
Re: Generate roof plugin

Maybe it will help you find it...


In this code, the area of ​​each triangular surface of the 3D surface is calculated by Heron's formula.
This formula helps you find the area of ​​the surface with the side lengths of the given triangle.



Heron's Formula:


If the side lengths of a triangle are aa, bb and cc, the area AA is calculated as follows:

Here, ss is the half perimeter of the triangle and is calculated as follows:



[Jan 3, 2025, 5:24:34 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: 676
Status: Offline
Reply to this Post  Reply with Quote 
Re: Generate roof plugin

Thanks! Could be useful BUT...
I need to input a 3D series of points (x.y.z) representing the irregular polygon boundary (supposing all points belongs to the same plane)
and something(formula or code, eventually java code) to compute the 3D polygon area.
So, please continue searching.
----------------------------------------
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
[Jan 3, 2025, 5:52:03 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: 676
Status: Offline
Reply to this Post  Reply with Quote 
Re: Generate roof plugin

New version 4.7 (Easter)
News:
- add total surface of visible roof faces;
- fix a bug in the preview related to the texture of interior faces when using the "Use roof texture" option;
- improves reset when a previous roof is loaded,
-- will remember the loaded roof parameters.
It have to look like that:

Also on Source Forge .

Meanwhile I use this:


Happy Easter!
----------------------------------------
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
[Apr 20, 2025, 8:54: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 
Keet
Advanced Member
Member's Avatar

Netherlands
Joined: Apr 8, 2022
Post Count: 1366
Status: Offline
Reply to this Post  Reply with Quote 
Re: Generate roof plugin

Amazing! Thank you for all the hard work.

Meanwhile I use this:
remember this challenge?: https://sweethome3d.com/support/forum/viewthread_thread,11330_offset,190#60543
You are almost there. With the flexible elevated points almost any possible roof can be generated.
You do realize that this is very close to a multi-point 3D shape generator? That one is limited to 8 points but this proves it's possible to edit with many more points. Replace 'roof' with 'shape' and it's there. And I am definitely going to abuse it for that laughing
----------------------------------------
Dodecagon.nl
1000+ 3D models, manuals, and projects
[Apr 21, 2025, 7:00:35 AM] 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: 676
Status: Offline
Reply to this Post  Reply with Quote 
Re: Generate roof plugin

@Keet
Thanks for your appreciation and encouragement.
1.
remember this challenge?
Of course and I've tried again.
Is not so perfect as your but it is a try.
The file:https://www.mediafire.com/file/ebavzdlbpbuu4ug/RoofChallengeD.sh3d/file
And a picture:

Take a look at the slope values of the faces.

2.
You do realize that this is very close to a multi-point 3D shape generator?
I do. It's been on my mind for a long time (probably since the beginning of Shape Generator).
I'll see what I can do.

3.
Replace 'roof' with 'shape' and it's there.
If it were that simple...

4. The RG v.5.0 beta14 is far from usable for common users.
I made it, I use it, but it is very difficult to use even for me.
There is still a lot of work to do and I don't know if there is time for me.

5.
And I am definitely going to abuse it for that
Unfortunately, you and others (including me) will have to wait. crying
----------------------------------------
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
[Apr 21, 2025, 5:53:06 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Keet
Advanced Member
Member's Avatar

Netherlands
Joined: Apr 8, 2022
Post Count: 1366
Status: Offline
Reply to this Post  Reply with Quote 
Re: Generate roof plugin

Take a look at the slope values of the faces.
Yep, three digits after the decimal point. Not something you would do by hand. But you don't need to if you can adjust the vertice coordinates.

But you got pretty far with this. I think it is one of the last technical features needed to open up the possibility to create any form and type of roof. It will also open up possibilities for dormers.

The original roof was created with the 3D Shape editor and that worked very well. But with that roof I knew the exact vertice coordinates to create each part. Knowing those coordinates made it very easy. Each part appears at the correct position and elevation when you know the coordinates!
I can't see it very well on the image but the texture alignment seems to need some fixing. Every part needs the outside borderline as the base, stretching toward the top. Just like real roof shingles would be attached. Of course it is Work in progress but so far you have done an amazing job with this.
Thank you very much for your time and effort!
(Looking forward to a multi-point shape editor. I'm afraid I'm wearing it out with the number of times I use that tool!)
----------------------------------------
Dodecagon.nl
1000+ 3D models, manuals, and projects
[Apr 21, 2025, 6:25:50 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: 676
Status: Offline
Reply to this Post  Reply with Quote 
Re: Generate roof plugin

Not something you would do by hand.
Indeed, but I have to do it.
But you don't need to if you can adjust the vertices coordinates.
If you do so you will never have a plane or it will be very hard to align the vertices to be part of the plane without the help of the campskeleton calculations.
It will also open up possibilities for dormers.
I already wrote (a year ago) a tutorial about this.
I can't see it very well on the image but the texture alignment seems to need some fixing.
I've posted the file. You can't modify the roof with your current plugin but you could set the texture.
Every part needs the outside borderline as the base
I've anticipated this statement. But now you give me a reason to disagree.
Just like real roof shingles would be attached.
The real roof shingles are attached accordingly with the water flow natural direction.
The roof builders know how the water flow and don't try to fight with the nature force.
Sooner or later the Nature law's win.
The water flow doesn't care how you arrange the texture in SH3D or how nice and symmetrical it looks in the program.
Water simply flows in the direction it has known for millions of years. From top to bottom the shortest way.
The border orientation doesn't mater.

But, most probably I'm (as usually) wrong.
----------------------------------------
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
[Apr 21, 2025, 8:30:50 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Keet
Advanced Member
Member's Avatar

Netherlands
Joined: Apr 8, 2022
Post Count: 1366
Status: Offline
Reply to this Post  Reply with Quote 
Re: Generate roof plugin

Not something you would do by hand.
Indeed, but I have to do it.
That I don't understand. Isn't the angle a result of a calculation when the position of a point is changed?

If you do so you will never have a plane or it will be very hard to align the vertices to be part of the plane without the help of the campskeleton calculations.
There's a simple and widely used solution: use triangle faces and don't try to force rectangular faces. Even rectangular faces are most likely converted to two triangle faces. Open an exported box in Blender and you will see that each side has two triangular faces and not a single square face.

Every part needs the outside borderline as the base
I've anticipated this statement. But now you give me a reason to disagree.
...
The real roof shingles are attached accordingly with the water flow natural direction. The roof builders know how the water flow and don't try to fight with the nature force. Sooner or later the Nature law's win. The water flow doesn't care how you arrange the texture in SH3D or how nice and symmetrical it looks in the program. Water simply flows in the direction it has known for millions of years. From top to bottom the shortest way.
The border orientation doesn't mater.
I agree. I probably stated it wrong but I meant the same. Not water flowing to the top laughing but the direction of the texture. It should be towards the baseline (where water flows of the roof). With the new functionality of point editing that might change: texture direction towards the lowest point.

I'm currently experimenting with generating furniture parts, for example a cabinet door with handle and hinges. Throw in the dimensions, a bevel size, a material type (color/texture/glass/mirror), a material name, hingenumber, and if you want it smoothed and it generates obj/mtl files for a complete functional door that can open. It does one thing that's difficult to create in Sweet Home 3D: bevels. And one thing Sweet Home 3D can't do at all: smoothing. Shelves/sides were simple but the door was a struggle with keeping the handle and hinges the same size when the size of the door itself changes. Now I'm breaking my head over generating drawers. The goal is to generate parts for a cabinet in any given dimension, even if smaller than the 0.1 limit, like your angles.
So far it seems to work fine but I makes me completely understand your problems with calculating vertices/faces and textures, and of course many digits after the decimal point.
----------------------------------------
Dodecagon.nl
1000+ 3D models, manuals, and projects
[Apr 21, 2025, 9:20:46 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: 302   Pages: 31   [ Previous Page | 22 23 24 25 26 27 28 29 30 31 | 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 2024 Space Mushrooms - All rights reserved