From f0266a16a3f587e71197224946274b3d65ceaf03 Mon Sep 17 00:00:00 2001 From: Massimo Fabbro Date: Tue, 18 Oct 2022 22:14:49 +0200 Subject: [PATCH] Little improve about code example doc and geometry setting doc --- .../ifcopenshell-python/code_examples.rst | 20 +++++++++++++++++++ .../docs/ifcopenshell/geometry_settings.rst | 8 ++++++++ 2 files changed, 28 insertions(+) diff --git a/src/ifcopenshell-python/docs/ifcopenshell-python/code_examples.rst b/src/ifcopenshell-python/docs/ifcopenshell-python/code_examples.rst index 55ba4e3ca1..b8f9c5f91e 100644 --- a/src/ifcopenshell-python/docs/ifcopenshell-python/code_examples.rst +++ b/src/ifcopenshell-python/docs/ifcopenshell-python/code_examples.rst @@ -166,6 +166,26 @@ Get the distribution system of an element # For example, it might be part of a Chilled Water system print("This pipe is part of the system", system.Name) +Copy an entity +----------------------------------------- + +Copy an entity is possible in different ways, depending on the task. + +.. code-block:: python + root.copy_class + +This is high level and makes sensible assumptions about copying things like properties, quantities, openings, and other relationships. + +.. code-block:: python + util.element.copy + +This is for shallow copies. + +.. code-block:: python + util.element.copy_deep + +This is for deep graph copy. + Create a simple model from scratch ---------------------------------- diff --git a/src/ifcopenshell-python/docs/ifcopenshell/geometry_settings.rst b/src/ifcopenshell-python/docs/ifcopenshell/geometry_settings.rst index 7a217c0948..2c0ef253ab 100644 --- a/src/ifcopenshell-python/docs/ifcopenshell/geometry_settings.rst +++ b/src/ifcopenshell-python/docs/ifcopenshell/geometry_settings.rst @@ -268,6 +268,14 @@ As in most viewer applications, IfcOpeningElement geometry is subtracted from th Disabling this settings will reduce processing time and improve robustness as it involves 3D Boolean operations. +For example, if you want to set this setting in a python script you can use the following: + +.. code-block:: python + + settings = ifcopenshell.geom.settings() + settings.set(settings.DISABLE_OPENING_SUBTRACTIONS, True) + + DISABLE_TRIANGULATION ---------------------