KC NHA HIEU BO_IFC4.zip
I imported this IFC file into Blender and wrote a script to detect which elements are not created.
This IFC 4 Reference View file was exported from Revit 2020.1 using latest Ifc addon from github.
The following GlobalIds were missing in Blender:
2kVFptWd176wO4ktCInAJk
0NmcqWqOL3u9ea_SKNaatp
39vIVwXhn2WPb0FG46aWrB
0NmcqWqOL3u9ea_SKNaaUg
Blender Console window did not show anything related to those missing GlobalIds (I exported only 5 elements from Revit to make Blender Console log shorter)
Read prefs: C:\Users\HTL\AppData\Roaming\Blender Foundation\Blender\2.83\config\userpref.blend
found bundled python: C:\Program Files\Blender Foundation\Blender 2.83\2.83\python
Warning: class BIM_OT_copy_attributes_to_selection contains a property which should be an annotation!
C:\Users\HTL\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\blenderbim\bim\__init__.py:268
assign as a type annotation: BIM_OT_copy_attributes_to_selection.prop_base
assign as a type annotation: BIM_OT_copy_attributes_to_selection.prop_name
assign as a type annotation: BIM_OT_copy_attributes_to_selection.sub_props
assign as a type annotation: BIM_OT_copy_attributes_to_selection.collection_element
Warning: class BIM_OT_add_annotation contains a property which should be an annotation!
C:\Users\HTL\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\blenderbim\bim\__init__.py:268
assign as a type annotation: BIM_OT_add_annotation.obj_name
assign as a type annotation: BIM_OT_add_annotation.data_type
Info: Deleted 1 object(s)
Starting import process :: 0.00
Load existing rooted elements :: 0.00
Load diff :: 0.00
Caching file :: 0.00
Loading file :: 0.02
Setting file :: 0.00
Set vendor worksarounds :: 0.00
Calculate unit scale :: 0.00
Set units :: 0.00
Create contexts :: 0.00
Create project :: 0.00
Create classifications :: 0.00
Create constraints :: 0.00
Create doc info :: 0.00
Create doc refs :: 0.00
--- Logging error ---
Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 2.83\2.83\python\lib\logging\__init__.py", line 1028, in emit
stream.write(msg + self.terminator)
File "C:\Program Files\Blender Foundation\Blender 2.83\2.83\python\lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u1ea6' in position 85: character maps to <undefined>
Call stack:
File "C:\Users\HTL\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\blenderbim\bim\operator.py", line 89, in execute
ifc_importer.execute()
File "C:\Users\HTL\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\blenderbim\bim\import_ifc.py", line 314, in execute
self.create_spatial_hierarchy()
File "C:\Users\HTL\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\blenderbim\bim\import_ifc.py", line 1463, in create_spatial_hierarchy
self.add_related_objects(self.project['blender'], rel_aggregate.RelatedObjects)
File "C:\Users\HTL\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\blenderbim\bim\import_ifc.py", line 1483, in add_related_objects
self.add_related_objects(collection, rel_aggregate.RelatedObjects)
File "C:\Users\HTL\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\blenderbim\bim\import_ifc.py", line 1483, in add_related_objects
self.add_related_objects(collection, rel_aggregate.RelatedObjects)
File "C:\Users\HTL\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\blenderbim\bim\import_ifc.py", line 1477, in add_related_objects
obj = self.create_product(element)
File "C:\Users\HTL\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\blenderbim\bim\import_ifc.py", line 789, in create_product
self.ifc_import_settings.logger.info('Creating object {}'.format(element))
Message: "Creating object #180=IfcBuildingStorey('2kH1GlCOvEjuXPfxBpYaaL',#42,'TẦNG 5',$,'Level:UDIC - Level',#179,$,'TẦNG 5',.ELEMENT.,17350.)"
Arguments: ()
--- Logging error ---
Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 2.83\2.83\python\lib\logging\__init__.py", line 1028, in emit
stream.write(msg + self.terminator)
File "C:\Program Files\Blender Foundation\Blender 2.83\2.83\python\lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u1ea6' in position 85: character maps to <undefined>
Call stack:
File "C:\Users\HTL\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\blenderbim\bim\operator.py", line 89, in execute
ifc_importer.execute()
File "C:\Users\HTL\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\blenderbim\bim\import_ifc.py", line 314, in execute
self.create_spatial_hierarchy()
File "C:\Users\HTL\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\blenderbim\bim\import_ifc.py", line 1463, in create_spatial_hierarchy
self.add_related_objects(self.project['blender'], rel_aggregate.RelatedObjects)
File "C:\Users\HTL\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\blenderbim\bim\import_ifc.py", line 1483, in add_related_objects
self.add_related_objects(collection, rel_aggregate.RelatedObjects)
File "C:\Users\HTL\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\blenderbim\bim\import_ifc.py", line 1483, in add_related_objects
self.add_related_objects(collection, rel_aggregate.RelatedObjects)
File "C:\Users\HTL\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\blenderbim\bim\import_ifc.py", line 1477, in add_related_objects
obj = self.create_product(element)
File "C:\Users\HTL\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\blenderbim\bim\import_ifc.py", line 789, in create_product
self.ifc_import_settings.logger.info('Creating object {}'.format(element))
Message: "Creating object #204=IfcBuildingStorey('2kH1GlCOvEjuXPfxBpYaaH',#42,'TẦNG 9',$,'Level:UDIC - Level',#203,$,'TẦNG 9',.ELEMENT.,36050.)"
Arguments: ()
--- Logging error ---
Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 2.83\2.83\python\lib\logging\__init__.py", line 1028, in emit
stream.write(msg + self.terminator)
File "C:\Program Files\Blender Foundation\Blender 2.83\2.83\python\lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u1ea6' in position 85: character maps to <undefined>
Call stack:
File "C:\Users\HTL\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\blenderbim\bim\operator.py", line 89, in execute
ifc_importer.execute()
File "C:\Users\HTL\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\blenderbim\bim\import_ifc.py", line 314, in execute
self.create_spatial_hierarchy()
File "C:\Users\HTL\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\blenderbim\bim\import_ifc.py", line 1463, in create_spatial_hierarchy
self.add_related_objects(self.project['blender'], rel_aggregate.RelatedObjects)
File "C:\Users\HTL\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\blenderbim\bim\import_ifc.py", line 1483, in add_related_objects
self.add_related_objects(collection, rel_aggregate.RelatedObjects)
File "C:\Users\HTL\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\blenderbim\bim\import_ifc.py", line 1483, in add_related_objects
self.add_related_objects(collection, rel_aggregate.RelatedObjects)
File "C:\Users\HTL\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\blenderbim\bim\import_ifc.py", line 1477, in add_related_objects
obj = self.create_product(element)
File "C:\Users\HTL\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\blenderbim\bim\import_ifc.py", line 789, in create_product
self.ifc_import_settings.logger.info('Creating object {}'.format(element))
Message: "Creating object #210=IfcBuildingStorey('2kH1GlCOvEjuXPfxBpYaaG',#42,'TẦNG 10',$,'Level:UDIC - Level',#209,$,'TẦNG 10',.ELEMENT.,39950.)"
Arguments: ()
Create spatial hierarchy :: 0.02
Purge diffs :: 0.00
Create type products :: 0.01
Create aggregates :: 0.00
Create opening collection :: 0.00
Process element filter :: 0.00
Filtering ifc :: 0.00
Patching ifc :: 0.00
Georeferencing ifc :: 0.00
Creating groups :: 0.00
Creating grids :: 0.00
Creating native products :: 0.00
Creating meshified products :: 0.99
Relating openings :: 0.00
Placing objects in spatial tree :: 0.00
Add project to scene :: 0.00
Mesh cleaning :: 0.00
Import finished in 1.05 seconds
I think this is a bug in IfcOpenShell, and I don't think it's specific to the iterator, I think create_shape also fails. So hopefully @aothms can solve this one.
The accents come across without issue on my Linux computer, and also come across on Windows but the accent gets simplified. E.g. IfcBuildingStorey/TẦNG 2 on Windows will be imported as IfcBuildingStorey/TANG 2.
The accents are interesting, in the Blender console if I do the following:
import ifcopenshell
f = ifcopenshell.open('KC NHA HIEU BO_IFC4.ifc')
print(f.by_guid('2kH1GlCOvEjuXPfxBpYaaO').Name) # should be TẦNG 2, but I get a broken character in Blender console on Windows
bpy.context.active_object.name = f.by_guid('2kH1GlCOvEjuXPfxBpYaaO').Name # this'll simplify to TANG 2
But a higher priority is the objects that don't import. Here's some code to exhibit the problem agnostic of the BlenderBIM Add-on - it will not print those elements:
import ifcopenshell
import multiprocessing
import ifcopenshell.geom
f = ifcopenshell.open('KC NHA HIEU BO_IFC4.ifc')
settings = ifcopenshell.geom.settings()
iterator = ifcopenshell.geom.iterator(settings, f, multiprocessing.cpu_count())
iterator.initialize()
global_ids = [
'2NNnA9BDLFwf0egWHzokdq',
'2kVFptWd176wO4ktCInAJk',
'0NmcqWqOL3u9ea_SKNaatp',
'39vIVwXhn2WPb0FG46aWrB',
'0NmcqWqOL3u9ea_SKNaaUg'
]
def process_shape(shape):
shape = iterator.get()
element = f.by_id(shape.guid)
if element.GlobalId in global_ids:
print('The iterator has processed {}'.format(element))
while True:
process_shape(iterator.get())
if not iterator.next():
break
print('Done')
I've just tested in Blender 2.83 and the accent comes through correctly, so it must be a bug in Blender 2.82 (and I assume prior versions too).
Removing the BlenderBIM label as I then suspect this is specific to IfcOpenShell, so hopefully @aothms can shed some light.
There are triangle indices here like (220,220,220) so all referencing the same point, a degenerate triangle. We didn't check for that (and it's also not stated anywhere in the standard btw that it isn't allowed). These are skipped now and the remaining triangles are processed.
So now I have to build a new IfcOpenShell version? How could I do it? Thanks.
Easiest is to wait for the IfcOpenBot builds
Last builds for v0.6.0 were 20 days ago. How often does IfcOpenBot build?
continuously, but not a very fast machine and there was a glitch, new
builds should be up today or tomorrow.
Op wo 5 aug. 2020 om 11:48 schreef Long notifications@github.com:
Last builds for v0.6.0 were 20 days ago. How often does IfcOpenBot build?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/IfcOpenShell/IfcOpenShell/issues/934#issuecomment-669096888,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAILWV5YLROTF3WZADDIIYTR7ETGFANCNFSM4PLD3AAA
.
Great! Thank you very much!
@aothms is there anything I can help with for hardware? I have a dedicated Gentoo server box.
The issue (as always) is OSX, the license forbids you to run OSX on non-OSX hardware. So I bought a mac mini in 2014. And that has been building everything using VMs. In retrospect I should have probably ran only the OSX build on the mac, but for me the pain is not large enough yet to invest time in fixing the situation.
@aothms maybe we should pool some money in to get you a new Mac in the near future :) 6 years is about the time that hardware starts developing a personality.
... or perhaps IfcOpenShell needs its first corporate partner :)
Thanks @Moult that's kind. The problem with some of these hosted Mac things is often that's it's basically time sharing a Mac, so you can't really trust the system. The problem is not so much money though. It's just that I really dread setting this whole mess up again on another system. I have refreshed the windows VM (disabled indexing and real-time threat protection which put a high strain on the slow drive). Let's see how it performs now.
Those 5 elements are created in Blender with newest BlenderBIM addon. Thanks @aothms @Moult !