mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
validate ifcopenshell.simple_spf.file
This commit is contained in:
committed by
Thomas Krijnen
parent
d401e4c948
commit
689289bb60
@@ -54,6 +54,7 @@ from typing import Union, Iterator, Any, Optional
|
||||
from logging import Logger, Handler
|
||||
|
||||
import ifcopenshell
|
||||
import ifcopenshell.simple_spf
|
||||
import ifcopenshell.ifcopenshell_wrapper
|
||||
import ifcopenshell.ifcopenshell_wrapper as W
|
||||
import ifcopenshell.express.rule_executor
|
||||
@@ -597,8 +598,11 @@ def validate_guid(guid: str) -> Union[str, None]:
|
||||
return None
|
||||
|
||||
|
||||
def validate_ifc_header(f: ifcopenshell.file, logger: Logger) -> None:
|
||||
header: W.IfcSpfHeader = f.wrapped_data.header
|
||||
def validate_ifc_header(f: Union[ifcopenshell.file, ifcopenshell.simple_spf.file], logger: Logger) -> None:
|
||||
if type(f) is ifcopenshell.file:
|
||||
header: W.IfcSpfHeader = f.wrapped_data.header
|
||||
else:
|
||||
header: types.SimpleNamespace = f.header
|
||||
AGGREGATE_TYPE = "LIST [ 1 : ? ] OF STRING (256)"
|
||||
STRING_TYPE = "STRING (256)"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user