mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
Fix #243
This commit is contained in:
@@ -90,7 +90,9 @@ private:
|
||||
%extend IfcUtil::IfcBaseClass {
|
||||
|
||||
int get_attribute_category(const std::string& name) const {
|
||||
if (IfcSchema::Type::IsSimple($self->type())) return -1;
|
||||
if (IfcSchema::Type::IsSimple($self->type())) {
|
||||
return name == "wrappedValue";
|
||||
}
|
||||
IfcUtil::IfcBaseEntity* self_ = (IfcUtil::IfcBaseEntity*) self;
|
||||
const std::vector<std::string> names = self_->getAttributeNames();
|
||||
if (std::find(names.begin(), names.end(), name) != names.end()) {
|
||||
|
||||
@@ -41,6 +41,8 @@ assert f[16] in f.get_inverse(f[15])
|
||||
assert f[16].UnitComponent is not None
|
||||
f.remove(f[15])
|
||||
assert f[16].UnitComponent is None
|
||||
prop = f.by_type("IfcPropertySingleValue")[0]
|
||||
assert prop.NominalValue.wrappedValuex in str(prop)
|
||||
|
||||
# Some operations on ifcopenshell.entity_instance
|
||||
assert f[22].Id == ''
|
||||
|
||||
Reference in New Issue
Block a user