From da616ffd64ae909da8b2560f807997ede146b5f1 Mon Sep 17 00:00:00 2001 From: Jang Myeongho Date: Tue, 21 Aug 2012 07:06:59 +0000 Subject: [PATCH] - Added getter to IfcFile object - fixed wrong operator to judge plan angle unit is not exist. - guessed plane angle unit stay in a file processing. --- src/ifcgeom/IfcGeomObjects.cpp | 4 ++++ src/ifcgeom/IfcGeomObjects.h | 2 +- src/ifcgeom/IfcGeomWires.cpp | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/ifcgeom/IfcGeomObjects.cpp b/src/ifcgeom/IfcGeomObjects.cpp index f3d931a53a..855cde8dfc 100644 --- a/src/ifcgeom/IfcGeomObjects.cpp +++ b/src/ifcgeom/IfcGeomObjects.cpp @@ -639,3 +639,7 @@ int IfcGeomObjects::Progress() { std::string IfcGeomObjects::GetLog() { return Logger::GetLog(); } + +IfcParse::IfcFile* IfcGeomObjects::GetFile() { + return ifc_file; +} diff --git a/src/ifcgeom/IfcGeomObjects.h b/src/ifcgeom/IfcGeomObjects.h index 623b174b4b..5fc573e5bc 100644 --- a/src/ifcgeom/IfcGeomObjects.h +++ b/src/ifcgeom/IfcGeomObjects.h @@ -158,7 +158,7 @@ namespace IfcGeomObjects { int Progress(); const IfcObject* GetObject(int id); std::string GetLog(); - + IfcParse::IfcFile* GetFile(); } #endif diff --git a/src/ifcgeom/IfcGeomWires.cpp b/src/ifcgeom/IfcGeomWires.cpp index 3850b8c9bc..a55b2fbfba 100644 --- a/src/ifcgeom/IfcGeomWires.cpp +++ b/src/ifcgeom/IfcGeomWires.cpp @@ -83,7 +83,7 @@ #include "../ifcgeom/IfcGeom.h" bool IfcGeom::convert(const Ifc2x3::IfcCompositeCurve::ptr l, TopoDS_Wire& wire) { - if ( IfcGeom::GetValue(GV_PLANEANGLE_UNIT)>0 ) { + if ( IfcGeom::GetValue(GV_PLANEANGLE_UNIT)<0 ) { Logger::Message(Logger::LOG_WARNING,"Creating a composite curve without unit information:",l->entity); // Temporarily pretend we do have unit information @@ -107,7 +107,7 @@ bool IfcGeom::convert(const Ifc2x3::IfcCompositeCurve::ptr l, TopoDS_Wire& wire) } catch (...) {} // Restore to unknown unit state - IfcGeom::SetValue(GV_PLANEANGLE_UNIT,-1.0); + //IfcGeom::SetValue(GV_PLANEANGLE_UNIT,-1.0); if ( succes_degrees && ! succes_radians ) { use_degrees = true;