Return support for creating uninitialized files from Python

Created a new method to avoid complicating `ifcopenshell.file` ctor signature.
This commit is contained in:
Andrej730
2026-08-03 13:46:58 +05:00
parent 26b412cff6
commit b1f388311c
3 changed files with 27 additions and 3 deletions
+5
View File
@@ -260,6 +260,7 @@ private:
%}
%newobject ifcopenshell::file::key_value_store_iter;
%newobject ifcopenshell::file::create_uninitialized;
%extend ifcopenshell::file {
/*
@@ -274,6 +275,10 @@ private:
return new ifcopenshell::file(ifcopenshell::schema_by_name(schema));
}
static ifcopenshell::file* create_uninitialized(logger* logger=nullptr) {
return new ifcopenshell::file(ifcopenshell::uninitialized_tag{}, logger_or_root(logger));
}
std::vector<express::Base> _get_inverse(const express::Base& e) {
if (auto e_ = e.as<express::Entity>()) {
return cast_vector<express::Base>($self->get_inverse(e_.id(), 0, -1));