Print at Dec 18, 2025, 5:20:36 AM

Posted by Puybaret at May 14, 2018, 11:08:03 AM
Re: Thoughts about roof-plugin
Thanks for the roof document link, it gives a good idea of various roofs and their parameters. But to ensure you reach your goal, you should probably start with a few roof simple models.

I would suggest that you inspire yourself from ShapeGenerator plug-in source code (it's included in the plug-in), i.e. create roof shapes with Java 3D classes, then export those shapes at OBJ format with OBJWriter class, finally create a HomePieceOfFurniture instance and add it to the edited home.
If you need to keep some parameters for the computed roof to update it afterwards, feel free to set your own properties on the HomePieceOfFurniture instance.

As it's possible to rotate objects around an horizontal axis, you could also try to create a roof by assembling flat boxes and triangles, but I think this will be more complicated to program.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator