ifctester.facet

Module Contents

class ifctester.facet.Attribute(name='Name', value=None, cardinality: Cardinality = 'required', instructions=None)

Bases: Facet

filter(ifc_file: ifcopenshell.file, elements: list[ifcopenshell.entity_instance] | None) list[ifcopenshell.entity_instance]
applicability_templates = ['Data where the {name} is {value}', 'Data where the {name} is provided']
parameters = ['name', 'value', '@cardinality', '@instructions']
prohibited_templates = ['The {name} shall not be {value}', 'The {name} shall not be provided']
requirement_templates = ['The {name} shall be {value}', 'The {name} shall be provided']
class ifctester.facet.AttributeResult(is_pass, reason=None)

Bases: Result

to_string()
class ifctester.facet.Classification(value=None, system=None, uri=None, cardinality: Cardinality = 'required', instructions=None)

Bases: Facet

filter(ifc_file: ifcopenshell.file, elements: list[ifcopenshell.entity_instance] | None) list[ifcopenshell.entity_instance]
applicability_templates = ['Data having a {system} reference of {value}', 'Data classified using {system}', 'Data...
parameters = ['value', 'system', '@uri', '@cardinality', '@instructions']
prohibited_templates = ['Shall not have a {system} reference of {value}', 'Shall not be classified using {system}',...
requirement_templates = ['Shall have a {system} reference of {value}', 'Shall be classified using {system}', 'Shall be...
class ifctester.facet.ClassificationResult(is_pass, reason=None)

Bases: Result

to_string()
class ifctester.facet.Entity(name='IFCWALL', predefinedType=None, instructions=None)

Bases: Facet

filter(ifc_file: ifcopenshell.file, elements: list[ifcopenshell.entity_instance] | None = None) list[ifcopenshell.entity_instance]
applicability_templates = ['All {name} data of type {predefinedType}', 'All {name} data']
parameters = ['name', 'predefinedType', '@instructions']
prohibited_templates = ['Shall not be {name} data of type {predefinedType}', 'Shall not be {name} data']
requirement_templates = ['Shall be {name} data of type {predefinedType}', 'Shall be {name} data']
class ifctester.facet.EntityResult(is_pass, reason=None)

Bases: Result

to_string()
class ifctester.facet.Facet(*parameters)
asdict(clause_type: str) dict[str, Any]
filter(ifc_file: ifcopenshell.file, elements: list[ifcopenshell.entity_instance] | None) list[ifcopenshell.entity_instance]
get_usage() Cardinality
parse(xml)
to_ids_value(parameter: str | Restriction | list) dict[str, Any]
to_string(clause_type: str, specification: ifctester.ids.Specification | None = None, requirement: Facet | None = None) str
cardinality: Cardinality
failures: list[FacetFailure] = []
passed_entities: set[ifcopenshell.entity_instance]
status = None
class ifctester.facet.FacetFailure

Bases: TypedDict

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s

(key, value) pairs

dict(iterable) -> new dictionary initialized as if via:

d = {} for k, v in iterable:

d[k] = v

dict(**kwargs) -> new dictionary initialized with the name=value pairs

in the keyword argument list. For example: dict(one=1, two=2)

element: ifcopenshell.entity_instance
reason: str
class ifctester.facet.Material(value=None, uri=None, cardinality: Cardinality = 'required', instructions=None)

Bases: Facet

filter(ifc_file: ifcopenshell.file, elements: list[ifcopenshell.entity_instance] | None) list[ifcopenshell.entity_instance]
applicability_templates = ['All data with a {value} material', 'All data with a material']
parameters = ['value', '@uri', '@cardinality', '@instructions']
prohibited_templates = ['Shall not have a material of {value}', 'Shall not have a material']
requirement_templates = ['Shall have a material of {value}', 'Shall have a material']
class ifctester.facet.MaterialResult(is_pass, reason=None)

Bases: Result

to_string()
class ifctester.facet.PartOf(name='IFCWALL', predefinedType=None, relation=None, cardinality: Cardinality = 'required', instructions=None)

Bases: Facet

asdict(clause_type: str) dict[str, Any]
filter(ifc_file: ifcopenshell.file, elements: list[ifcopenshell.entity_instance] | None) list[ifcopenshell.entity_instance]
get_parent(element)
parse(xml)
applicability_templates = ['An element with an {relation} relationship with an {name}', 'An element with an {relation}...
parameters = ['name', 'predefinedType', '@relation', '@cardinality', '@instructions']
prohibited_templates = ['An element must not have an {relation} relationship with an {name}', 'An element must not have...
requirement_templates = ['An element must have an {relation} relationship with an {name} of predefined type...
class ifctester.facet.PartOfResult(is_pass, reason=None)

Bases: Result

to_string()
class ifctester.facet.Property(propertySet='Property_Set', baseName='PropertyName', value=None, dataType=None, uri=None, cardinality: Cardinality = 'required', instructions=None)

Bases: Facet

filter(ifc_file: ifcopenshell.file, elements: list[ifcopenshell.entity_instance] | None) list[ifcopenshell.entity_instance]
get_properties(pset)
applicability_templates = ['Elements with {baseName} data of {value} in the dataset {propertySet}', 'Elements with...
parameters = ['propertySet', 'baseName', 'value', '@dataType', '@uri', '@cardinality', '@instructions']
prohibited_templates = ['{baseName} data shall not be {value} and in the dataset {propertySet}', '{baseName} data shall...
requirement_templates = ['{baseName} data shall be {value} and in the dataset {propertySet}', '{baseName} data shall be...
class ifctester.facet.PropertyResult(is_pass, reason=None)

Bases: Result

to_string()
class ifctester.facet.Restriction(options=None, base='string')
asdict() dict[str, Any]
parse(ids_dict)
base
options
class ifctester.facet.Result(is_pass, reason=None)
to_string()
is_pass
reason
ifctester.facet.cast_to_value(from_value, to_value)
ifctester.facet.get_pset(element, pset)
ifctester.facet.get_psets(element)
ifctester.facet.is_x(value, cast_value)
ifctester.facet.Cardinality