From 99b865bbd9d5ce7e0ea180f3482ffa33ae025405 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Fri, 21 Dec 2018 14:40:58 +0100 Subject: [PATCH 1/2] Some layerset processing comments --- src/ifcgeom/IfcGeomFunctions.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ifcgeom/IfcGeomFunctions.cpp b/src/ifcgeom/IfcGeomFunctions.cpp index 95174a47d5..c7390985ed 100644 --- a/src/ifcgeom/IfcGeomFunctions.cpp +++ b/src/ifcgeom/IfcGeomFunctions.cpp @@ -1940,8 +1940,11 @@ bool IfcGeom::Kernel::convert_layerset(const IfcSchema::IfcProduct* product, std if (true) { /**< @todo Why always true? */ if (axis_curve->DynamicType() == STANDARD_TYPE(Geom_Line)) { Handle_Geom_Line axis_line = Handle_Geom_Line::DownCast(axis_curve); + // @todo note that this creates an offset into the wrong order, the cross product arguments should be + // reversed. This causes some inversions later on, e.g. if(positive) { reverse(); } reference_surface = new Geom_Plane(axis_line->Lin().Location(), axis_line->Lin().Direction() ^ gp::DZ()); } else if (axis_curve->DynamicType() == STANDARD_TYPE(Geom_Circle)) { + // @todo note that in this branch this inversion does not seem to take place. Handle_Geom_Circle axis_line = Handle_Geom_Circle::DownCast(axis_curve); reference_surface = new Geom_CylindricalSurface(axis_line->Position(), axis_line->Radius()); } else { From 161deeb4e057279cf80645fe1a6cd88cf911fe49 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Sat, 22 Dec 2018 14:05:49 +0100 Subject: [PATCH 2/2] Fix warnings and compilation on clang --- cmake/CMakeLists.txt | 4 +++- src/ifcparse/IfcFile.h | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 4221827b10..0b3f50d3b7 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -413,9 +413,11 @@ IF(MSVC) ENDIF() ENDFOREACH() ElSE() - add_definitions(-Wall -Wextra -Wno-maybe-uninitialized) + add_definitions(-Wall -Wextra) if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") add_definitions(-Wno-tautological-constant-out-of-range-compare) + else() + add_definitions(-Wno-maybe-uninitialized) endif() # -fPIC is not relevant on Windows and creates pointless warnings if (UNIX) diff --git a/src/ifcparse/IfcFile.h b/src/ifcparse/IfcFile.h index 86e174135b..daa31feb27 100644 --- a/src/ifcparse/IfcFile.h +++ b/src/ifcparse/IfcFile.h @@ -62,7 +62,9 @@ public: } bool operator!=(const type_iterator& other) const { - return entities_by_type_t::const_iterator::operator!=(other); + const entities_by_type_t::const_iterator& self_ = *this; + const entities_by_type_t::const_iterator& other_ = other; + return self_ != other_; } };