diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 60294c2256..c451f0cc45 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -221,7 +221,7 @@ endif() if(GLTF_SUPPORT OR CITYJSON_SUPPORT) UNIFY_ENVVARS_AND_CACHE(JSON_INCLUDE_DIR) - find_path(json_header_path "json.hpp" ${JSON_INCLUDE_DIR} PATH_SUFFIXES "nlohmann") + find_path(json_header_path "nlohmann/json.hpp" ${JSON_INCLUDE_DIR}) set(JSON_INCLUDE_DIR ${json_header_path}) if(json_header_path) diff --git a/src/examples/IfcAdvancedHouse.cpp b/src/examples/IfcAdvancedHouse.cpp index cb1f64975f..f4623fa7cc 100644 --- a/src/examples/IfcAdvancedHouse.cpp +++ b/src/examples/IfcAdvancedHouse.cpp @@ -38,7 +38,7 @@ #include -#define IfcSchema Ifc2x3 +#define IfcSchema Ifc4 #include "../ifcparse/macros.h" #include "../ifcparse/Ifc2x3.h" #include "../ifcparse/IfcBaseClass.h" diff --git a/src/examples/IfcOpenHouse.cpp b/src/examples/IfcOpenHouse.cpp index 3f6d56236d..f7e4a85873 100644 --- a/src/examples/IfcOpenHouse.cpp +++ b/src/examples/IfcOpenHouse.cpp @@ -35,7 +35,7 @@ #include -#define IfcSchema Ifc2x3 +#define IfcSchema Ifc4 #include "../ifcparse/macros.h" #include "../ifcparse/Ifc2x3.h" #include "../ifcparse/IfcBaseClass.h" diff --git a/src/ifcconvert/validation_utils.h b/src/ifcconvert/validation_utils.h index 0b9484df3c..c8801d6537 100644 --- a/src/ifcconvert/validation_utils.h +++ b/src/ifcconvert/validation_utils.h @@ -471,7 +471,7 @@ struct intersection_validator { } std::stringstream ss; - ss << geom_object->product()->data().toString(); + geom_object->product()->toString(ss); auto sss = ss.str(); std::wcout << sss.c_str() << std::endl; diff --git a/src/serializers/GltfSerializer.cpp b/src/serializers/GltfSerializer.cpp index c5b4d4c776..4dbfd003e1 100644 --- a/src/serializers/GltfSerializer.cpp +++ b/src/serializers/GltfSerializer.cpp @@ -451,29 +451,29 @@ void GltfSerializer::setFile(IfcParse::IfcFile* f) { } if (coordops) { for (auto& coordop : *coordops) { - IfcUtil::IfcBaseClass* source_crs = *coordop->as()->get("SourceCRS"); + IfcUtil::IfcBaseClass* source_crs = coordop->as()->get("SourceCRS"); if (source_crs->declaration().is("IfcGeometricRepresentationContext")) { - IfcUtil::IfcBaseClass* target_crs = *coordop->as()->get("TargetCRS"); + IfcUtil::IfcBaseClass* target_crs = coordop->as()->get("TargetCRS"); auto name_attr = target_crs->as()->get("Name"); if (coordop->declaration().is("IfcMapConversion")) { - if (!name_attr->isNull()) { - std::string epsg_code = *name_attr; + if (!name_attr.isNull()) { + std::string epsg_code = name_attr; crs_epsg = epsg_code; // @todo in which unit are these? - double eastings = *coordop->as()->get("Eastings"); - double northings = *coordop->as()->get("Northings"); - double height = *coordop->as()->get("OrthogonalHeight"); + double eastings = coordop->as()->get("Eastings"); + double northings = coordop->as()->get("Northings"); + double height = coordop->as()->get("OrthogonalHeight"); height = 0.; eastings_northings_elevation = { { eastings, northings, height} }; auto xaxis_attr = coordop->as()->get("XAxisAbscissa"); auto yaxis_attr = coordop->as()->get("XAxisOrdinate"); - if (!xaxis_attr->isNull() && !yaxis_attr->isNull()) { - double xaxis = *xaxis_attr; - double yaxis = *yaxis_attr; + if (!xaxis_attr.isNull() && !yaxis_attr.isNull()) { + double xaxis = xaxis_attr; + double yaxis = yaxis_attr; crs_x_axis = { { xaxis, yaxis, 0. } }; } @@ -490,9 +490,9 @@ void GltfSerializer::setFile(IfcParse::IfcFile* f) { auto lat_attr = (*sites->begin())->as()->get("RefLatitude"); auto lon_attr = (*sites->begin())->as()->get("RefLongitude"); - if (!lat_attr->isNull() && !lon_attr->isNull()) { - std::vector lat_dms = *lat_attr; - std::vector lon_dms = *lon_attr; + if (!lat_attr.isNull() && !lon_attr.isNull()) { + std::vector lat_dms = lat_attr; + std::vector lon_dms = lon_attr; auto to_decimal = [](const std::vector& dms) { double val = dms[0] + dms[1] / 60. + dms[2] / 3600.; @@ -524,10 +524,10 @@ void GltfSerializer::setFile(IfcParse::IfcFile* f) { if (contexts && contexts->size() > 0) { auto context = (*contexts->begin())->as(); auto north_attr = context->get("TrueNorth"); - if (!north_attr->isNull()) { - IfcUtil::IfcBaseClass* north = *north_attr; + if (!north_attr.isNull()) { + IfcUtil::IfcBaseClass* north = north_attr; if (north->declaration().is("IfcDirection")) { - std::vector ratios = *north->as()->get("DirectionRatios"); + std::vector ratios = north->as()->get("DirectionRatios"); crs_x_axis = { { ratios[1], -ratios[0], 0. } }; } }