Romania
Joined: Apr 24, 2014
Post Count: 588
Status:
Offline
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
Italy
Joined: Nov 17, 2021
Post Count: 431
Status:
Offline
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.
United States
Joined: Aug 17, 2019
Post Count: 17
Status:
Offline
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...
United States
Joined: Aug 17, 2019
Post Count: 17
Status:
Offline
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???
Romania
Joined: Apr 24, 2014
Post Count: 588
Status:
Offline
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 YES I ACCEPT YOUR OFFER!!!
---------------------------------------- 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
Italy
Joined: Nov 17, 2021
Post Count: 431
Status:
Offline
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
Italy
Joined: Nov 17, 2021
Post Count: 431
Status:
Offline
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 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.
Romania
Joined: Apr 24, 2014
Post Count: 588
Status:
Offline
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
Italia
Joined: May 12, 2017
Post Count: 65
Status:
Offline
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 :(