From deb41d215827f8688e64c5d766225b1665d65c54 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Thu, 5 Sep 2024 10:55:41 +0500 Subject: [PATCH] Geometry settings documentation fixes #5312 --- .../docs/ifcopenshell/geometry_settings.rst | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/ifcopenshell-python/docs/ifcopenshell/geometry_settings.rst b/src/ifcopenshell-python/docs/ifcopenshell/geometry_settings.rst index 10c2822bfa..1299fe2e27 100644 --- a/src/ifcopenshell-python/docs/ifcopenshell/geometry_settings.rst +++ b/src/ifcopenshell-python/docs/ifcopenshell/geometry_settings.rst @@ -61,7 +61,7 @@ APPLY_DEFAULT_MATERIALS +------+-------------------+---------+ | Type | IfcConvert Option | Default | +======+===================+=========+ -| BOOL | Always enabled | False | +| BOOL | Always enabled | True | +------+-------------------+---------+ Given the command invocation: @@ -82,6 +82,8 @@ The interactive session below shows how with this setting enabled you will get a >>> import ifcopenshell, ifcopenshell.geom >>> f = ifcopenshell.open("model.ifc") >>> s = ifcopenshell.geom.settings() + >>> # By default setting is enabled, we disable it for demonstration. + >>> s.set("apply-default-materials", False) >>> c = f["3bXiCStxP6Fgxdej$yc50U"] >>> >>> shp = ifcopenshell.geom.create_shape(s, c) @@ -90,12 +92,12 @@ The interactive session below shows how with this setting enabled you will get a >>> [(m.name, m.diffuse) for m in shp.geometry.materials] [] >>> - >>> s.set(s.APPLY_DEFAULT_MATERIALS, True) + >>> s.set("apply-default-materials", True) >>> shp = ifcopenshell.geom.create_shape(s, c) >>> shp.geometry.material_ids (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) >>> [(m.name, m.diffuse) for m in shp.geometry.materials] - [('IfcCovering', (0.7, 0.7, 0.7))] + [('IfcCovering', colour 0.7 0.7 0.7)] This is enabled by default for the IfcConvert serializers as they will not gracefully handle -1 material indices and allows users to quickly assign colours based on entity types in their modelling applications. @@ -611,7 +613,8 @@ USE_PYTHON_OPENCASCADE Only available in Python when an import of ``OCC.Core.BRepTools`` or ``OCC.BRepTools`` succeeds. -This implies ``USE_WORLD_COORDS`` ``USE_BREP_DATA`` and ``DISABLE_TRIANGULATION``. The serialized TopoDS_Shape of ``USE_BREP_DATA`` is deserialized by Python OpenCASCADE. +This implies ``USE_WORLD_COORDS`` and ``ITERATOR_OUTPUT`` set to ``SERIALIZED``. +The serialized TopoDS_Shape from iterator output is deserialized by Python OpenCASCADE. USE_WORLD_COORDS ----------------