Add .ttl + Well Known Text geometry serializer

This commit is contained in:
Thomas Krijnen
2024-09-27 16:32:41 +02:00
parent be68a8fdde
commit 314534436d
6 changed files with 386 additions and 2 deletions
@@ -570,3 +570,13 @@ class serializers:
hdf5 = ifcopenshell_wrapper.HdfSerializer
except:
pass
# ttl is always available since it doesn't depend on any C++ libraries,
# just people might be using an outdated binary
if hasattr(ifcopenshell_wrapper, 'TtlWktSerializer'):
@staticmethod
def ttl(
out_filename: Union[str, serializers.buffer], geometry_settings: settings, settings: serializer_settings
) -> ifcopenshell_wrapper.SvgSerializer:
out_filename = transform_string(out_filename)
return ifcopenshell_wrapper.TtlWktSerializer(out_filename, geometry_settings, settings)