Homemaker add-on

2456710

Comments

  • edited June 2021

    @Moult I could bundle libpython3.7m.so.1.0 too, it is only another 3MB. Though I'm not sure how to get libcppyy to find it, I could know more about blender add-ons. [edit: or statically link libcppyy with the .a file shipped with blender itself]

  • @brunopostle alway download and setup "portables" version, as i must keep 2.79 / 2.81+ versions running in parallel.

  • I'm pretty much stuck here:

    The immediate problem is that the blender from blender.org has an embedded python 3.7 and doesn't provide libpython3.7m.so.1.0. The libcppyy in the homemaker add-on is linked to the missing libpython3.7m.so.1.0, hence the error cannot open shared object file: No such file or directory (the problem is the same with blender 2.93 which has an embedded python 3.9).

    This isn't a problem with a blender installed via .deb or .rpm on a Linux distribution as these use the system python, not embedded.

    I can fix it simply by putting a copy of libpython3.7m.so.1.0 into /usr/lib64. The Homemaker add-on bundle then runs in a blender from blender.org. I don't know how to do the same in an add-on, any ideas? It doesn't seem to be possible to modify the library path from within python.

    I managed to statically link libcppyy with the libpython3.7m.a file that blender.org provides, but I just get a double-free segfault when I try and use it.

    I'm packaging the Homemaker add-on here, but the problem will be the same with any other add-on that uses Topologic (such as the Topologic Sverchok nodes).

  • Sorry, I know nothing about linking and compiling, so my comments may be completely wrong, but I'll try anyway. When packaging OCC, the way I solved it was to look in Anaconda's repos, which were compiled with an RPATH that I had to follow. They did not seem to depend on this .so file. I'm not quite sure how they were built, but perhaps it might give a hint to a solution?

    brunopostletopologic
  • I know nothing about linking and compiling either, but from what I have been reading, creating an Anaconda recipe/package might be the way to go to include all dependencies etc.

    brunopostle
  • Thanks, I'd forgotten about rpath while trying to statically link everything. It looks like I need to do the same with TopologicCore and opencascade, as Topologic fails if there is a different system opencascade to the one in the bundle (and though I managed a statically linked TopologicCore.so, it failed with some undefined symbols that I couldn't debug).

  • There is huge difference between 2.92 and 2.92+, blender's own python will no more expose system's site_package to the interpreter !

    brunopostle
  • edited June 2021

    I've uploaded new Homemaker add-on packages for blender linux. This should fix the missing libpython file error, and fixes problems caused by different opencascade versions on the system. Please report any successes or failures.

    bitacovirAldo
  • Some further Homemaker blender add-on packages for linux. This release intends to fix a segfault at startup error. Please report any successes or failures.

    bitacovir
  • There is a new blender-homemaker-2021-06-13-linux-x86_64 release

    This is a test of packaging the Homemaker add-on and dependencies for linux.

    This release fixes some more file permission issues in cppyy and bundles some libstdc++ headers required on systems without a development environment.

    important note: On some systems there seems to be a conflict between the libGL.so shipped with blender downloaded from blender.org and the cppyy library used by the add-on. If you get a segfault when enabling the add-on, please try running the blender-softwaregl version of blender and report success or failure.

    I don't really expect it to work everywhere, but would like any error messages or any reports of success, please open an issue, or add a comment to an existing issue.

    Requirements

    • an x86_64 linux system with glibc 2.28 or later, this should be most linux systems.

    • Blender 2.80 or later

    • a linux blenderbim snapshot, or the current linux blenderbim v0.0.210605 release (or later)

    There are two linux downloads, download py37 or py39 to correspond to the version of python used by your blender (if you downloaded from blender.org then use the py37 file; unless you downloaded blender 2.93 or later, use the py39 file). If you got your blender via your linux distribution, then download whichever python is the default on your system.

    Install the add-on by browsing for the zip archive in the blender preferences, and enable.

    To test, select the default cube and choose 'Homemaker Topologise' in the 'Object' menu.

    Darth_BlenderMoult
  • Works 100% out of the box here! Fantastic!

    brunopostle
  • Hi @brunopostle. It almost worked for me. The plugin loads and activates in Preferences, but when I select the default cube and select Homemaker Topologise, I get the following error and nothing shows on screen:
    addon_utils.disable: blenderbim not disabled
    Modules Installed (blenderbim) from '/home/wassim/Downloads/blender28-bim-210610-py39-linux.zip' into '/home/wassim/.config/blender/2.92/scripts/addons'
    Python: Traceback (most recent call last):
    File "/home/wassim/.config/blender/2.92/scripts/addons/blenderbim/bim/module/drawing/operator.py", line 814, in execute
    "space.overlay.show_wireframes": space.overlay.show_wireframes,
    AttributeError: 'NoneType' object has no attribute 'overlay'

    location: /usr/share/blender/2.92/scripts/modules/bpy/ops.py:132
    Error: Python: Traceback (most recent call last):
    File "/home/wassim/.config/blender/2.92/scripts/addons/blenderbim/bim/module/drawing/operator.py", line 814, in execute
    "space.overlay.show_wireframes": space.overlay.show_wireframes,
    AttributeError: 'NoneType' object has no attribute 'overlay'

    location: /usr/share/blender/2.92/scripts/modules/bpy/ops.py:132

    Traceback (most recent call last):
    File "/home/wassim/.config/blender/2.92/scripts/addons/blenderbim/bim/init.py", line 106, in on_register
    handler.setDefaultProperties(scene)
    File "/home/wassim/.config/blender/2.92/scripts/addons/blenderbim/bim/handler.py", line 272, in setDefaultProperties
    bpy.ops.bim.save_drawing_style(index="2")
    File "/usr/share/blender/2.92/scripts/modules/bpy/ops.py", line 132, in call
    ret = _op_call(self.idname_py(), None, kw)
    RuntimeError: Error: Python: Traceback (most recent call last):
    File "/home/wassim/.config/blender/2.92/scripts/addons/blenderbim/bim/module/drawing/operator.py", line 814, in execute
    "space.overlay.show_wireframes": space.overlay.show_wireframes,
    AttributeError: 'NoneType' object has no attribute 'overlay'

    location: /usr/share/blender/2.92/scripts/modules/bpy/ops.py:132

    Python: Traceback (most recent call last):
    File "/home/wassim/.config/blender/2.92/scripts/addons/homemaker/init.py", line 106, in execute
    cc.ApplyDictionary(faces_ptr)
    AttributeError: 'CellComplex' object has no attribute 'ApplyDictionary'

    location: :-1
    Error: Python: Traceback (most recent call last):
    File "/home/wassim/.config/blender/2.92/scripts/addons/homemaker/init.py", line 106, in execute
    cc.ApplyDictionary(faces_ptr)
    AttributeError: 'CellComplex' object has no attribute 'ApplyDictionary'

    location: :-1

  • but the cool thing is that I can now go into the python console in Blender and type:
    import topologic
    and it works :)

  • Ooops sorry. I have to take that back. I have two versions of Blender (2.82 that uses python 3.8.6) and (2.93 that uses python 3.92). Homemaker for py 3.9 loaded on Blender 2.92 (despite the difference in python numbers), but crashes on activation in Blender 2.93. Happy to jump on a video call to show you and debug.

  • edited June 2021

    @Moult said:
    Works 100% out of the box here! Fantastic!

    Great, was this with the blender or blender-softwaregl executable? @topologic got it working just now using this workaround, though obviously blender is painfully slow without hardware acceleration.

  • Worked also for me with Blender 2.92.0 standard installation with the standard installation (the tar file from the website).
    Great!! I can now also try topologic!! :)

    topologicbrunopostle
  • @Jesusbill said:
    Worked also for me with Blender 2.92.0 standard installation with the standard installation (the tar file from the website).
    Great!! I can now also try topologic!! :)

    I am on it but the vaccine side effects hit me today. Hopefully this week I will replicate what @brunopostle had done with homemaker. We are getting there!

    Jesusbillbrunopostle
  • I used the standard blender executable.

    The first error looks like a BlenderBIM Add-on error. It suggests that you do not have a 3D view in Blender. Is that correct?

    brunopostle
  • *Sitting quietly while watching from the naughty corner with my Windows system.

    LaurensJNMoultJesusbill
  • @Jesusbill said:
    Worked also for me with Blender 2.92.0 standard installation with the standard installation (the tar file from the website).
    Great!! I can now also try topologic!! :)

    The topologic backend is already installed if you have the Homemaker add-on.
    You can then download and install the Topologic Sverchok nodes, but there is currently some Windows code that prevents it from running, edit ~/.config/blender/2.93/scripts/addons/topologicsverchok-main/__init__.py and comment-out lines 43, 44 & 45.

    @DADA_universe said:
    *Sitting quietly while watching from the naughty corner with my Windows system.

    There is a Windows add-on for Topologic, but it is 450MB and requires Visual Studio at runtime, hopefully this can be fixed.

    JesusbillDADA_universe
  • Did I mention that the Homemaker add-on library on doesn't depend on blender at all? There is a short script in the repository called brep2ifc.py that shows how you could use FreeCAD geometry to create IFC building models (it still needs a recent ifcopenshell python + topologic)

    agonzalezestevepaulleetopologic
  • Can you make a simple demo please ? :)

  • @paullee said:
    Can you make a simple demo please ? :)

    I have been concentrating on blender, so I haven't really investigated freecad, but at the moment you should be able to save a brep file (with planar faces only), run the brep2ifc.py script, and import the IFC result into freecad. Someone who understands a bit more about freecad ought to be able to skip the brep file step.

    paullee
  • @brunopostle said:
    Did I mention that the Homemaker add-on library on doesn't depend on blender at all? There is a short script in the repository called brep2ifc.py that shows how you could use FreeCAD geometry to create IFC building models (it still needs a recent ifcopenshell python + topologic)

    Topologic also doesn’t depend on blender. It can run as a python module from the console. Topologic-sverchok on the other hand runs with Blender.

  • I've uploaded a new linux blender-homemaker-2021-07-03-linux-x86_64 add-on.

    This release rolls-back the bundled cppyy from 2.0.0 to 1.9.6, this should resolve the segfault error on some systems that required disabling hardware graphics acceleration in the previous release. It also adds some new styling features and some example styles.

    I don't really expect it to work everywhere, but would like any error messages or any reports of success, please open an issue, or add a comment to an existing issue.

    Requirements

    There are two linux downloads, download py37 or py39 to correspond to the version of blenderbim that you have installed above (the blender download from blender.org uses py37, except 2.93 or later that uses py39).

    Install the add-on by browsing for the zip archive in the blender preferences, and enable (if you already have an older version of the add-on, uninstall it and restart blender before installing the newer add-on)

    To test, select the default cube and choose 'Homemaker Topologise' in the 'Object' menu.

  • Successful here, but must be enabled after blenderbim.
    Also conflict with archipack, will take a look at this, but i guess it is related to callbacks for object placement.

    brunopostle
  • Here's a short screencast of the Homemaker add-on, the styles are lifted from the Halifax Piece Hall.

    Although it looks quite elaborate, the final IFC file is only 800kB.

    I cut about half the video where nothing is happening while IFC data is generated. There is also a new Linux Homemaker add-on release, this one is about four times faster than before, though there is still an annoying bug that hugely slows everything down.

    paulleekaiaurelienzhbitacovirMoulttopologicJanFDADA_universecarlopavJQLdimitar
  • A bigger version of the same thing:

    stephen_lJesusbillbitacovirAceCyriltopologic
  • Will definitely be resharing these videos in the upcoming CAAD Futures talk! They are a great example of what homemaker can do.

    brunopostle
  • edited August 2021

    I uploaded a new blender-homemaker-2021-08-07-linux-x86_64 add-on as there have been changes in the add-on and in blenderbim that need to be kept in sync.

    This release includes:

    • Refactoring, bugfixes, and changes to keep up with the latest blenderbim
    • Allow setting Pset, PredefinedType and IfcMaterialLayerSet in style definitions
    • Repeating items can have alternative assets to fit different height spaces
    bitacovirMoult
Sign In or Register to comment.