Skip unavailable shape-stat kernels

Generated with the assistance of an AI coding tool.
This commit is contained in:
Thomas Krijnen
2026-08-09 11:51:06 +02:00
parent c9c7edd4d6
commit 17c4d8faff
4 changed files with 35 additions and 8 deletions
+11
View File
@@ -286,6 +286,7 @@
#include "../ifcgeom/conversion_result.h"
#include "../ifcgeom/hybrid_kernel.h"
#include "../ifcgeom/geometry_serializer.h"
#include "../ifcgeom/kernel_plugin.h"
#include "../ifcparse/express.h"
#include "../ifcparse/file.h"
@@ -325,6 +326,16 @@ std::vector<std::string> get_plugin_search_paths() {
void clear_plugin_search_paths() {
ifcopenshell::plugin::clear_search_paths();
}
bool has_geometry_library(const std::string& geometry_library) {
auto& registry = ifcopenshell::geom::kernels::kernel_registry_instance();
try {
return registry.has(geometry_library) ||
ifcopenshell::geom::kernels::load_kernel_plugin(registry, geometry_library);
} catch (const std::exception&) {
return false;
}
}
%}
%include "IfcGeomWrapper.i"