diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index a18862a234..f373240b17 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -708,11 +708,11 @@ if(BUILD_BONSAIVIEWER_TESTS) endif() if(BUILD_BONSAIVIEWER) - # IfcUtil first — schema-agnostic helpers (Unit, Geolocation, + # helpers first — schema-agnostic helpers (Unit, Geolocation, # Placement) that IfcViewer's Federation links against. Adding here # before ifcviewer/ so the link target exists when IfcViewer's # CMakeLists runs. - add_subdirectory(../src/ifcutil ifcutil) + add_subdirectory(../src/helpers helpers) # IfcViewer is the unified scene + render lib since the wgpu/ifcviewer # merge — wgpu-native is fetched inside its CMakeLists.txt. add_subdirectory(../src/ifcviewer ifcviewer) diff --git a/src/bonsaiviewer/docs/viewport_architecture.rst b/src/bonsaiviewer/docs/viewport_architecture.rst index af5cd17f59..a2cfd05fdc 100644 --- a/src/bonsaiviewer/docs/viewport_architecture.rst +++ b/src/bonsaiviewer/docs/viewport_architecture.rst @@ -33,7 +33,7 @@ Stack the event loop driving render scheduling, and the timer/elapsed primitives used in instrumentation. * **IfcOpenShell C++ libs** (IfcParse / IfcGeom) for IFC parsing and - geometry generation, plus **IfcUtil** for the schema-agnostic + geometry generation, plus **helpers** for the schema-agnostic helpers (``Unit``, ``Geolocation``, ``Placement``). * **Eigen3** for 4×4 matrices and small linear algebra. * **meshoptimizer** at sidecar-build time only — decimates each diff --git a/src/ifcutil/CMakeLists.txt b/src/helpers/CMakeLists.txt similarity index 81% rename from src/ifcutil/CMakeLists.txt rename to src/helpers/CMakeLists.txt index cea59f6993..8881745c1e 100644 --- a/src/ifcutil/CMakeLists.txt +++ b/src/helpers/CMakeLists.txt @@ -33,28 +33,28 @@ message("Running CMakeLists.txt in /src/ifcutil") find_package(Eigen3 REQUIRED) -file(GLOB IFCUTIL_CPP_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) -file(GLOB IFCUTIL_H_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.h) +file(GLOB HELPER_CPP_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) +file(GLOB HELPER_H_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.h) -add_library(IfcUtil STATIC ${IFCUTIL_CPP_FILES} ${IFCUTIL_H_FILES}) +add_library(helpers STATIC ${HELPER_CPP_FILES} ${HELPER_H_FILES}) -set_target_properties(IfcUtil PROPERTIES +set_target_properties(helpers PROPERTIES VERSION "${PROJECT_VERSION}" SOVERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}" ) # PUBLIC: callers (IfcViewer, test_federation, future tools) get # `#include "Unit.h"` etc. via this directory automatically, no -# `#include "../ifcutil/Unit.h"` ugliness at call sites. -target_include_directories(IfcUtil PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) +# `#include "../helpers/Unit.h"` ugliness at call sites. +target_include_directories(helpers PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) -target_link_libraries(IfcUtil PUBLIC +target_link_libraries(helpers PUBLIC IfcParse Eigen3::Eigen ) -install(TARGETS IfcUtil EXPORT ${IFCOPENSHELL_EXPORT_TARGETS}) +install(TARGETS helpers EXPORT ${IFCOPENSHELL_EXPORT_TARGETS}) -install(FILES ${IFCUTIL_H_FILES} - DESTINATION ${INCLUDEDIR}/ifcutil +install(FILES ${HELPER_H_FILES} + DESTINATION ${INCLUDEDIR}/helpers ) diff --git a/src/ifcutil/Geolocation.cpp b/src/helpers/geolocation.cpp similarity index 100% rename from src/ifcutil/Geolocation.cpp rename to src/helpers/geolocation.cpp diff --git a/src/ifcutil/Geolocation.h b/src/helpers/geolocation.h similarity index 100% rename from src/ifcutil/Geolocation.h rename to src/helpers/geolocation.h diff --git a/src/ifcutil/Placement.cpp b/src/helpers/placement.cpp similarity index 100% rename from src/ifcutil/Placement.cpp rename to src/helpers/placement.cpp diff --git a/src/ifcutil/Placement.h b/src/helpers/placement.h similarity index 100% rename from src/ifcutil/Placement.h rename to src/helpers/placement.h diff --git a/src/ifcutil/Unit.cpp b/src/helpers/unit.cpp similarity index 100% rename from src/ifcutil/Unit.cpp rename to src/helpers/unit.cpp diff --git a/src/ifcutil/Unit.h b/src/helpers/unit.h similarity index 100% rename from src/ifcutil/Unit.h rename to src/helpers/unit.h diff --git a/src/ifcviewer/CMakeLists.txt b/src/ifcviewer/CMakeLists.txt index 36301d683c..09725c144c 100644 --- a/src/ifcviewer/CMakeLists.txt +++ b/src/ifcviewer/CMakeLists.txt @@ -275,7 +275,7 @@ add_dependencies(IfcViewer ${kernel_libraries} ${mapping_libraries}) target_link_libraries(IfcViewer PUBLIC IfcViewerCore - IfcUtil + helpers IfcGeom IfcParse ${OpenCASCADE_LIBRARIES} diff --git a/src/ifcviewer/tests/CMakeLists.txt b/src/ifcviewer/tests/CMakeLists.txt index e2b7c74e3c..b53f5356f7 100644 --- a/src/ifcviewer/tests/CMakeLists.txt +++ b/src/ifcviewer/tests/CMakeLists.txt @@ -158,11 +158,11 @@ target_link_libraries(test_federation PRIVATE Qt${QT_VERSION}::Gui # Federation::HomeView uses QVector3D from QtGui Qt${QT_VERSION}::Test # QSignalSpy Eigen3::Eigen # Federation.h: composed matrices use Eigen - # IfcUtil provides Unit::convert + Geolocation helpers + # helpers provides Unit::convert + Geolocation helpers # (helmertMetersFromParameters, getWcs, getMapUnit) + Placement # (getAxis2Placement, called from Geolocation::getWcs). Linking the # static lib avoids re-compiling those .cpp files here and pulls - # the IfcUtil include dir + IfcParse transitively. - IfcUtil + # the src/helpers include dir + IfcParse transitively. + helpers ) catch_discover_tests(test_federation)