Validate entity is_abstract in ifcopenshell.geom.validate

This commit is contained in:
Thomas Krijnen
2020-10-27 11:41:39 +01:00
parent 6fd5f8d8c7
commit aa49db07d3
@@ -104,6 +104,13 @@ def validate(f, logger):
logger.set_instance(inst)
entity = schema.declaration_by_name(inst.is_a())
if entity.is_abstract():
e = "Entity %s is abstract" % entity.name()
if hasattr(logger, 'set_instance'):
logger.error(e)
else:
logger.error('In {}\n{}'.format(inst, e))
for attr, val, is_derived in zip(entity.all_attributes(), inst, entity.derived()):