mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-22 03:21:00 +00:00
Fix bug where the pset templates with multiple applicable entities only checked the first entity
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
import pathlib
|
|
||||||
import re
|
import re
|
||||||
|
import pathlib
|
||||||
|
import ifcopenshell
|
||||||
|
import ifcopenshell.util.schema
|
||||||
|
from ifcopenshell.entity_instance import entity_instance
|
||||||
from functools import lru_cache
|
from functools import lru_cache
|
||||||
from typing import List, Generator, Optional
|
from typing import List, Generator, Optional
|
||||||
|
|
||||||
import ifcopenshell
|
|
||||||
from ifcopenshell.entity_instance import entity_instance
|
|
||||||
|
|
||||||
templates = {}
|
templates = {}
|
||||||
|
|
||||||
|
|
||||||
@@ -71,10 +71,8 @@ class PsetQto:
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
applicable_class = match.group(1)
|
applicable_class = match.group(1)
|
||||||
if entity.name() == applicable_class:
|
if ifcopenshell.util.schema.is_a(entity, applicable_class):
|
||||||
return True
|
return True
|
||||||
if entity.supertype():
|
|
||||||
return self.is_applicable(entity.supertype(), applicable_class)
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
@lru_cache()
|
@lru_cache()
|
||||||
|
|||||||
Reference in New Issue
Block a user