mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-16 13:46:54 +00:00
Fix #243
This commit is contained in:
@@ -90,7 +90,9 @@ private:
|
|||||||
%extend IfcUtil::IfcBaseClass {
|
%extend IfcUtil::IfcBaseClass {
|
||||||
|
|
||||||
int get_attribute_category(const std::string& name) const {
|
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;
|
IfcUtil::IfcBaseEntity* self_ = (IfcUtil::IfcBaseEntity*) self;
|
||||||
const std::vector<std::string> names = self_->getAttributeNames();
|
const std::vector<std::string> names = self_->getAttributeNames();
|
||||||
if (std::find(names.begin(), names.end(), name) != names.end()) {
|
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
|
assert f[16].UnitComponent is not None
|
||||||
f.remove(f[15])
|
f.remove(f[15])
|
||||||
assert f[16].UnitComponent is None
|
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
|
# Some operations on ifcopenshell.entity_instance
|
||||||
assert f[22].Id == ''
|
assert f[22].Id == ''
|
||||||
|
|||||||
Reference in New Issue
Block a user