Skip to content

Blender ifc 2.80rc1 collections enhancement#641

Merged
Moult merged 4 commits intoIfcOpenShell:masterfrom
elmopl:blender_ifc_280rc1
Sep 3, 2019
Merged

Blender ifc 2.80rc1 collections enhancement#641
Moult merged 4 commits intoIfcOpenShell:masterfrom
elmopl:blender_ifc_280rc1

Conversation

@elmopl
Copy link
Copy Markdown
Contributor

@elmopl elmopl commented Jul 16, 2019

This fix helps with importing by creation nested collections according to layers that can be retrieved from IFC file.

image

@aothms
Copy link
Copy Markdown
Member

aothms commented Aug 4, 2019

Many thanks for this! Sorry for the delay. I hope to be able to have a look in the coming week.

@Moult
Copy link
Copy Markdown
Contributor

Moult commented Sep 3, 2019

I have tested a quick import and it seems to work great! See attached import.

2019-09-03-213145_1214x1048_scrot

It also seems as though we have both figured that Blender's collections feature does a great job of spatial decomposition! See: https://github.com/IfcOpenShell/IfcOpenShell/tree/v0.6.0/src/ifcblenderexport

If @aothms is OK with merging this, I'd be happy to do so, along with test it on a real project that we're doing in Blender right now :) And perhaps implement more tricks such as reusing mesh instances, and an option for putting the IFC class in the name as well as a custom property (it isn't necessary, but we found when it helps modelers stay organised and navigate the outliner)

@aothms
Copy link
Copy Markdown
Member

aothms commented Sep 3, 2019

If @aothms is OK with merging this

Yes, yes, yes.

And perhaps implement more tricks such as reusing mesh instances

There is a bug related to that. #661 https://sourceforge.net/p/ifcopenshell/discussion/1782718/

@elmopl
Copy link
Copy Markdown
Contributor Author

elmopl commented Sep 3, 2019

And perhaps implement more tricks such as reusing mesh instances

Looking at code it seems like it does that when loading (or am I missing something?)

    # MESH CREATION
    # Depending on version, geometry.id will be either int or str
    mesh_name = 'mesh-%r' % ob.geometry.id
    if mesh_name in bpy.data.meshes:
        me = bpy.data.meshes[mesh_name]
    else:

edit Just a bit slower than @aothms. That's a good bug. I haven't thought about it, but I think I could easily fix it.

IFC class in the name as well as a custom property

I was wondering if that would be helpful. This is the first time I am exposed to IFC files at all, so I don't really know all the quirks and relations you can store in that file.
I was wondering how much information is lost and whether it would be possible to pull out all data that IFC file contains so that you could re-save it without losing any data (or ideally without changing internal structure at all).

From other things I was also thinking about adding extra level collection geometry.
Currently I found it really annoying when I loaded a model of house that IIRC I couldn't easily hide ceiling bits as they were in structure above collection with walls.
I could make that change before this gets merged (or after, don't really mind).

@Moult Moult merged commit 032a474 into IfcOpenShell:master Sep 3, 2019
@Moult
Copy link
Copy Markdown
Contributor

Moult commented Sep 3, 2019

Also cherry picked the commits into v0.6.0 branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants