diff --git a/src/ifcblender/io_import_scene_ifc/__init__.py b/src/ifcblender/io_import_scene_ifc/__init__.py index 13f96866b1..78e113859b 100644 --- a/src/ifcblender/io_import_scene_ifc/__init__.py +++ b/src/ifcblender/io_import_scene_ifc/__init__.py @@ -79,6 +79,8 @@ class ImportIFC(bpy.types.Operator, ImportHelper): return {'FINISHED'} id_to_object = {} id_to_parent = {} + old_progress = -1 + print ("Creating geometry...") while True: ob = IfcImport.Get() if ob.type != 'IfcOpeningElement': @@ -123,8 +125,14 @@ class ImportIFC(bpy.types.Operator, ImportHelper): if ob.parent_id > 0: id_to_parent[ob.id] = ob.parent_id + progress = IfcImport.Progress() // 2 + if progress > old_progress: + print ("\r[" + "=" * progress + " " * (50 - progress) + "]",end="") + old_progress = progress if not IfcImport.Next(): break + + print ("\rDone creating geometry"+" "*30) while len(id_to_parent) and self.process_relations: id, parent_id = id_to_parent.popitem() diff --git a/src/ifcgeom/IfcGeomObjects.cpp b/src/ifcgeom/IfcGeomObjects.cpp index a45f4bb72a..c65555c61f 100644 --- a/src/ifcgeom/IfcGeomObjects.cpp +++ b/src/ifcgeom/IfcGeomObjects.cpp @@ -309,6 +309,7 @@ bool IfcGeomObjects::CleanUp() { ++ it ) { delete *it; } + returned_objects.clear(); return true; } const IfcGeomObjects::IfcObject* IfcGeomObjects::GetObject(int id) {