From 2132706c6e60b85993d72b43ef48f8c3b0dd003d Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Fri, 10 Jul 2020 12:00:54 +1000 Subject: [PATCH] Migrate import geolocation to util module --- src/ifcblenderexport/blenderbim/bim/import_ifc.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/ifcblenderexport/blenderbim/bim/import_ifc.py b/src/ifcblenderexport/blenderbim/bim/import_ifc.py index 9545681e18..b5832183b4 100644 --- a/src/ifcblenderexport/blenderbim/bim/import_ifc.py +++ b/src/ifcblenderexport/blenderbim/bim/import_ifc.py @@ -1,5 +1,6 @@ import ifcopenshell import ifcopenshell.geom +import ifcopenshell.util.geolocation import ifcopenshell.util.selector import bpy import bmesh @@ -1575,14 +1576,9 @@ class IfcImporter(): def cast_edge_case_attribute(self, ifc_class, key, value): if key == 'RefLatitude' or key == 'RefLongitude': - return self.dms2dd(*value) + return ifcopenshell.util.geolocation.dms2dd(*value) return value - # TODO: migrate to ifcopenshell.util - def dms2dd(self, degrees, minutes, seconds, milliseconds=0): - dd = float(degrees) + float(minutes)/60 + float(seconds)/(3600) - return dd - def add_element_classifications(self, element, obj): if not element.HasAssociations: return