mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-12 02:23:34 +00:00
Backspace everything regarding HDF5
This commit is contained in:
@@ -56,7 +56,6 @@ class draw_settings:
|
||||
space_areas: bool = False
|
||||
door_arcs: bool = False
|
||||
subtract_before_hlr: bool = False
|
||||
cache: bool = False
|
||||
css: str = ""
|
||||
storey_heights: str = "none"
|
||||
storey_filter: str = ""
|
||||
@@ -157,12 +156,6 @@ def main(
|
||||
)
|
||||
)
|
||||
|
||||
if settings.cache:
|
||||
serializer_settings = ifcopenshell.geom.serializer_settings()
|
||||
cache = ifcopenshell.geom.serializers.hdf5("cache.h5", geom_settings, serializer_settings)
|
||||
for it in iterators:
|
||||
it.set_cache(cache)
|
||||
|
||||
# Initialize serializer
|
||||
buffer = ifcopenshell.geom.serializers.buffer()
|
||||
serialiser_settings = ifcopenshell.geom.serializer_settings()
|
||||
|
||||
@@ -555,8 +555,6 @@ def iterate(
|
||||
exclude: Optional[Union[list[entity_instance], list[str]]] = None,
|
||||
*,
|
||||
with_progress: Literal[False] = False,
|
||||
cache: Optional[str] = None,
|
||||
serializer_settings: Optional[serializer_settings] = None,
|
||||
geometry_library: GEOMETRY_LIBRARY = "opencascade",
|
||||
) -> Generator[IteratorOutput, None, None]: ...
|
||||
@overload
|
||||
@@ -568,8 +566,6 @@ def iterate(
|
||||
exclude: Optional[Union[list[entity_instance], list[str]]] = None,
|
||||
*,
|
||||
with_progress: Literal[True] = True,
|
||||
cache: Optional[str] = None,
|
||||
serializer_settings: Optional[serializer_settings] = None,
|
||||
geometry_library: GEOMETRY_LIBRARY = "opencascade",
|
||||
) -> Generator[tuple[int, IteratorOutput], None, None]: ...
|
||||
@overload
|
||||
@@ -581,8 +577,6 @@ def iterate(
|
||||
exclude: Optional[Union[list[entity_instance], list[str]]] = None,
|
||||
*,
|
||||
with_progress: bool = False,
|
||||
cache: Optional[str] = None,
|
||||
serializer_settings: Optional[serializer_settings] = None,
|
||||
geometry_library: GEOMETRY_LIBRARY = "opencascade",
|
||||
) -> Generator[Union[IteratorOutput, tuple[int, IteratorOutput]], None, None]: ...
|
||||
def iterate(
|
||||
@@ -593,20 +587,10 @@ def iterate(
|
||||
exclude: Optional[Union[list[entity_instance], list[str]]] = None,
|
||||
*,
|
||||
with_progress: bool = False,
|
||||
cache: Optional[str] = None,
|
||||
serializer_settings: Optional[serializer_settings] = None,
|
||||
geometry_library: GEOMETRY_LIBRARY = "opencascade",
|
||||
) -> Generator[Union[IteratorOutput, tuple[int, IteratorOutput]], None, None]:
|
||||
"""Get a geometry iterator for the provided file.
|
||||
|
||||
:param cache: .h5 cache filepath (might not exist, will be created).
|
||||
:param serializer_settings: Settings for cache serializer. Required if `cache` is provided.
|
||||
"""
|
||||
"""Get a geometry iterator for the provided file."""
|
||||
it = iterator(settings, file_or_filename, num_threads, include, exclude, geometry_library)
|
||||
if cache:
|
||||
assert serializer_settings, "`serializer_settings` argument is not optional if `cache` is provided."
|
||||
hdf5_cache = serializers.hdf5(cache, settings, serializer_settings)
|
||||
it.set_cache(hdf5_cache)
|
||||
yield from consume_iterator(it, with_progress=with_progress)
|
||||
|
||||
|
||||
@@ -677,9 +661,6 @@ class _serializers_meta(type):
|
||||
"ttl": "ttl",
|
||||
"gltf": "glb",
|
||||
"glb": "glb",
|
||||
"hdf": "h5",
|
||||
"hdf5": "h5",
|
||||
"h5": "h5",
|
||||
"collada": "dae",
|
||||
"dae": "dae",
|
||||
"stp": "stp",
|
||||
@@ -711,9 +692,6 @@ class serializers(metaclass=_serializers_meta):
|
||||
ext = filepath.rsplit(".", 1)[-1].lower()
|
||||
mapping = {
|
||||
"glb": "gltf",
|
||||
"hdf": "hdf5",
|
||||
"h5": "hdf5",
|
||||
"hdf5": "hdf5",
|
||||
"obj": "obj",
|
||||
"svg": "svg",
|
||||
"ttl": "ttl",
|
||||
|
||||
@@ -298,18 +298,6 @@ class GltfSerializer(WriteOnlyGeometrySerializer):
|
||||
def write(self, *args): ...
|
||||
def writeHeader(self): ...
|
||||
|
||||
class HdfSerializer(GeometrySerializer):
|
||||
def __init__(self, hdf_filename, geometry_settings, settings, read_only=False): ...
|
||||
def finalize(self): ...
|
||||
def isTesselated(self): ...
|
||||
def read(self, *args): ...
|
||||
def ready(self): ...
|
||||
def remove(self, guid: str) -> None: ...
|
||||
def setFile(self, arg2): ...
|
||||
def setUnitNameAndMagnitude(self, arg2, arg3): ...
|
||||
def write(self, *args): ...
|
||||
def writeHeader(self): ...
|
||||
|
||||
class IfcBaseEntity(entity_instance):
|
||||
def __init__(self, *args, **kwargs): ...
|
||||
def declaration(self): ...
|
||||
@@ -383,7 +371,6 @@ class Iterator:
|
||||
"""
|
||||
...
|
||||
|
||||
def set_cache(self, cache: Union[GeometrySerializer, None]) -> None: ...
|
||||
def unit_magnitude(self): ...
|
||||
def unit_name(self): ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user