From 2e4a2712e932d977c2f9ad236883e4972b30fc92 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Fri, 28 Jun 2024 16:40:26 +0500 Subject: [PATCH] ifcopenshell.geom - document available geometry libraries --- src/ifcopenshell-python/ifcopenshell/geom/main.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/ifcopenshell-python/ifcopenshell/geom/main.py b/src/ifcopenshell-python/ifcopenshell/geom/main.py index c48ab4d195..ec392ff3fa 100644 --- a/src/ifcopenshell-python/ifcopenshell/geom/main.py +++ b/src/ifcopenshell-python/ifcopenshell/geom/main.py @@ -107,6 +107,12 @@ SERIALIZER_SETTING = Literal[ "digits", ] +# NOTE: hybrid-cgal-simple-opencascade is added just as an example +# It's possible to use any hybrid combination by the format below: +# "hybrid-library1-library2". +# List is updated from AbstractKernel.cpp. +GEOMETRY_LIBRARY = Literal["cgal", "cgal-simple", "opencascade", "hybrid-cgal-simple-opencascade"] + class missing_setting: def __repr__(self): @@ -222,7 +228,7 @@ class iterator(ifcopenshell_wrapper.Iterator): num_threads: int = 1, include: Optional[Union[list[entity_instance], list[str]]] = None, exclude: Optional[Union[list[entity_instance], list[str]]] = None, - geometry_library: str = "opencascade", + geometry_library: GEOMETRY_LIBRARY = "opencascade", ): self.settings = settings if isinstance(file_or_filename, file): @@ -411,7 +417,7 @@ def iterate( exclude=None, with_progress=False, cache=None, - geometry_library: str = "opencascade", + geometry_library: GEOMETRY_LIBRARY = "opencascade", ): it = iterator(settings, file_or_filename, num_threads, include, exclude, geometry_library) if cache: