diff --git a/src/ifcviewer/GeometryStreamer.cpp b/src/ifcviewer/GeometryStreamer.cpp index 39698c84e6..437209c909 100644 --- a/src/ifcviewer/GeometryStreamer.cpp +++ b/src/ifcviewer/GeometryStreamer.cpp @@ -94,7 +94,7 @@ std::vector GeometryStreamer::drainElements() { void GeometryStreamer::run(const std::string& path, int num_threads) { try { - ifc_file_ = std::make_unique(path); + ifc_file_ = std::make_unique(path); } catch (const std::exception& e) { emit errorOccurred(QString("Failed to parse IFC file: %1").arg(e.what())); return; @@ -112,7 +112,7 @@ void GeometryStreamer::run(const std::string& path, int num_threads) { auto kernel = ifcopenshell::geometry::kernels::construct( ifc_file_.get(), geometry_library, settings); iterator = std::make_unique( - std::move(kernel), settings, ifc_file_.get(), std::vector(), num_threads); + std::move(kernel), settings, ifc_file_.get(), std::vector(), num_threads); } catch (const std::exception& e) { emit errorOccurred(QString("Failed to create geometry iterator: %1").arg(e.what())); return; diff --git a/src/ifcviewer/GeometryStreamer.h b/src/ifcviewer/GeometryStreamer.h index 06b6364a24..abd087463c 100644 --- a/src/ifcviewer/GeometryStreamer.h +++ b/src/ifcviewer/GeometryStreamer.h @@ -31,7 +31,7 @@ #include #include -#include "../ifcparse/IfcFile.h" +#include "../ifcparse/file.h" #include "../ifcgeom/Iterator.h" #include "ViewportWindow.h" @@ -57,7 +57,7 @@ public: bool isRunning() const { return running_.load(); } int progress() const { return progress_.load(); } - IfcParse::IfcFile* ifcFile() const { return ifc_file_.get(); } + ifcopenshell::file* ifcFile() const { return ifc_file_.get(); } // Thread-safe access to discovered elements std::vector drainElements(); @@ -73,7 +73,7 @@ private: UploadChunk convertElement(const IfcGeom::TriangulationElement* elem, uint32_t object_id); - std::unique_ptr ifc_file_; + std::unique_ptr ifc_file_; std::unique_ptr worker_thread_; std::atomic running_{false}; std::atomic cancel_requested_{false}; diff --git a/src/ifcviewer/MainWindow.cpp b/src/ifcviewer/MainWindow.cpp index 1f32ce0877..6eede35353 100644 --- a/src/ifcviewer/MainWindow.cpp +++ b/src/ifcviewer/MainWindow.cpp @@ -244,23 +244,23 @@ void MainWindow::populateProperties(uint32_t object_id) { auto* file = streamer_->ifcFile(); if (!file) return; - auto* product = file->instance_by_id(info.ifc_id); + auto product = file->instance_by_id(info.ifc_id); if (!product) return; // Show all direct attributes - auto& decl = product->declaration(); + auto& decl = product.declaration(); if (auto* entity = decl.as_entity()) { for (size_t i = 0; i < entity->attribute_count(); ++i) { auto* attr = entity->attribute_by_index(i); try { - auto val = product->get_attribute_value(i); + auto val = product.get_attribute_value(i); if (!val.isNull()) { std::string str_val; try { str_val = static_cast(val); } catch (...) { // Not a string-convertible attribute (entity ref, aggregate, etc.) - str_val = "<" + std::string(IfcUtil::ArgumentTypeToString(val.type())) + ">"; + str_val = "<" + std::string(ifcopenshell::argument_type_to_string(val.type())) + ">"; } addRow(QString::fromStdString(attr->name()), QString::fromStdString(str_val)); }