From c8cb9d8a7cc02cc7b44c2de7ec9ea3cf2614f674 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Tue, 25 Feb 2020 17:47:32 +1100 Subject: [PATCH] Auto detect badly geolocated site from Tekla upon import --- src/ifcblenderexport/blenderbim/import_ifc.py | 3 +++ src/ifcblenderexport/blenderbim/ui.py | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/src/ifcblenderexport/blenderbim/import_ifc.py b/src/ifcblenderexport/blenderbim/import_ifc.py index 2221803aaf..20b691e973 100644 --- a/src/ifcblenderexport/blenderbim/import_ifc.py +++ b/src/ifcblenderexport/blenderbim/import_ifc.py @@ -173,6 +173,9 @@ class IfcImporter(): self.ifc_import_settings.should_ignore_building_coordinates = True elif applications[0].ApplicationFullName == '12D Model': self.ifc_import_settings.should_reset_absolute_coordinates = True + elif applications[0].ApplicationFullName == 'Tekla Structures': + if self.is_ifc_class_far_away('IfcSite'): + self.ifc_import_settings.should_ignore_site_coordinates = True def is_ifc_class_far_away(self, ifc_class): for site in self.file.by_type(ifc_class): diff --git a/src/ifcblenderexport/blenderbim/ui.py b/src/ifcblenderexport/blenderbim/ui.py index b820796076..272b288a54 100644 --- a/src/ifcblenderexport/blenderbim/ui.py +++ b/src/ifcblenderexport/blenderbim/ui.py @@ -648,6 +648,11 @@ class BIM_PT_mvd(Panel): row = layout.row() row.prop(bim_properties, 'import_should_auto_set_workarounds') + layout.label(text='Tekla Workarounds:') + + row = layout.row() + row.prop(bim_properties, 'import_should_ignore_site_coordinates') + layout.label(text='12D Workarounds:') row = layout.row()