This commit is contained in:
Thomas Krijnen
2017-07-27 10:21:37 +02:00
parent 59d7e0cad3
commit fb1fed247e
2 changed files with 5 additions and 1 deletions
+3 -1
View File
@@ -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()) {
+2
View File
@@ -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 == ''