From 1d319f7ac433fd744c6ab515503d9bee6b0b3b6c Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Wed, 7 Jan 2015 10:22:55 +0000 Subject: [PATCH] Compilation fixes and python 2 compatibility. Thanks Yorik. --- src/examples/IfcParseExamples.cpp | 2 +- src/ifcopenshell-python/ifcopenshell/geom/__init__.py | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/examples/IfcParseExamples.cpp b/src/examples/IfcParseExamples.cpp index 61da2cdb9f..a4741d78e8 100644 --- a/src/examples/IfcParseExamples.cpp +++ b/src/examples/IfcParseExamples.cpp @@ -17,7 +17,7 @@ * * ********************************************************************************/ -#include "../ifcparse/IfcParse.h" +#include "../ifcparse/IfcFile.h" using namespace IfcSchema; diff --git a/src/ifcopenshell-python/ifcopenshell/geom/__init__.py b/src/ifcopenshell-python/ifcopenshell/geom/__init__.py index 36074f05de..2a0577f172 100644 --- a/src/ifcopenshell-python/ifcopenshell/geom/__init__.py +++ b/src/ifcopenshell-python/ifcopenshell/geom/__init__.py @@ -43,8 +43,7 @@ def create_shape(settings, inst): def iterate(settings, filename): it = iterator(settings, filename) - if not it.findContext(): return None - while True: - yield it.get() - if not it.next(): break - + if it.findContext(): + while True: + yield it.get() + if not it.next(): break