Joined: Mar 23, 2020
Post Count: 116
Status:
Offline
Advanced Shape Generator
The Advanced Shape Generator Plugin is a powerful tool designed to expand the furniture and architectural capabilities of Sweet Home 3D. It enables users to create custom 3D objects by defining specific mathematical parameters or coordinates, bypassing the need for external CAD software for basic custom modeling.
This plugin includes a 2DShape Generator for manual coordinate entry and a comprehensive Advanced Models module.
Key Features:
Parametric Primitives: Instantly generate cubes, spheres, cylinders, cones, ellipsoids, tori, capsules, and domes with adjustable dimensions and segment counts.
Architectural Beams: Specialized generator for various beam profiles including I-Beam, T-Beam, C-Beam, L-Beam, Pi-Beam, and even Rail profiles with adjustable web and flange thickness.
2D Shape Designer: Includes a dedicated 2D interface to draw profiles or manually enter X, Y, and Z coordinates to extrude custom 3D shapes.
Advanced Geometry: Create complex objects such as spirals, wedges, pyramids, and curved elbows.
Material & Transparency Control: Fine-tune the appearance of generated objects with transparency sliders and material property settings (Reflectivity, Illumination, Ka, Ni, Ns).
Real-time Preview: View a 3D preview of the shape before adding it to your home plan.
DXF & TXT Import: Directly import 2D vector profiles from DXF files or coordinate lists from TXT files created by 2D Shape Designer, to generate complex architectural elements.
Custom Arch & Path Support: Use the "Custom" arch type to load your own external files, allowing for unique structural designs beyond standard presets.
Put all files in Sweethome3D Plugins folder e.g. C:\Users\U7000\AppData\Roaming\eTeks\Sweet Home 3D\plugins
Netherlands
Joined: Apr 8, 2022
Post Count: 1785
Status:
Offline
Re: Advanced Shape Generator
A good idea to add the Advanced button to to the current ShapeEditor. (A little nit-picking: make the buttons the same size)
When I click the advanced button it seems to load something but then stops without doing anything.
I get this as command line output:
Java 3D: implicit antialiasing enabled DynamicPluginLoader: plugin.classpath property not set DynamicPluginLoader: plugin.classpath property not set DynamicPluginLoader: plugin.classpath property not set DynamicPluginLoader: plugin.classpath property not set DynamicPluginLoader: plugin.classpath property not set SPI for freehep PNGEncoder installed! [DEBUG] StaircaseGeneratorPlugin.<init>:872 ---> StaircaseGeneratorPlugin [DEBUG] StaircaseGeneratorPlugin.getActions:857 ---> getActions View3DEnhancer installed successfully!
I get the same without your new plugin and with the 1.2.1 ShapeEditor so it's not related, but it is all the output I get.
Linux Debian Java version for Sweet Home 3D: 1.8.0_471 64bit
---------------------------------------- Dodecagon.nl 1300+ 3D models, manuals, and projects
Romania
Joined: Apr 24, 2014
Post Count: 821
Status:
Offline
Re: Advanced Shape Generator
It’s a wonderful initiative and a much-needed plugin. What it promises to do is very tempting. There’s just one small problem: it doesn’t work (at least on linux).
As it happens, I’m also working on something similar, though much more rudimentary. Without the source code, I can’t help you at all. Keep going!
---------------------------------------- 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
Joined: Mar 23, 2020
Post Count: 116
Status:
Offline
Re: Advanced Shape Generator
Ooops ! Sources are now posted on Sourceforge ;-) @dorin feel free to upgrade/fix/integrate the source with yours but please only add more options not omit :-)
---------------------------------------- Windows 64bit | Intel i7 | 8GB Ram | SH3D 7.5 + Plugins
Romania
Joined: Apr 24, 2014
Post Count: 821
Status:
Offline
Re: Advanced Shape Generator
First of all, I want to ask you if you’ve tested your plugin outside of the development environment? Have you tested whether it works on a standard installation of SH3D? As your friend, I feel it’s my duty to offer you a few recommendations: 1. A few things I’ve learned from Daniels118: 1.1 If a Java file has more than 1,000 lines, something is wrong with the way you’re coding. 1.2 If a method is longer than the screen height and you can’t see it in its entirety without scrolling, that’s also bad. 2. I’m all for more options, but only after the few we have actually work. That’s what versions are for. 3. Plugins should be made for SH3D, not the other way around. SH3D uses jre8, java3d 1.6.2, and a few other libraries. Of course, they can be modified or added, but with specific local settings (sh or ini files). 4. If you use a plugin already created by someone else for a new plugin or to improve one, use a new name along with your own version numbering. That way, you won’t confuse SH3D or the users. 5. While reading the source code, I noticed you’re using JavaFX, but this isn’t natively supported by SH3D. 6. I intentionally delayed releasing a beta version of my plugin because I believe yours is better. In any case, the AdvShapeGenerator-1.2.2 and HandRailGenerator-1.2.2 source codes are valuable to me.
---------------------------------------- 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
Romania
Joined: Apr 24, 2014
Post Count: 821
Status:
Offline
Re: Advanced Shape Generator
You're probably right. I've tried (on Linux) various methods to get them to work, but without success. I hope that at least Windows users will enjoy them. In fact, I've tried this in the recent past with other JavaFX- and Swing-based applications, also without success. While searching for solutions on Google, I found various opinions stating that the two aren’t exactly the best of friends (at least on Linux). For one of the applications I needed, I had to convert everything to Java3D, a task that wasn’t exactly easy. The result wasn’t great, but it was enough for me to understand what I needed.
Translated with DeepL.com (free version)
---------------------------------------- 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
Joined: Mar 23, 2020
Post Count: 116
Status:
Offline
Re: Advanced Shape Generator
@dorin after a lot of effort, here is a Java3D only version of AdvShapeGenerator-1.2.2.jar which is functional with source but needs some work to actually show the 3D Models.
Romania
Joined: Apr 24, 2014
Post Count: 821
Status:
Offline
Re: Advanced Shape Generator
Don't expect too much. I'm retired, but I have a lot of hobbies (including my plugins). 1. This is your AdvancedShapeGenerator-1.0 plugin. It freeze but it became accessible after you cancel the ShapeGenerator. Some buttons work (like Shape Designer 2D). I suggest to make it as a your new plugin. 2. This is AdvancedShapeGenerator-1.0 Eclipse folder. Unpacked under your eclipse-workspace and import it. 3. Here is a PluginTemplate Eclipse folder. May be useful.
---------------------------------------- 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