mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-17 02:49:12 +00:00
Return support for creating uninitialized files from Python
Created a new method to avoid complicating `ifcopenshell.file` ctor signature.
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user