I've written a short HOWTO showing the creation of a basic Homemaker style. This covers assembling a Window family, a Wall Type, and how to configure the style for Homemaker.
I've written a short HOWTO showing the creation of a basic Homemaker style. This covers assembling a Window family, a Wall Type, and how to configure the style for Homemaker.
Hello @brunopostle, I've started following your initial exercises from the homemaker with the 2023-05-29 release. I'm working with Windows 10 and Blender version 3.6.2, along with BlenderBIM 0.0.230821.
I believe my computer is powerful enough (Core i7 and 32GB of RAM), but when I have a somewhat complex topology and I run Homemaker, it takes a long time to complete the operation ( Blender not responding message included ). Is this normal or is there something I can do to fix it? Thanks in advance.
@jsoler it depends on how complex your complex model is. The two things that take the most time are finding the CellComplex, and generating the IFC entities, actually loading the model in BlenderBIM is now very fast.
Feel free to share a model that is slow, I'll investigate.
You can try modelling your building in parts, and generating the IFC incrementally. ie. if you generate one building from a mesh called 'Cube', the IFC building will be named 'Cube'. If you then generate from another mesh called 'Cube', then these new elements will be added to the same building. You may need to fix some entities where they need to join, but this technique should scale.
@brunopostle I send you the IFC file from one of your tutorials. Creating the topology took about two and a half minutes, whereas in your tutorial, I saw it took just one second. In the .blend file, the model is present with the Simple Deform modifier that you applied, but it's not working for me.
@jsoler I'll have a look at the files tomorrow. In some of these videos (not all) I have cut out the bits where nothing happens (in particular "model a building in five minutes" is heavily edited to squeeze it into a presentation slot).
@jsoler It takes three minutes here: 30 seconds to find the CellComplex (I'm sure this could be much more efficient, but it wouldn't make much difference in this case), 140 seconds to build the IFC model, and 10 seconds to load the model into BlenderBIM (loading is very fast).
I'm sure there is optimisation that can be done, but Homemaker is doing a lot of stuff assembling an entire BIM model, so it is never going to be as instant as I would like.
Homemaker used to automatically apply modifiers, but I disabled this, I'm not entirely sure why. So for now you need to 'apply' the modifier before running Homemaker (I also had to rotate the mesh by 90 degrees because the blender 'simple deform bend' modifier only bends from left to right):
Thank you @brunopostle for your help:)
Hi,
I thought I'd share with you this test that I conducted today. It iteratively created cellComplexes with increasing number of Cells (I used CellComplex.Prism with nSides on each dimension increasing from 1 to 20. And I measured the time it took to create each CellComplex. Topologic is not a speed daemon, but I was happy to see that it completed all 20 CellComplexes and did not crash. 1000 cells take 89 seconds, but then it starts consuming more time on a curve rather than a straight line. I am glad, however, that creating a CellComplex was not the slowest part of the process above. In my tests, 30 seconds were needed to create 500 Cells (in jupyter notebook with pure python, no graphics). Wondering how many cells are in that building?
@topologic there are 569 faces and 76 cells in this CellComplex
@brunopostle said:
@topologic there are 569 faces and 76 cells in this CellComplex
Oh then that is far slower than just running it in jupyter notebook. I wonder if Blender is slowing it down. Would you be able to send me or post here a brep of the basic cells that build the CellComplex (eg a Cluster or even a CellComplex). I can decompose into cells and rebuild it and measure how long it takes. Thanks!
@brunopostle Do you include dictionary transfer in your computation or just pure geometric processing to build a CellComplex? The chart I provided is the latter.
@topologic Ah you are right, (on my slow laptop) generating the CellComplex takes 6 seconds and transferring the dictionary takes 100 seconds.
I'm iterating with InternalVertex()
and IsInside()
, this method isn't particularly optimised.
@brunopostle Indeed InternalVertex and IsInside are computationally very expensive. I would love for a python guru to try and optimise them and speed them up. I've experimented with K-D Trees etc, but was getting inaccurate results. I believe multi-threading or multi-processing might be a way to speed them up.
@topologic I can see how my method can be optimised by inverting the loop, but this would only halve the number of comparisons.
It could also be optimised by only looking at face pairs that have parallel normals.
I'm testing Face.IsInside now. It is horrendously slow. I'm going on a mission to optimise it.
@brunopostle said:
@topologic I can see how my method can be optimised by inverting the loop, but this would only halve the number of comparisons.
It could also be optimised by only looking at face pairs that have parallel normals.
Filtering by normal brings down the dictionary transfer from 100 to 42 seconds. This is the orthogonal model where lots of faces share normals, the 'bent' version is faster at 28 seconds (proof that buildings should always be a bit wonky).
@topologic said:
I'm testing Face.IsInside now. It is horrendously slow. I'm going on a mission to optimise it.
Just chip in to ask if this Face.IsInside is original OCC method? (supposedly 'inherited' to FreeCAD Part module, basically OCC)
Studying TopologicPY, some initial observation , e.g.
it seems the Shell.ExternalBoundary method is mainly python code,
whilst CellComplex.ExternalBoundary method just return its 'inherent' (C++?) method.
I learned from @topologic earlier code to find external face mainly by python, but I just find FreeCAD Part module already provide something fundamental which seems to be C++ method (hopefully faster).
Just wondering if OCC, like FreeCAD (Part Module), already provide some C++ method to TopologicPy which would be less rely on Python and be more efficient ?
Thanks :)
FreeCAD Part/OCC method -
e.g.
e = shell.getFreeEdges() # Basically returning 'external' edges
Topologic / TopologicPy Earlier Reference Code -
def get_internal_faces(cellComplex):
internal_faces = []
faces = []
_ = cellComplex.Faces(None, faces)
#topologic.CellComplex.Faces(cellComplex, faces)
print(" faces are - ", faces)
for face in faces:
cells = []
_ = face.Cells(cellComplex, cells)
#_ = topologic.CellComplex.Faces(cellComplex, faces)
if len(cells) > 1:
internal_faces.append(face)
return topologic.Cluster.ByTopologies(internal_faces)
@brunopostle said:
Filtering by normal brings down the dictionary transfer from 100 to 42 seconds. This is the orthogonal model where lots of faces share normals, the 'bent' version is faster at 28 seconds (proof that buildings should always be a bit wonky).
Not sure how "filtering by normal" helps in the general case of finding if a vertex is inside a face. Do you think it is specific to your workflow or is it something that topologicpy should include as an improvement?
@paullee My strategy regarding topologic vs. topologicpy is to not touch the C++ topologic code as it is used by others such as Homemaker. If I find that the code is buggy or limited, I augment it with python code in topologicpy. So sometimes, toplogicpy is just a wrapper and sometimes it is a whole method written mainly in python with some basic calls to topologic to return topologic entities.
Face.IsInside is an example of the latter, but sadly it doesn't seem to be faster and may be much slower than the built-in method. I am going to test and report back.
Did you consider https://dev.opencascade.org/doc/refman/html/class_b_rep_top_adaptor___f_class2d.html ?
@aothms said:
Did you consider https://dev.opencascade.org/doc/refman/html/class_b_rep_top_adaptor___f_class2d.html ?
As I said, sadly I am not interfacing with OCC directly and I am not touching topologic which does interface with OCC. If someone can do a PR on topologic (core) that improves it, that would be amazing help.
Yes our messages just crossed. I won't have time PR'ing anytime soon, but I have some experience with OCC, so I'm available in case somebody needs help navigating the OCC api. Maybe there is also some case to introduce PythonOCC. That's basically what we do with IfcOpenShell, we just serialize the OCC shapes between C++ and Python (both ways) as strings.
@aothms said:
… Maybe there is also some case to introduce PythonOCC.
Stay tuned. ?
@topologic said:
@brunopostle said:
Filtering by normal brings down the dictionary transfer from 100 to 42 seconds.
Not sure how "filtering by normal" helps in the general case of finding if a vertex is inside a face. Do you think it is specific to your workflow or is it something that topologicpy should include as an improvement?
This is in my method for copying dictionaries from the Face set to the resulting CellComplex. If I can easily discard some impossible source/destination combinations then I don't have to do as many expensive IsInside() checks.
(I would do better with a proper check for coplanar faces, but parallel faces will do for now)
First time properly running Homemaker ( I tried in 2021, but I gave up. I have been paying attention ever since though). The installation was a challenge - as per the req's on the github page, I started downloading all the packages. I started even installing VS 2022 but then call the c++ build size being 7gbs+! (is that still needed?) I thought I would give it a crack to run without the C++ thingy. But homemaker could not find my topologic. I installed it to the python version in win11 that's on the C drive, not the one in Blender, so I assume that was the error?
Then I decided to read this whole thread (took a while), and just downloaded the latest packaged release on Windows, and it just works! Great job at making that work well! I would suggest that in the github info, there are install instructions that show that people can either download releases on the release page, and then additionally for those willing to compile things themselves show those instructions.
As for usability, again, it took me quite a bit of poking around until finding how to run Homemaker. I just pressed F3 and search for homemaker command initially. Then I saw the separate manual. It has a getting started section. Nice! But I still missed it.
In regards to the styles, the documentation is pretty clear : "The styles shipped with the add-on are a bit limited, they are named: ‘default’, ‘courtyard’, ‘framing’, ‘cinema’, ‘fancy’, ‘pantsy’, ‘arcade’, ‘rustic’ and ‘tuscan’." The convention for the styles folder organisation with the yml files and reference to the objects in the IFC, less so. I am particularly interested to understand the system better in order to try and generate a new style
Further questions - is it possible to edit a shape after it has been generated? I can't find the original massing in the outliner. I saw a really nice video demo of a shape deformed on a curve and being updated.
As for speed, this took approximately 2 mins on a AMD Ryzen 7 5800X running at 4.3 ghz. It seems to have generated about 1100 components or so.
As for multiple buildings in the same file - what is the current best practice? I duplicated the empty called "IfcSite/Site Plane.001" which automatically made it's collection organisation. However, when I generated a second massing, both buildings seems to be placed in the same collection.
@brunopostle would you be interested in a hands-on recorded session addressing these queries to help users understand how to navigate Homemaker. I did one with Dion on BlenderBIM which worked really well (sadly I waited too long to publish it and now it's completely outdated) I searched around youtube, thinking perhaps you may have done something of the sort for an osarch monthly meeting or speaking with someone else about it, but couldn't find anything. If it does exist, do let us know.
Also, I saw this mentioned in the thread that is an excellent source for creating styles. It seems like creating a style is a fairly intensive endeavor. https://github.com/brunopostle/homemaker-addon/wiki/Creating-a-Window-family. However, I don't think there is a link to this on the front page or in the readthedocs reference.
Here is what I am running at the moment, which seems to play nice: Blender 3.6.4, BlenderBIM nightly 231002, and the latest release of Homemaker Topologise 2023-05-29 (it may be useful to add "version" to the BL_info snippet in the addon to be able to identify). Also, for location 3d Viewport > Obect Menu > Homemaker might be easier to understand.
And my play file is attached. How would I go about creating some sort of front entrance situation? I suppose it would be dividing the facade and creating a new material that has doors or things looking like doors.
Login or Register to reply.