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 630994 times and has 247 replies Next Thread
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

Thanks Daniel! I've see it first and than Polyskel implemented in Blender.
Booth have some dependencies which I don't know how to pack in a plugin.
Also I prefer to use the dependencies of SH3D.
Thanks for help!
----------------------------------------
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 15, 2022, 7:45:20 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

If you feel the campskeleton API suits your needs I could try to pack all required classes in a single java project that you can directly reference in your plugin. The sw is licensed under Apache 2.0, so it can be modified and included in a GPL v3 licensed plugin.
[Feb 15, 2022, 12:13:22 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Wiebenor
Newbie



United States
Joined: Aug 17, 2019
Post Count: 17
Status: Offline
Reply to this Post  Reply with Quote 
Re: Generate roof plugin

The plugin work in this order:
1. Select 1 or more rooms. If are more only first will be computed.
2. Menu->Tool->Generate roof...
Recommendation 1: try on a test file, eventually with file provided on this page.
Recommendation 2: install AutoDimensioning plugin, read instructions , and, if You have some walls, will generate roof projection for that walls.

NOTE 1: If roof are not generated correctly, try to modify a little bit the foot print to avoid some edges to be collinear.
NOTE 2: Even so will not work all the time!

PS: I've try to reproduce Your building and with v.1.0 work!
Verify in Help->About Your installed version.
The result are not total correct (some faces) but it work.




The size of the building I am making is around 268ft long in the left to right direction, if that helps any... I believe I have the autodimensioning plugin, and will try that, but as for you getting it to work, depending on what faces work, it might work in my case, as the roof is just to make the building feel complete in any pictures or videos made.. also remember, that my playground will be the big thing that will be the focus, as the building is already built, but I am doing a design for my church, who's kids are supporting another church in building a playground, so I thought I'd take the rudimentary mspaint looking drawing with post-it notes and added pictures, and try making a quick 3d design...
[Feb 15, 2022, 4:42: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 
Wiebenor
Newbie



United States
Joined: Aug 17, 2019
Post Count: 17
Status: Offline
Reply to this Post  Reply with Quote 
Re: Generate roof plugin

Also, in case you're wondering, I did try with a demo house plan or two that came with the program and it worked just fine
[Feb 15, 2022, 4:50: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 
Wiebenor
Newbie



United States
Joined: Aug 17, 2019
Post Count: 17
Status: Offline
Reply to this Post  Reply with Quote 
Re: Generate roof plugin

On second try of doing a roof in a demo house, I didn't get it to work, so I think I tried before and it didn't work, sorry for my bad memory... Also just tried autodimensioning, and it didn't work, plus I am using v1.0 of the roof plugin... Is there some other plugin I'm missing, or perhaps a system file that or update, is not present is needed???
[Feb 15, 2022, 5:01:24 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 
cool Re: Generate roof plugin

@Daniels118
Sorry for late response!
0. Manny thanks for Your availability to help me!
1. You're right, campskeleton are Weighted straight skeleton which are more useful for YAUP.
2. I imagine an interface like Furniture materials BUT to modify face angle (maybe also the texture) before added to plan.
3. Could be also invent a new kind of furniture (roof) with some specific properties (I don't know how and which) to be able to modify after inserting in plan.
4. I'll be very happy if I could have this java file added to plugin as separate class with ALL dependencies (jutils + etc) or adapted.
5. In such case my job are reduced to make graphic interface and insert object in plan cool dancing
YES I ACCEPT YOUR OFFER!!! wink
----------------------------------------
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 17, 2022, 11:21:53 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

Hi Dorin,
I think editing a roof after it has been placed could be a plus value. A possible way to implement this could be to encode the generating perimeter along with any user supplied parameter within a custom property attached to the roof object (custom properties can be added with the standard API, see setProperty and getProperty methods in com.eteks.sweethome3d.model.HomeObject), so that you can rebuild the perimeter later even if the user deletes the generating room. Since properties can be made only of strings, all the required information have to be serialized/unserialized in order to be stores/retrieved.
I'm not completely sure about the fact you have to code only the user interface, since from my understanding the library only generates 2D coordinates, so you also have to figure out a way to compute the vertical position of the points. Another open point is the texture mapping, however this could be solved later.
That said, I'm going to put my hands on wink
[Feb 17, 2022, 4:58:32 PM] 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

Hi dorin. The bad news is the campskeleton library requires the Java compliance level 8. The good news is SH3D runs on Java 8+ on 99.9% of computers biggrin Many thanks to Emmanuel for having confirmed this so quickly!

Here you will find a zip file which contains 2 Eclipse projects, you must import them into your workspace as "existing projects" and choose "load from archive":
  • campskeleton_allinone is the project you have to include in your plugin project;
  • campskeleton_plugin is a test plugin (see below).
The campskeleton library requires the java.vecmath package, which is already included in SH3D, so I have added a dependency from the SH3D project which is not included in the archive, hence you will get a build path error. You could download the source code of SH3D and import it into your workspace to satisfy the dependency, or download just the vecmath package, it's up to you. It must be on the build path, but you haven't to include it in the sh3p package. When building the sh3d package be sure to include all the files from the campskeleton_allinone project.

The example plugin adds the "CampSkeleton" item under the "Tools" menu. It will simply display the example editor from campskeleton (the one you seen in the video) already initialized with the selected room points:


If you have trouble to setup the workspace just let me know.
[Feb 17, 2022, 8:09: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

Hi Daniele!
Let's start with good news: WORK!!!
After few modifications (work only with rooms in clock wise) and I fix it.
Work with ALL my files used for test including some improbably shape.
Now some TODO:
-this version is the stable one which don't allow negative value for weight (like we see in the demo video).
I have both and I'll try to update current files You have share.
-somewhere in org.twak.utils is a import_obj.py file used to import obj+mtl files in Blender.
That's mean somewhere this files are generated. I'll see where.
If so is all I need to pass them to exportObject(). It's too good to be true!
-for 3D I've see this in src.
All this mean I've have to start work from 0 the roof plugin and it's OK.

Thanks again for priceless help!!
Dorin
----------------------------------------
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 18, 2022, 8:47:36 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

Hi dorin, hi daniele, i'm not enough inside the plugin dev, but reading last dorin message I have this:

Given what the campskeleton generates, in order to generate 3d view, if you can get the "lines" that are inside the generated geometry you could "elevate" nodes inside the polygon and you have a 3d object similar to the old version of the plugin, right?

If campskeleton allows you to get all the nodes (did not see the code, but nodes are part of the maths usually), i can find those inside the polygon by using the raycasting technique (basically for each point you draw a line bigger than the polygon max size, and you check how many times it crosses the polygon, if odd is inside, if even outside).

I'm sorry I can't help on the dev part, i have small kids and never have time to use my pc when not at work :(
[Feb 18, 2022, 10:23:39 AM] 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