Homemaker add-on

edited April 2021 in General

[From the README] The Homemaker add-on tries to automate the tedious work of designing buildings. Just indicate with simple geometry where you want walls, floors and roofs, and the software figures-out what building elements are needed to create that building. The result is an industry-standard IFC (BIM) model, suitable for taking the project towards construction.

The software is a general python library for turning 3D geometry and style definitions into IFC building models, it is initially provided as a Blender add-on, but is designed to be usable with other awesome 3D design platforms such as FreeCAD.

  • Will assemble buildings from any geometry, as long as the faces overlap enough to define cells for rooms. The only assumption is that walls are vertical, floors are horizontal, and that rooms are surrounded by vertical walls.

  • Adaptable style system, styles can be subclassed or overrriden entirely. Different parts of buildings can be assigned different styles.

  • Fully compliant industry standard IFC output.

  • Free Software, no annual licenses, these are your tools to use, customise and share as you wish.

Requirements

  • topologicPy a python interface to the TopologicCore library. Install it with sudo python setup.py install

    • cppyy C++ python interface, this consists of four packages: cppyy-cling, cppyy_backend, CPyCppyy and cppyy, but you can probably install it all with sudo pip install cppyy
    • TopologicCore. This is a C++ library which you build and install using the standard cmake build system. It requires the opencascade library and headers which should be available from your distribution. Note that topologicPy requires the TopologicCore header files to be present at runtime, so you need to install these too.
  • blenderbim blender add-on, just download the ZIP and install from the blender preferences menu. Note April 2021, the Homemaker add-on uses very recent features of the IfcOpenShell API, so you need a nightly snapshot

  • pyyaml python module.
  • ezdxf python module for reading assets, which are in DXF format until we can figure out how to use IFC asset libraries.

[edit] With all the above installed, it should just be possible to download the homemaker-addon-main.zip archive and install it as an add-on in the Blender preferences. Basic usage is to select a Blender mesh, such as the default Cube, and pick Object -> Homemaker Topologise from the menu

stephen_lduncantheoryshawJQLbitacovirCyrilJanFMoultCGRtopologicand 1 other.
«13456710

