diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index ba9d1e28c7..06205d7ec5 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -11,7 +11,7 @@ ELSE() MESSAGE(STATUS "Looking for opencascade include files in: ${OCC_INCLUDE_DIR}") ENDIF() -FIND_FILE(gp_Pnt_hxx "gp_Pnt.hxx" ${OCC_INCLUDE_DIR}) +FIND_FILE(gp_Pnt_hxx "gp_Pnt.hxx" ${OCC_INCLUDE_DIR} /usr/inc /usr/local/inc) IF(gp_Pnt_hxx) MESSAGE(STATUS "Header files found") ELSE() @@ -29,7 +29,7 @@ ELSE() MESSAGE(STATUS "Looking for opencascade library files in: ${OCC_LIBRARY_DIR}") ENDIF() -FIND_LIBRARY(libTKernel "TKernel" ${OCC_LIBRARY_DIR}) +FIND_LIBRARY(libTKernel "TKernel" ${OCC_LIBRARY_DIR} /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64) IF(libTKernel) MESSAGE(STATUS "Library files found") ELSE() @@ -61,9 +61,9 @@ CHECK_ADD_OCE_OCC_DEF(iostream.h) IF(NOT CMAKE_BUILD_TYPE) SET(CMAKE_BUILD_TYPE "Release") ENDIF(NOT CMAKE_BUILD_TYPE) -ADD_DEFINITIONS(-fPIC) +ADD_DEFINITIONS(-fPIC -Wno-non-virtual-dtor) -INCLUDE_DIRECTORIES(${OCC_INCLUDE_DIR}) +INCLUDE_DIRECTORIES(${OCC_INCLUDE_DIR} /usr/inc /usr/local/inc) ADD_LIBRARY(IfcParse STATIC ../src/ifcparse/Ifc2x3.cpp ../src/ifcparse/IfcUtil.cpp @@ -83,7 +83,7 @@ ADD_LIBRARY(IfcGeom STATIC TARGET_LINK_LIBRARIES(IfcGeom IfcParse) -LINK_DIRECTORIES (${IfcOpenShell_BINARY_DIR} /usr/lib) +LINK_DIRECTORIES (${IfcOpenShell_BINARY_DIR} /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64) ADD_EXECUTABLE(IfcObj ../src/ifcobj/IfcObj.cpp) TARGET_LINK_LIBRARIES (IfcObj IfcParse IfcGeom TKernel TKMath TKBRep TKGeomBase TKGeomAlgo TKG3d TKG2d TKShHealing TKTopAlgo TKMesh TKPrim TKBool TKBO TKFillet) diff --git a/src/ifcgeom/IfcGeomFunctions.cpp b/src/ifcgeom/IfcGeomFunctions.cpp index 1058b2858d..5491cd6ba3 100644 --- a/src/ifcgeom/IfcGeomFunctions.cpp +++ b/src/ifcgeom/IfcGeomFunctions.cpp @@ -104,7 +104,8 @@ bool IfcGeom::convert_wire_to_face(const TopoDS_Wire& wire, TopoDS_Face& face) { if ( er == BRepBuilderAPI_NotPlanar ) { ShapeFix_ShapeTolerance FTol; FTol.SetTolerance(wire, 0.01, TopAbs_WIRE); - mf = BRepBuilderAPI_MakeFace(wire, false); + mf.~BRepBuilderAPI_MakeFace(); + new (&mf) BRepBuilderAPI_MakeFace(wire); er = mf.Error(); } if ( er != BRepBuilderAPI_FaceDone ) return false; diff --git a/src/ifcgeom/IfcGeomObjects.cpp b/src/ifcgeom/IfcGeomObjects.cpp index fd455ca6f2..912e86f08c 100644 --- a/src/ifcgeom/IfcGeomObjects.cpp +++ b/src/ifcgeom/IfcGeomObjects.cpp @@ -257,6 +257,9 @@ extern bool IfcGeomObjects::Next() { extern const IfcGeomObjects::IfcGeomObject* IfcGeomObjects::Get() { return currentGeomObj; } +extern bool IfcGeomObjects::Init(const char* fn, bool world_coords) { + return IfcGeomObjects::Init(fn, world_coords, 0, 0); +} extern bool IfcGeomObjects::Init(const char* fn, bool world_coords, std::ostream* log1, std::ostream* log2) { if ( log1 || log2 ) Ifc::SetOutput(log1,log2); use_world_coords = world_coords; diff --git a/src/ifcgeom/IfcGeomObjects.h b/src/ifcgeom/IfcGeomObjects.h index e0acc6409f..3c327fa3f8 100644 --- a/src/ifcgeom/IfcGeomObjects.h +++ b/src/ifcgeom/IfcGeomObjects.h @@ -97,6 +97,7 @@ namespace IfcGeomObjects { IfcGeomObject( const std::string& n, const std::string& t, gp_Trsf trsf, IfcMesh* m ); }; + extern bool Init(const char* fn, bool world_coords = false); extern bool Init(const char* fn, bool world_coords = false, std::ostream* log1= 0, std::ostream* log2= 0); extern bool Init(std::istream& f, int len, bool world_coords = false, std::ostream* log1= 0, std::ostream* log2= 0); extern const IfcGeomObject* Get(); diff --git a/src/ifcwrap/Interface.h b/src/ifcwrap/Interface.h index a67a55e34b..04c623ec0b 100644 --- a/src/ifcwrap/Interface.h +++ b/src/ifcwrap/Interface.h @@ -36,6 +36,6 @@ namespace IfcGeomObjects { extern bool Next(); extern const IfcGeomObject* Get(); - extern bool Init(char* fn, bool world_coords = false); + extern bool Init(const char* fn, bool world_coords = false); extern int Progress(); }; \ No newline at end of file