mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 17:58:20 +00:00
Backspace everything regarding HDF5
This commit is contained in:
@@ -2,7 +2,7 @@ IfcConvert
|
||||
==========
|
||||
|
||||
IfcConvert is a command-line application for converting IFC geometry into file
|
||||
formats such as OBJ, DAE, GLB, STP, IGS, XML, SVG, H5, TTL/WKT, and IFC-SPF itself.
|
||||
formats such as OBJ, DAE, GLB, STP, IGS, XML, SVG, TTL/WKT, and IFC-SPF itself.
|
||||
|
||||
For other formats, you may use other IfcOpenShell utilities as shown in the
|
||||
table below.
|
||||
@@ -11,8 +11,8 @@ table below.
|
||||
| From Format | To Format | Tool |
|
||||
+=========================+=========================+======================+
|
||||
| .ifc | .obj, .dae, .glb, .stp, | IfcConvert |
|
||||
| | .igs, .xml, .svg, .h5, | |
|
||||
| | .ttl, .ifc, .rdb, | |
|
||||
| | .igs, .xml, .svg, .ttl, | |
|
||||
| | .ifc, .rdb, | |
|
||||
| | .json (xeokit) | |
|
||||
+-------------------------+-------------------------+----------------------+
|
||||
| .ifc | .dae, .abc, .usd, .obj, | Bonsai_ |
|
||||
|
||||
@@ -83,7 +83,6 @@ CLI Manual
|
||||
.json JSON Property definitions and decomposition tree in xeokit json format
|
||||
.rdb RocksDB RocksDB Key-Value store serialization of IFC data
|
||||
.svg SVG Scalable Vector Graphics (2D floor plan)
|
||||
.h5 HDF Hierarchical Data Format storing positions, normals and indices
|
||||
.ttl TTL/WKT RDF Turtle with Well-Known-Text geometry
|
||||
.ifc IFC-SPF Industry Foundation Classes
|
||||
|
||||
|
||||
@@ -29,8 +29,6 @@ IfcOpenShell depends on:
|
||||
- (Optional) `SWIG <http://www.swig.org/>`__ and `Python
|
||||
<https://www.python.org/>`__ - for building the IfcOpenShell Python interface
|
||||
and use in Bonsai
|
||||
- (Optional) `HDF5 <https://www.hdfgroup.org/solutions/hdf5>`__ - for caching
|
||||
geometry using the HDF5 format
|
||||
|
||||
Compiling on Linux
|
||||
------------------
|
||||
@@ -125,13 +123,7 @@ operating systems. GCC (4.7 or newer) or Clang (any version) is required.
|
||||
|
||||
sudo apt-get install python-all-dev swig
|
||||
|
||||
6. For building support for HDF5 caching (ON by default), install dependencies:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo apt-get install libhdf5-dev libaec-dev zlibc
|
||||
|
||||
7. Compile IfcOpenShell itself.
|
||||
6. Compile IfcOpenShell itself.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
@@ -149,11 +141,6 @@ operating systems. GCC (4.7 or newer) or Clang (any version) is required.
|
||||
-DOPENCOLLADA_LIBRARY_DIR="/usr/local/lib/opencollada" \
|
||||
-DPCRE_LIBRARY_DIR=/usr/lib/x86_64-linux-gnu/ \
|
||||
\
|
||||
# Optional HDF5 support
|
||||
-DHDF5_SUPPORT=On \
|
||||
-DHDF5_LIBRARIES="/usr/local/hdf5/lib/libhdf5_cpp.so;/usr/local/hdf5/lib/libhdf5.so;/usr/lib64/libz.so;/usr/lib64/libsz.so;/usr/lib64/libaec.so" \
|
||||
-DHDF5_INCLUDE_DIR="/usr/local/hdf5/include" \
|
||||
\
|
||||
-DCGAL_INCLUDE_DIR=/usr/include \
|
||||
-DGMP_INCLUDE_DIR=/usr/include \
|
||||
-DMPFR_INCLUDE_DIR=/usr/include \
|
||||
@@ -187,7 +174,7 @@ GCC (4.7 or newer) or Clang (any version) is required.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
brew install boost cmake python3 cgal ftgl gmp libaec opencascade swig hdf5 zlib eigen
|
||||
brew install boost cmake python3 cgal ftgl gmp opencascade swig zlib eigen
|
||||
# homebrew automatically links most libraries, except some keg-only ones
|
||||
brew link zlib --force
|
||||
|
||||
@@ -209,8 +196,6 @@ GCC (4.7 or newer) or Clang (any version) is required.
|
||||
-DCGAL_INCLUDE_DIR=/opt/homebrew/include/ \
|
||||
-DGMP_LIBRARY_DIR=/opt/homebrew/lib/ \
|
||||
-DMPFR_LIBRARY_DIR=/opt/homebrew/lib/ \
|
||||
-DHDF5_LIBRARY_DIR=/opt/homebrew/lib/ \
|
||||
-DHDF5_INCLUDE_DIR=/opt/homebrew/include/ \
|
||||
-DEIGEN_DIR=/opt/homebrew/Cellar/eigen/3.4.0_1/include/eigen3 \
|
||||
-DCOLLADA_SUPPORT=0
|
||||
# `sysctl -n hw.ncpu` returns the number of cpu cores on macOS
|
||||
|
||||
@@ -38,7 +38,7 @@ IfcOpenShell has a huge amount of unique features and capabilities not found in
|
||||
- All tools can be used either as a developer library, through a command line interface, or using a rich graphical interface. Whether you're deploying headless server tools for your own pipeline, writing your own apps, or an end-user, there's something for you.
|
||||
- Supports IFC2X3, IFC4, and IFC4.3. Custom schemas (such as experimental or draft schemas) may be loaded at run-time instead of having to recompile.
|
||||
- Built-in IFC validation is possible from basic syntax validation to more detailed "Where Rule" checks. This is the same validation that powers the official buildingSMART validation engine.
|
||||
- Read and write IFC-SPF, IFCJSON, IFCXML, IFCHDF5, MySQL, and SQLite.
|
||||
- Read and write IFC-SPF, IFCJSON, IFCXML, MySQL, and SQLite.
|
||||
- High level API for hundreds of tasks. Perform complex authoring like copying objects, cost calculation, or 4D simulation with one line of code. Imagine a complete native IFC authoring and editing platform where every function is available to you as a library.
|
||||
- Convert parametric geometry into explicit geometry for any CAD system from booleans to complex sweeps. Geometry has been battle-tested over many years to accommodate complex geometric edge cases with an extensive test suite.
|
||||
- Geometry may be converted into voxels and analysed through voxels to resolve complex non-manifold geometry and precision issues. This analysis may be used from things like head height calculations, formwork analysis, to egress distances.
|
||||
|
||||
@@ -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