Comments

  • JQLJQL
    edited April 2021

    From the GitHub link:

    But not least, let's take architecture out of the hands of architects and put it back in the hands of people who need good ordinary buildings.

    This is a cool, strong, statement.

    Taking architecture from architects isn't guaranteed to provide good ordinary architecture though.

    brunopostle
  • @JQL said:
    Taking architecture from architects isn't guaranteed to provide good ordinary architecture though.

    Absolutely, also there is nothing in the Homemaker add-on to prevent someone designing awful buildings. I'm also looking at it from the perspective that most buildings are not designed by architects (at least in the anglo world), but they need to be good architecture anyway.

    JQL
  • edited April 2021

    Some notes on the Homemaker add-on code.

    The blender add-on is just a few lines, everything else is split into two main libraries that are not dependent on blender at all (there is a brep2ifc.py tool that performs the main functionality on the command-line without blender). These two libraries are topologist and molior:

    Topologist extensions to topologicPy for ordinary buildings

    The Topologic library and its topologicPy python interface models generic non-manifold mesh 3D geometry. This topologist module overloads additional functionality onto the topologicPy module that is specific to ordinary buildings. In particular: horizontal and vertical faces are considered to be floors and walls; rooms are spaces with vertical walls on all sides; non-horizontal faces form roofs and/or soffits; and cells are tagged as indoor 'rooms', voids, or outdoor spaces.

    With this model of what-a-building-is, it is possible to decompose the Topologic CellComplex geometry into 'traces' that define building components. Traces are 2D closed or open chains, differentiated by elevation, height and style properties, typically running in an anti-clockwise direction, these follow the outlines of rooms, walls, eaves, string-courses etc.

    Traces are defined using a simple directed-graph implementation, molior.ugraph, this only supports linear chains and doesn't support branching. The traces contain references back to relevant Vertices, Faces and Cells in the original Topologic CellComplex.

    Topological relationships between rooms are useful for analysis of the resulting building, this module contains methods for creating Topologic Graph objects representing adjacency and circulation, along with methods for referencing these back-and-forth with the original CellComplex.

    This topologist module knows nothing about CAD, BIM or IFC, use the molior module to convert these traces into something to visualise or solid to build.

    Molior builds 3D models from topologist 'traces'

    Traces are 2D closed or open chains that define building elements, differentiated by elevation, height and style properties, typically running in an anti-clockwise direction, these follow the outlines of rooms, walls, eaves, string-courses etc.

    Which traces are used, and how they are used, are defined by files in the molior/share folder and subfolders. Each subfolder has a unique name and represents a different architectural 'style', buildings can be all one style or have multiple styles, each applied to different parts of the building. Styles are inherited from parent folders, and can represent only minor variations, without needing to duplicate anything that is already defined by the parent folder(s). Access to these style definitions is handled by the molior.style module.

    Molior uses IfcOpenShell to generate IFC models of buildings, with some extra helper methods defined in the molior.ifc module. Different building parts need to be constructed differently, so walls, ceilings, extrusions etc. are each handled by dedicated modules.

    Molior is largely derived from the Perl Molior module, but has been rewritten in python in order to interface with Topologic and IfcOpenShell.

    [edit] Note, currently the Homemaker add-on assumes that all dimensions are metres, as it moves away from DXF to IFC for resources it should become agnostic about units.

    bitacovir
  • I am trying to give homemaker a go on win10. Do all the dependencies (other than blenderbim) have to be installed from within the python bundled in Blender?

  • edited April 2021

    @dimitar said:
    I am trying to give homemaker a go on win10. Do all the dependencies (other than blenderbim) have to be installed from within the python bundled in Blender?

    We have established that all the tools work on Windows, but I haven't tried putting it all together.

    Currently the most straightforward way to do this would be to follow the topologicPy instructions for Blender on Windows. These instructions are for installing everything outside Blender and then using sys.path.append() to load them from the Blender python console (I think you would need to match the version of python in Blender and also the version of opencascade in Blenderbim, but I haven't tried these instructions since I'm on Linux).

    Then you would install the pyyaml and ezdxf dependencies using pip within Blender, and the Homemaker add-on should install just like any other Blender add-on.

    Alternatively, it may be possible to install cppyy the same way with pip in Blender? in which case all you need is a TopologicCore.dll file with TopologicCore headers, and you could install topologicPy in the Blender console. @topologic do you have a pre-compiled DLL? preferably linked with opencascade 7.4.0 (since this is what ships with the Windows Blenderbim add-on).

    Another alternative, if you are comfortable with virtual machines, would be to install fedora in a VM, and use the precompiled rpm packages I've built for all the dependencies.

    Moult
  • @brunopostle yes I have a precompiled Windows DLL linked to OCCT 7.4.0. Will upload soon to my GitHub repo at http://github.com/wassimj

    paullee
  • @brunopostle said:
    [From the README] The Homemaker add-on tries to automate the tedious work of designing buildings. Just indicate with simple geometry where you want walls, floors and roofs, and the software figures-out what building elements are needed to create that building. The result is an industry-standard IFC (BIM) model, suitable for taking the project towards construction.

    Great project! We should add it to our Software Directory. Which category is more suitable? CAD / BIM Design Developmen or Schematic design? Or both?
    https://wiki.osarch.org/index.php?title=AEC_Free_Software_directory

  • I don't think it particularly matters. It is definitely a schematic design tool, but isn't yet part of a working CAD workflow

  • @brunopostle said:
    I don't think it particularly matters. It is definitely a schematic design tool, but isn't yet part of a working CAD workflow

    Added to schematic design tool group. https://wiki.osarch.org/index.php?title=AEC_Free_Software_directory#Schematic_design

    brunopostle
  • edited May 2021

    I posted this on the Geometry Nodes thread already, but wanted to share it here as well. It's so interesting how the ability to nest parametric controls in Geo Nodes enable fairly interesting configurations. Should make a powerful combination with Homemaker:

    brunopostlepaulleegokermu
  • I've uploaded an experimental test of a Linux Homemaker add-on package for blender. It works for me, but I can see that there may be issues on other systems as there are some complex dependencies and there is a lot to go wrong, I'd like to see any error messages, but if it works then that would be even better.

    A Windows package will take a bit more work, so sorry not yet.

    bitacovirdimitaralfredoangeles
  • @brunopostle said:
    A Windows package will take a bit more work, so sorry not yet.

    Will be really looking forward to the Windows package! Will also test the linux package

  • edited May 2021

    Hi @brunopostle
    Setup under linux Mint (latest) report missing / wrong version for GLIBC (latest ubuntu available glibc is 2.31)

    addon_utils.disable: homemaker not disabled
    Modules Installed (homemaker) from '/home/user_name/Downloads/blender-homemaker-2021-05-27-py39-linux-x86_64.zip' into '/home/user_name/.config/blender/2.93/scripts/addons'
    (Re-)building pre-compiled headers (options: -O2 -mavx); this may take a minute ...
    Traceback (most recent call last):
      File "/home/user_name/Softs/blender-2.93.0-aa95f8019e42-linux64/2.93/scripts/modules/addon_utils.py", line 351, in enable
        mod = __import__(module_name)
      File "/home/user_name/.config/blender/2.93/scripts/addons/homemaker/__init__.py", line 8, in <module>
        from topologic import Vertex, Face, CellComplex, Graph
      File "/home/user_name/.config/blender/2.93/scripts/addons/homemaker/libs/site/packages/topologic/__init__.py", line 27, in <module>
        import cppyy
      File "/home/user_name/.config/blender/2.93/scripts/addons/homemaker/libs/site/packages/cppyy/__init__.py", line 74, in <module>
        from ._cpython_cppyy import *
      File "/home/user_name/.config/blender/2.93/scripts/addons/homemaker/libs/site/packages/cppyy/_cpython_cppyy.py", line 21, in <module>
        import libcppyy as _backend
    ImportError: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /home/user_name/.config/blender/2.93/scripts/addons/homemaker/libs/site/packages/libcppyy.cpython-39-x86_64-linux-gnu.so)
    
  • @stephen_l thanks for testing, this is a problem with creating these packages with the latest fedora. It looks like the solution is to use a 'manylinux2014' docker image, and build everything in that, this may take a while :(

  • just crash.

    • Kubuntu 20.04
    • blender 2.92 and 2.82a

      (

  • edited May 2021

    @alfredoangeles said:
    just crash.

    • Kubuntu 20.04
    • blender 2.92 and 2.82a

      (

    python 3.9 will only work under 2.93+

    bitacovir
  • I have uploaded another experimental test of a Linux Homemaker add-on package for blender.

    I have built this using debian buster docker images, so it should work on any recent linux distribution with glibc 2.28 or later. I also hadn't realised that expecting python 3.9 was a bit ambitious, so there are two downloads, one for python 3.7 and one for python 3.9.

    It works for me, but even if it doesn't work, I would like to see any error messages.

    bitacovirstephen_l
  • edited June 2021

    Under blender 2.93
    ModuleNotFoundError: No module named 'yaml'
    But the good news is once pyyaml installed it does work as expected.
    Have a small class to setup python modules from blender itself https://github.com/s-leger/blender-pip

    brunopostle
  • @stephen_l this is actually encouraging. yaml is imported later, so topologic and the cppyy stack is probably imported ok. I'll do another bundle with yaml included.

  • Here are some new Homemaker add-on packages for Linux now containing the yaml module, please test

  • Hi @brunopostle as reported on github, it is now working as expected under Mint (latest) so i guess will also apply for recent ubuntu distos.
    Should probalbly take a closer look at Fedora, but old apt habits make it hard to switch.

    brunopostle
  • edited June 2021

    Install OK
    But when I try to activate...
    (Re-)building pre-compiled headers (options: -O2 -mavx); this may take a minute ...
    sh: 1: /home/alfkubuntu/.config/blender/2.93/scripts/addons/homemaker/libs/site/packages/cppyy_backend/etc/gdb-backtrace.sh: Permission denied
    Segmentation fault (core dumped)
    ===== System ======
    Blender 2.93
    Blenderbim 0.0.210605
    Operating System: Kubuntu 20.04
    KDE Plasma Version: 5.18.5
    KDE Frameworks Version: 5.68.0
    Qt Version: 5.12.8
    Kernel Version: 5.8.0-53-generic
    OS Type: 64-bit
    Processors: 16 × Intel® Core™ i9-9900K CPU @ 3.60GHz
    Memory: 31.3 GiB of RAM

  • @alfredoangeles said:
    (Re-)building pre-compiled headers (options: -O2 -mavx); this may take a minute ...
    sh: 1: /home/alfkubuntu/.config/blender/2.93/scripts/addons/homemaker/libs/site/packages/cppyy_backend/etc/gdb-backtrace.sh: Permission denied
    Segmentation fault (core dumped)

    Thanks, the 'permission denied' error is caused by blender removing the executable bit from all add-on files, please can you make the file executable like this:

    chmod +x /home/alfkubuntu/.config/blender/2.93/scripts/addons/homemaker/libs/site/packages/cppyy_backend/etc/gdb-backtrace.sh
    

    This should give a better error message if you try and activate the add-on again.

  • edited June 2021

    Strange, had no such issue under Mint. The message "(Re-)building pre-compiled headers (options: -O2 -mavx); this may take a minute ..." was same, but no right issue.
    gdb-backtrace.sh is not "executable" here.

  • I don't pretend to understand all that cppyy is doing here - cppyy is a piece of magic, generating python APIs for C++ libraries on the fly with no configuration - the problem is that to make a downloadable blender add-on that contains Topologic we need to bundle the whole thing, including a modified clang compiler and all these other tools. But it looks to me that gbd-backtrace.sh is a tool that cppyy runs to provide information after it has already crashed, which explains why we haven't seen this error before, by fixing the executable bit it might tell us why it crashed.

  • I updated the Homemaker add-on packages for Linux, they now include a pre-compiled header file - previously the PCH file was generated on first-run by collecting headers from the user's system, which made the download smaller, but was a potential failure point.

    Moult
  • edited June 2021

    I tried the Python 3.7 version on 2.91 and got this:

    Modules Installed (homemaker) from '/home/dion/Downloads/blender-homemaker-2021-06-06-py37-linux-x86_64.zip' into '/home/dion/.config/blender/2.91/scripts/addons'
    (Re-)building pre-compiled headers (options: -O2 -mavx); this may take a minute ...
    Traceback (most recent call last):
      File "/home/dion/drive/blender/blender-2.91.0-linux64/2.91/scripts/modules/addon_utils.py", line 351, in enable
        mod = __import__(module_name)
      File "/home/dion/.config/blender/2.91/scripts/addons/homemaker/__init__.py", line 9, in <module>
        from topologic import Vertex, Face, CellComplex, Graph
      File "/home/dion/.config/blender/2.91/scripts/addons/homemaker/libs/site/packages/topologic/__init__.py", line 29, in <module>
        import cppyy
      File "/home/dion/.config/blender/2.91/scripts/addons/homemaker/libs/site/packages/cppyy/__init__.py", line 74, in <module>
        from ._cpython_cppyy import *
      File "/home/dion/.config/blender/2.91/scripts/addons/homemaker/libs/site/packages/cppyy/_cpython_cppyy.py", line 21, in <module>
        import libcppyy as _backend
    ImportError: libpython3.7m.so.1.0: cannot open shared object file: No such file or directory
    

    I find it strange because Blender 2.91 is 3.7, so perhaps it is looking for my system Python, not Blender Python. My system has 3.8 and 3.9.

  • @Moult does your blender installation include a libpython3.7m.so.1.0?

  • @brunopostle

    $ find . -type f -iname "*libpython*"
    ./2.91/python/lib/python3.7/config-3.7m-x86_64-linux-gnu/libpython3.7m.a
    
  • edited June 2021

    @Moult Blender ships with a static .a library, what use could that possibly be? @stephen_l are you using a blender downloaded from blender.org too?

Sign In or Register to comment.