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: 248
Posts: 248   Pages: 25   [ Previous Page | 1 2 3 4 5 6 7 8 9 10 | Next Page ]
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 631506 times and has 247 replies Next Thread
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9141
Status: Offline
Reply to this Post  Reply with Quote 
Re: Generate roof plugin

Dorin, about some roof parts which looks like missing, I always wondered if it wasn't due to the generated shapes which two faces wouldn't be visible (back and front faces). The default settings in Java 3D is to cull (hide) back faces. If you want to change this, just create an instance of PolygonAttributes, call setCullFace(PolygonAttributes.CULL_NONE) on it and use it to change the appearance of the shape with setPolygonAttributes.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Feb 18, 2022, 11:04:43 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Daniels118
Advanced Member
Member's Avatar

Italy
Joined: Nov 17, 2021
Post Count: 398
Status: Offline
Reply to this Post  Reply with Quote 
Re: Generate roof plugin

@dorin
this version is the stable one which don't allow negative value for weight
Sorry, I didn't realize negative weights wasn't available in this version. Hope you can get it work, otherwise just ask.
for 3D I've see this in src
You're right, I didn't see yet the code when I wrote about vertical positioning of the points. Looking at the video published on the research project page referenced on github I've learned the library is born specifically to build roofs, so now I'm expecting it is 3D-ready.

@ndorigatti
Thank you for your effort, but in the end it seems the vertical position comes out of the box (see above).
Anyway, I like exploring other solutions, so let me expose some thoughts. The method you proposed is easy to implement for simple shaped roofs, but it would require some kind of guessing for complex shapes, because not all inside points should be elevated by the same amount. If you look at the 2D image in my previous post, you can easily end up that the right side of the roof won't be as tall as the left side. This doesn't mean the method is wrong, it just means it requires some degree of intelligence, which require some effort to implements. Maybe we could come to a complete solution in 10 minutes, maybe not. Since the library developers seem to have already solved this problem, you could look at the code to understand how they did, if it really is of your interest.

