MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / filter

Method filter

src/ifctester/ifctester/facet.py:668–679  ·  view source on GitHub ↗
(
        self, ifc_file: ifcopenshell.file, elements: Optional[list[ifcopenshell.entity_instance]]
    )

Source from the content-addressed store, hash-verified

666 super().__init__(propertySet, baseName, value, dataType, uri, cardinality, instructions)
667
668 def filter(
669 self, ifc_file: ifcopenshell.file, elements: Optional[list[ifcopenshell.entity_instance]]
670 ) -> list[ifcopenshell.entity_instance]:
671 if isinstance(elements, list):
672 return super().filter(ifc_file, elements)
673 if ifc_file.schema == "IFC2X3":
674 return ifc_file.by_type("IfcObjectDefinition")
675 return (
676 ifc_file.by_type("IfcObjectDefinition")
677 + ifc_file.by_type("IfcMaterialDefinition")
678 + ifc_file.by_type("IfcProfileDef")
679 )
680
681 def __call__(self, inst: ifcopenshell.entity_instance, logger: Optional[Logger] = None) -> PropertyResult:
682 if isinstance(self.propertySet, str):

Callers

nothing calls this directly

Calls 2

filterMethod · 0.45
by_typeMethod · 0.45

Tested by

no test coverage detected