@topologic said: @Cladius76 Your object needs to be air/water-tight. Look at it carefully and you will see that it is open to the outside. The pitched roofs are missing the gables and the top of the cube seems open as well. In that case Topologic cannot convert it into a CellComplex to give to Homemaker.
Thanks for your help :) I tried that before every time cube or plane objects keeps disappearing! Sometimes both objects!! :/
@Cladius76 this last image has worked, if you go into edit mode you can see how the Topologise tool has divided the cube into three cells - if you just want the lower cell, you can just delete everything else and run Homemaker Topologise, or go back and delete the top face from the cube.
@brunopostle said: @Cladius76 this last image has worked, if you go into edit mode you can see how the Topologise tool has divided the cube into three cells - if you just want the lower cell, you can just delete everything else and run Homemaker Topologise, or go back and delete the top face from the cube.
@brunopostle@topologic I have a question! If i would like to make an alley scene or part of city, how it's work??? Because when i'm using object more than one for building or for each floor level of building it's not working..Should i use one piece of city plan or something???
@Cladius76 That is a question for @brunopostle. Topologic provides only some of the lower level functionality in homemaker. But I have seen Bruno’s alley model some time ago so it must be possible.
@topologic said: @Cladius76 That is a question for @brunopostle. Topologic provides only some of the lower level functionality in homemaker. But I have seen Bruno’s alley model some time ago so it must be possible.
That's super cool :)) But i'm still don't know how to do that :((
@brunopostle & @topologic you guys are making magic here, with Topologic and Homemaker being able to work together with BlenderBIM, I imagine so many possible workflows, which is the real success here. I am interested in how the Asset Browser in Blender 3 can be used to drop schematic components into a concept design and what Topologic and Homemaker can be do to develop the concept while measuring and testing. When the time comes could more detailed building components be dropped in from the Asset Browser automatically replacing the concept 'placeholder' components. Exciting times
@topologic@Cladius76 that alley scene was done by creating buildings one at a time.
But blenderbim was refactored since then, and it is now only possible to have a single IFC Project in blender at once (which makes sense, my previous multi-project models couldn't be exported to IFC). So creating the second building fails.
However IFC does support multiple buildings in a single project. So we can fix this.
@Moult is there a way to import an IFC file and merge it with the current project? Cool features would be options to merge, or replace, or automatically rename Project Library and Building objects based on their Name attributes. (I'd still like to someday move the add-on away from the current system where it writes an IFC file to disk and then re-imports it, in which case adding a new building to the current project would be straightforward)
But blenderbim was refactored since then, and it is now only possible to have a single IFC Project in blender at once (which makes sense, my previous multi-project models couldn't be exported to IFC). So creating the second building fails.
However IFC does support multiple buildings in a single project. So we can fix this.
Hello Bruno..I would like to ask you will be available soon??
@Cladius76 I don't think the Homemaker add-on will support multiple buildings in the same IFC project again very soon.
But if you are not concerned with generating IFC data, you can copy and paste the generated buildings into a new blender project, and have as many as you like.
@JuhaW the issue is that I'm writing a temporary IFC project file to disk, and then using blenderbim to import it, which then creates the IFC data model and blender 3D geometry in blenderbim. If I then import another IFC project (by running Homemaker Topologise again for a new building), blenderbim gets into a big mess.
So solutions would be: 1. for blenderbim to be able to import another IFC and merge into a single project somehow, I can see that this functionality might be some time off in the future; 2. Homemaker could just delete any existing IFC model, but leaving any existing 3D blender geometry, and create a new IFC model for the new building; 3. Homemaker could be fixed to not require the temporary file and manipulate blenderbim directly.
Number 3 seems best, but one of the advantages of the current approach is that the add-on has no real dependency on blender, it is all entirely ifcopenshell, so it would be trivially easy to port to FreeCAD, or run server-side to deliver the bim model in a browser using IFC.js, etc..
I'm not sure if it should be added to import_ifc() it's a bit destructive also that it completely eradicates any further IfcProject (not sure how problematic that is precisely in practice) and it doesn't really match the advertised native authoring concept in the sense that an import modifies the data structures. Maybe @Moult can comment.
Late to the party, but what about simply working live in IFC, and incrementally partially import new things? You can use the IfcOpenShell API to build up relationships.
@Moult because I don't know how to do it :) or rather have never got a grasp on what is going on in blenderbim. There is an IfcStore (singleton?) that holds the IFC data, and a whole lot of methods in import_ifc that build blender collections and blender geometry based on this?
I see (I think) that import_ifc doesn't need an actual file on the filesystem, so I plan to play with this.
@brunopostle yes, there is a IfcStore singleton (though to be superseded by blenderbim.tool.Ifc). The import_ifc indeed creates Blender geometry, materials, and assigns collections but it was initially designed to be a monolithic import and has been slowly broken down into a more granular capabilities (to make it easier to import a single element for example). Indeed it doesn't need a file on the filesystem. It's messy, but here are some examples of using import_ifc to bring individual elements and materials into Blender: https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.7.0/src/blenderbim/blenderbim/bim/module/project/operator.py#L379-L435
@aothms@Moult thanks, with this prompting I now have blenderbim importing the generated IFC model without a temporary file; and based on the MergeProject ifcpatch recipe, the Homemaker add-on now merges multiple buildings into the same project (though I seem to lose material styles along the way).
@brunopostle said: @aothms@Moult thanks, with this prompting I now have blenderbim importing the generated IFC model without a temporary file; and based on the MergeProject ifcpatch recipe, the Homemaker add-on now merges multiple buildings into the same project (though I seem to lose material styles along the way).
It would be great if you make a video which shows how to do that :)
@Cladius76 you can now just select multiple objects and multiple IFC buildings will be created, or create IFC buildings one at a time from different objects
though I seem to lose material styles along the way
It's probably because when you do file.add() ifcopenshell traverses forward attributes, but sadly the style association StyledByItem is an inverse relationship on the representation item. So when you do a file.add(inst) you can do a:
def flatmap(func, *iterable):
return itertools.chain.from_iterable(map(func, *iterable))
insts = file.traverse(inst)
items = filter(lambda i: i.is_a("IfcRepresentationItem"), insts)
styles = flatmap(operator.itemgetter("StyledByItem"), items)
for st in styles:
file.add(st)
(If you have the styles as IfcMaterialDefinitionRepresentation it'd be a bit different)
If you are transferring objects from one IFC file object to another, try look at the append asset usecase. It already has code which accounts for what @aothms is referring to, though currently it only talks about types and not instances (since it was designed first for project libraries). If you tweak it we can add a new function in the blenderbim add-on to append instances from any file. https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.7.0/src/ifcopenshell-python/ifcopenshell/api/project/append_asset.py
This is a test of packaging the Homemaker add-on and dependencies for linux, Windows and Mac.
This release includes lots of changes:
The default cell type is now always 'living' for untagged cells. If you want an 'outside' space then it needs to be tagged as such with a widget. This was causing some confusion.
Blender can easily create non-planar faces, which Topologic doesn't like (bug #12). The add-on now triangulates non-planar faces and styles them in red as 'nonplanar' (elkmug).
Windows in gables could previously extend outside the wall (bug #11). They are now sized or removed to fit.
Non-vertical geometries such as roofs and soffits were not styled (bug #16), this is now fixed.
The add-on no-longer makes-use of a temporary IFC file (bug #13).
Multiple buildings can now be assembled and they are all added to the same IFC Project.
This is a test of packaging the Homemaker add-on and dependencies for Linux, Windows and Mac.
This release includes lots of changes:
Various caching interventions and workarounds for issues in Topologic (some C++ help here would be appreciated), these should greatly speed up processing, though mainly on Windows for now
An initial pattern language assessment framework
New do_representation style parameter, can create elements without representation. So, for example, IfcSpace elements can be created that have no geometry in the model, but which still have the correct semantic structure with space boundaries etc...
IfcVirtualElement Repeat object skips representation the same as Floors, Walls etc.. useful for recursive Repeat objects
Fix bug, Floor and Space classes are now stylable, reported by @fbpyr
Just a heads up @brunopostle that as of today's commit the append_asset API now also supports appending occurrences and will retain all properties, materials, styles, and types.
@Moult said:
the append_asset API now also supports appending occurrences and will retain all properties, materials, styles, and types.
I'm not sure how to use this api. I currently have this function to merge everything from a 'source' file into the current file (this doesn't copy materials):
def merge_file(self, source):
original_project = self.by_type("IfcProject")[0]
temp_project = self.add(source.by_type("IfcProject")[0])
for element in source.by_type("IfcRoot"):
self.add(element)
for element in self.get_inverse(temp_project):
ifcopenshell.util.element.replace_attribute(
element, temp_project, original_project
)
self.remove(temp_project)
If I replace the add() method with the new api, everything gets copied over but with no hierarchy, it is just a collection of objects:
def merge_file(self, source):
original_project = self.by_type("IfcProject")[0]
temp_project = self.add(source.by_type("IfcProject")[0])
for element in source.by_type("IfcRoot"):
run(
"project.append_asset",
self,
library=source,
element=element
)
for element in self.get_inverse(temp_project):
ifcopenshell.util.element.replace_attribute(
element, temp_project, original_project
)
self.remove(temp_project)
Hmm yes the append_asset only imports the occurrence and makes no assumption about the hierarchy. The ExtractElements recipe goes a little further and imports both occurrences (via the append_asset API) and also a bit of the spatial hierarchy.
Comments
Thanks for your help :) I tried that before every time cube or plane objects keeps disappearing! Sometimes both objects!! :/
Or like that ...
@Cladius76 this last image has worked, if you go into edit mode you can see how the Topologise tool has divided the cube into three cells - if you just want the lower cell, you can just delete everything else and run Homemaker Topologise, or go back and delete the top face from the cube.
Here is a posible workflow if you want to use Topologic to create the basic geometry for Homemaker.
This is cool..Thank you so much! :)
I deleted all file i will try again that...
@brunopostle @topologic I have a question! If i would like to make an alley scene or part of city, how it's work??? Because when i'm using object more than one for building or for each floor level of building it's not working..Should i use one piece of city plan or something???
@Cladius76 That is a question for @brunopostle. Topologic provides only some of the lower level functionality in homemaker. But I have seen Bruno’s alley model some time ago so it must be possible.
That's super cool :)) But i'm still don't know how to do that :((
@brunopostle & @topologic you guys are making magic here, with Topologic and Homemaker being able to work together with BlenderBIM, I imagine so many possible workflows, which is the real success here. I am interested in how the Asset Browser in Blender 3 can be used to drop schematic components into a concept design and what Topologic and Homemaker can be do to develop the concept while measuring and testing. When the time comes could more detailed building components be dropped in from the Asset Browser automatically replacing the concept 'placeholder' components. Exciting times
@topologic @Cladius76 that alley scene was done by creating buildings one at a time.
But blenderbim was refactored since then, and it is now only possible to have a single IFC Project in blender at once (which makes sense, my previous multi-project models couldn't be exported to IFC). So creating the second building fails.
However IFC does support multiple buildings in a single project. So we can fix this.
@Moult is there a way to import an IFC file and merge it with the current project? Cool features would be options to merge, or replace, or automatically rename Project Library and Building objects based on their Name attributes. (I'd still like to someday move the add-on away from the current system where it writes an IFC file to disk and then re-imports it, in which case adding a new building to the current project would be straightforward)
Hello Bruno..I would like to ask you will be available soon??
@Cladius76 I don't think the Homemaker add-on will support multiple buildings in the same IFC project again very soon.
But if you are not concerned with generating IFC data, you can copy and paste the generated buildings into a new blender project, and have as many as you like.
@JuhaW the issue is that I'm writing a temporary IFC project file to disk, and then using blenderbim to import it, which then creates the IFC data model and blender 3D geometry in blenderbim. If I then import another IFC project (by running Homemaker Topologise again for a new building), blenderbim gets into a big mess.
So solutions would be: 1. for blenderbim to be able to import another IFC and merge into a single project somehow, I can see that this functionality might be some time off in the future; 2. Homemaker could just delete any existing IFC model, but leaving any existing 3D blender geometry, and create a new IFC model for the new building; 3. Homemaker could be fixed to not require the temporary file and manipulate blenderbim directly.
Number 3 seems best, but one of the advantages of the current approach is that the add-on has no real dependency on blender, it is all entirely ifcopenshell, so it would be trivially easy to port to FreeCAD, or run server-side to deliver the bim model in a browser using IFC.js, etc..
For merging IFC files (and then to contain only a single IfcProject) have you tried this: https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.7.0/src/ifcpatch/ifcpatch/recipes/MergeProject.py
@aothms thanks, I see how that works, I'm thinking that this merge-project functionality needs to be added to
blenderbim.bim.import_ifc
.On actually reading
import_ifc
, I see various things I could be doing better, I'll do some experiments.I'm not sure if it should be added to import_ifc() it's a bit destructive also that it completely eradicates any further IfcProject (not sure how problematic that is precisely in practice) and it doesn't really match the advertised native authoring concept in the sense that an import modifies the data structures. Maybe @Moult can comment.
Late to the party, but what about simply working live in IFC, and incrementally partially import new things? You can use the IfcOpenShell API to build up relationships.
@Moult because I don't know how to do it :) or rather have never got a grasp on what is going on in blenderbim. There is an
IfcStore
(singleton?) that holds the IFC data, and a whole lot of methods inimport_ifc
that build blender collections and blender geometry based on this?I see (I think) that
import_ifc
doesn't need an actual file on the filesystem, so I plan to play with this.@brunopostle yes, there is a IfcStore singleton (though to be superseded by blenderbim.tool.Ifc). The import_ifc indeed creates Blender geometry, materials, and assigns collections but it was initially designed to be a monolithic import and has been slowly broken down into a more granular capabilities (to make it easier to import a single element for example). Indeed it doesn't need a file on the filesystem. It's messy, but here are some examples of using import_ifc to bring individual elements and materials into Blender: https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.7.0/src/blenderbim/blenderbim/bim/module/project/operator.py#L379-L435
@aothms @Moult thanks, with this prompting I now have blenderbim importing the generated IFC model without a temporary file; and based on the
MergeProject
ifcpatch recipe, the Homemaker add-on now merges multiple buildings into the same project (though I seem to lose material styles along the way).It would be great if you make a video which shows how to do that :)
@Cladius76 you can now just select multiple objects and multiple IFC buildings will be created, or create IFC buildings one at a time from different objects
It's probably because when you do
file.add()
ifcopenshell traverses forward attributes, but sadly the style association StyledByItem is an inverse relationship on the representation item. So when you do afile.add(inst)
you can do a:(If you have the styles as IfcMaterialDefinitionRepresentation it'd be a bit different)
If you are transferring objects from one IFC file object to another, try look at the append asset usecase. It already has code which accounts for what @aothms is referring to, though currently it only talks about types and not instances (since it was designed first for project libraries). If you tweak it we can add a new function in the blenderbim add-on to append instances from any file. https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.7.0/src/ifcopenshell-python/ifcopenshell/api/project/append_asset.py
Hope it helps :)
New blender-homemaker-2021-11-09 release
This is a test of packaging the Homemaker add-on and dependencies for linux, Windows and Mac.
This release includes lots of changes:
New blender-homemaker-2021-12-11 release
This is a test of packaging the Homemaker add-on and dependencies for Linux, Windows and Mac.
This release includes lots of changes:
do_representation
style parameter, can create elements without representation. So, for example, IfcSpace elements can be created that have no geometry in the model, but which still have the correct semantic structure with space boundaries etc...Just a heads up @brunopostle that as of today's commit the append_asset API now also supports appending occurrences and will retain all properties, materials, styles, and types.
Awesome, I tried (and failed) to fix this a couple of times, but got lost with all the backward and forward searches
I'm not sure how to use this api. I currently have this function to merge everything from a 'source' file into the current file (this doesn't copy materials):
If I replace the add() method with the new api, everything gets copied over but with no hierarchy, it is just a collection of objects:
Hmm yes the append_asset only imports the occurrence and makes no assumption about the hierarchy. The ExtractElements recipe goes a little further and imports both occurrences (via the append_asset API) and also a bit of the spatial hierarchy.
But if you want to import absolutely everything, maybe a better approach would be fixing this bug? https://github.com/IfcOpenShell/IfcOpenShell/issues/1000 If so I can have a go at it.