mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-22 18:22:30 +00:00
Fixes compilation issues due to private copy constructors using older versions of gcc
Added additional default library and include directories to cmake build file Fixes a compilation error in the python wrapper
This commit is contained in:
@@ -11,7 +11,7 @@ ELSE()
|
|||||||
MESSAGE(STATUS "Looking for opencascade include files in: ${OCC_INCLUDE_DIR}")
|
MESSAGE(STATUS "Looking for opencascade include files in: ${OCC_INCLUDE_DIR}")
|
||||||
ENDIF()
|
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)
|
IF(gp_Pnt_hxx)
|
||||||
MESSAGE(STATUS "Header files found")
|
MESSAGE(STATUS "Header files found")
|
||||||
ELSE()
|
ELSE()
|
||||||
@@ -29,7 +29,7 @@ ELSE()
|
|||||||
MESSAGE(STATUS "Looking for opencascade library files in: ${OCC_LIBRARY_DIR}")
|
MESSAGE(STATUS "Looking for opencascade library files in: ${OCC_LIBRARY_DIR}")
|
||||||
ENDIF()
|
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)
|
IF(libTKernel)
|
||||||
MESSAGE(STATUS "Library files found")
|
MESSAGE(STATUS "Library files found")
|
||||||
ELSE()
|
ELSE()
|
||||||
@@ -61,9 +61,9 @@ CHECK_ADD_OCE_OCC_DEF(iostream.h)
|
|||||||
IF(NOT CMAKE_BUILD_TYPE)
|
IF(NOT CMAKE_BUILD_TYPE)
|
||||||
SET(CMAKE_BUILD_TYPE "Release")
|
SET(CMAKE_BUILD_TYPE "Release")
|
||||||
ENDIF(NOT CMAKE_BUILD_TYPE)
|
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
|
ADD_LIBRARY(IfcParse STATIC
|
||||||
../src/ifcparse/Ifc2x3.cpp
|
../src/ifcparse/Ifc2x3.cpp
|
||||||
../src/ifcparse/IfcUtil.cpp
|
../src/ifcparse/IfcUtil.cpp
|
||||||
@@ -83,7 +83,7 @@ ADD_LIBRARY(IfcGeom STATIC
|
|||||||
|
|
||||||
TARGET_LINK_LIBRARIES(IfcGeom IfcParse)
|
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)
|
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)
|
TARGET_LINK_LIBRARIES (IfcObj IfcParse IfcGeom TKernel TKMath TKBRep TKGeomBase TKGeomAlgo TKG3d TKG2d TKShHealing TKTopAlgo TKMesh TKPrim TKBool TKBO TKFillet)
|
||||||
|
|
||||||
|
|||||||
@@ -104,7 +104,8 @@ bool IfcGeom::convert_wire_to_face(const TopoDS_Wire& wire, TopoDS_Face& face) {
|
|||||||
if ( er == BRepBuilderAPI_NotPlanar ) {
|
if ( er == BRepBuilderAPI_NotPlanar ) {
|
||||||
ShapeFix_ShapeTolerance FTol;
|
ShapeFix_ShapeTolerance FTol;
|
||||||
FTol.SetTolerance(wire, 0.01, TopAbs_WIRE);
|
FTol.SetTolerance(wire, 0.01, TopAbs_WIRE);
|
||||||
mf = BRepBuilderAPI_MakeFace(wire, false);
|
mf.~BRepBuilderAPI_MakeFace();
|
||||||
|
new (&mf) BRepBuilderAPI_MakeFace(wire);
|
||||||
er = mf.Error();
|
er = mf.Error();
|
||||||
}
|
}
|
||||||
if ( er != BRepBuilderAPI_FaceDone ) return false;
|
if ( er != BRepBuilderAPI_FaceDone ) return false;
|
||||||
|
|||||||
@@ -257,6 +257,9 @@ extern bool IfcGeomObjects::Next() {
|
|||||||
extern const IfcGeomObjects::IfcGeomObject* IfcGeomObjects::Get() {
|
extern const IfcGeomObjects::IfcGeomObject* IfcGeomObjects::Get() {
|
||||||
return currentGeomObj;
|
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) {
|
extern bool IfcGeomObjects::Init(const char* fn, bool world_coords, std::ostream* log1, std::ostream* log2) {
|
||||||
if ( log1 || log2 ) Ifc::SetOutput(log1,log2);
|
if ( log1 || log2 ) Ifc::SetOutput(log1,log2);
|
||||||
use_world_coords = world_coords;
|
use_world_coords = world_coords;
|
||||||
|
|||||||
@@ -97,6 +97,7 @@ namespace IfcGeomObjects {
|
|||||||
IfcGeomObject( const std::string& n, const std::string& t, gp_Trsf trsf, IfcMesh* m );
|
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(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 bool Init(std::istream& f, int len, bool world_coords = false, std::ostream* log1= 0, std::ostream* log2= 0);
|
||||||
extern const IfcGeomObject* Get();
|
extern const IfcGeomObject* Get();
|
||||||
|
|||||||
@@ -36,6 +36,6 @@ namespace IfcGeomObjects {
|
|||||||
|
|
||||||
extern bool Next();
|
extern bool Next();
|
||||||
extern const IfcGeomObject* Get();
|
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();
|
extern int Progress();
|
||||||
};
|
};
|
||||||
Reference in New Issue
Block a user