Daniele
[Feb 18, 2022, 11:33:30 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
ndorigatti
Member



Italia
Joined: May 12, 2017
Post Count: 65
Status: Offline
Reply to this Post  Reply with Quote 
Re: Generate roof plugin

@Daniels yeah, i see. TBH my idea was just to get the "inner" part of the roof and elevate it using the same logic dorin developed previously, not that i'd use raycasting to get the elevation.
But given there is already a solution for 3d in campskeleton, it's perfect to start from that.

The only thing (as a user) I'd like to see in a plugin like this is the possibility to move/change the control point and specify the elevation for different parts of the roof (obviously with some limitations). It comes in my mind a very basic but similar thing to the terrain editor developed by Puybaret.

As soon as my kid starts to sleep alone and early, I'd look into the code happily ^^
[Feb 18, 2022, 1:22:59 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
sjb007
Advanced Member




Joined: May 18, 2021
Post Count: 210
Status: Offline
Reply to this Post  Reply with Quote 
Re: Generate roof plugin

* Where I put a number in {}, i.e. {2.0} I'm, referencing https://wiki.openstreetmap.org/wiki/OSM-4D/Roof_table which is a great reference for thinking about all the various roof forms.

Couple of requests to add for consideration if at all possible:
1. If I understand the principle, moving the big yellow dots changes the angle of projection away from the perimeter line. If so, it'd be useful to have an overlay showing what that value is.
2. On each perimeter line have the ability to disable that plane of roof. This would be good for gable ends {2.0} with already peaked walls below, or unusual roof shapes.
But otherwise this looks awesome. Now all we need are rooflights! laughing
A couple of other pie-in-the-sky ideas coming to me:
3. A segment or points get an elevation parameter which I think would allow half-hipped {2.3}, and saltbox {3.0} and "cutouts" {3.0 free outline example}, but that may not be possible based on the library.
4. A slightly easier idea for half-hipped and the like is to use two rooms. Room one uses the campskeleton to generate the planes, and room two is used to clip the generated roof. So the campskeleton segments for the half hipped ends are further out, and the clip room segments are closer in, causing that stubby little end plane. I hope that made sense.
[Feb 18, 2022, 1:40:51 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: 548
Status: Offline
Reply to this Post  Reply with Quote 
Re: Generate roof plugin

@Emmanuel
1. PolygonAttributes I've set it starting with v.112 and I've solve to don't see the sky through the roof when in virtual visitor.
Also from v.117 I've fix the elevation problem observed by bdfd.
2. The missing part from roof faces are really missing.
The blue lines have to mark the edges; are not wire frame lines.
I don't make an mechanism for treating errors and at the moment is ALL or NOTHING!.
Nothing when at least one face are null, nothing happen on screen.
The incomplete faces are wrong defined but have at least 3 points in place of 4 or more.

@ALL FRIENDS
I'm surprising how many people want to help me. MANY THANKS!
At that moment I'm still trying to continue on that direction because I think it wort.
Some description:
-I steel use plans intersection like in v1.0 but I add also the offset polygons and edge intersection from v.1.0 alpha.
-From plans I have 3D points and superpose it over 2D points from edge intersections.
-Planes help me to know to which face belong the point and give me the height but it give me also too many points.
-To compute face I have to identify point-by-point from start to end.
To reduce points numbers and put it in the correct list I identify few problems:
--Co-planar panes intersect other plans in the same point and I need only one in that position
--When roof are circular or only same parts are arc circle I need a list with centers (that's I work now)

About use of this YAUP (my vision):
-Generate bottom roof; copy and paste at specified elevation (roof thickness);connect with a border in a single object.
All this make by plugin.
-Then modify resulted object moving point, edge or faces.
Could be useful the option to insert/delete.
Of course the points up and down have to be synchronized.

Only for developers or for anyone curios Roof Work
It's 2 folders compressed; one eclipse with current work version (132) and second with files for test.
Could be good as references.

When we consider this way is a dead way maybe me or some of You will start over.
I want to thanks again to everybody!
----------------------------------------
A computer program does what you tell it to do, not what you want it to do. Murphy's Law (Greer's Third Law)
When all else fails, read the instructions.Murphy's Law
[Feb 19, 2022, 6:41: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 
dorin
Advanced Member
Member's Avatar

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

Some few improvement in Roof work v135
1. The archive contain 2 folders and an sh3p file.
-one folder with eclipse work (with a lot of aid lines)
-one folder with more precise test files
-one plugin file without aid code
2. I've improve 2D intersections but it is more to do
3. On last post I don't explain very clear what I intend to do:
-* What is given? and what is required?
* Given: a roof footprint (room)
* Required: compute roof faces (3D closed polygons)
- Get all information from what is given:
--points, lines, lines angle, angle between lines, lines length
--get user input (general roof angle)
- Try to solve request:
--compute offset polygons and edges in 2D
--compute edges intersections in 2D
--compute planes from 3 points (2 lines points and 1 point at 100cm at angle)
--compute 3D intersection of 3 planes
--compare intersections 3D with 2D and make 3D points lists for every face
--compute 3D polygons, point-by-point, from 3D points from every face, based on indexes of planes
4. Normal users MUST use it with care!! Is not finished(yet).
----------------------------------------
A computer program does what you tell it to do, not what you want it to do. Murphy's Law (Greer's Third Law)
When all else fails, read the instructions.Murphy's Law
[Feb 24, 2022, 4:55:27 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: 548
Status: Offline
Reply to this Post  Reply with Quote 
Re: Generate roof plugin

I know is not the moment to boring You while the whole world have other concerns.
Few improvement since previous. Roof work v.137
As usual: 1 folder eclipse, 1 folder with test files and a sh3p.
WARNIG!!! Those who what to use plugin file don't forgot to remove previews versions.
Few screenshot with good and bad:








----------------------------------------
A computer program does what you tell it to do, not what you want it to do. Murphy's Law (Greer's Third Law)
When all else fails, read the instructions.Murphy's Law
[Mar 2, 2022, 7:07:23 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: 548
Status: Offline
Reply to this Post  Reply with Quote 
Re: Generate roof plugin

New version 2.0 and on Source Forge
Finally I've give up to reinvent the wheel.
Thanks to Tom Kelly for his campskeleton , a professional solution. It work on more than 95%
Thanks also to Daniele who help me and point me on right direction.
Of course could be improved but not by me.
Problem: steel don't compute texture coordinate correctly.
**Don't forget to to remove previews versions.**




----------------------------------------
A computer program does what you tell it to do, not what you want it to do. Murphy's Law (Greer's Third Law)
When all else fails, read the instructions.Murphy's Law
[Mar 10, 2022, 6:15:09 PM] 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: Generate roof plugin

Very nice and impressive results! My favorite is of course the SH3D roof wink
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Mar 10, 2022, 7:15:48 PM] Show Printable Version of Post    View Member Profile    Send Private Message [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: 3948
Status: Offline
Reply to this Post  Reply with Quote 
Re: Generate roof plugin

Congratulations!!

For someone who can't program, you made a VERY nice plugin.
Thank you very much :-)
----------------------------------------
Hans

new website - under constuction
hansdirkse.info
[Mar 11, 2022, 1:54:11 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: 248   Pages: 25   [ Previous Page | 1 2 3 4 5 6 7 8 9 10 | 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-2024 eTeks - All rights reserved