From c4eed78ca105fb15c32e4aebfe60e36835497e39 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Thu, 7 Sep 2023 18:11:55 +1000 Subject: [PATCH] Update documentation with new selector keys. --- src/blenderbim/docs/devs/writing_docs.rst | 15 +++++++++++++++ src/blenderbim/scripts/generate_demo_library.py | 3 ++- .../docs/ifcopenshell-python/hello_world.rst | 2 +- .../docs/ifcopenshell-python/selector_syntax.rst | 6 ++++++ 4 files changed, 24 insertions(+), 2 deletions(-) diff --git a/src/blenderbim/docs/devs/writing_docs.rst b/src/blenderbim/docs/devs/writing_docs.rst index 0d14e89bee..b33206447d 100644 --- a/src/blenderbim/docs/devs/writing_docs.rst +++ b/src/blenderbim/docs/devs/writing_docs.rst @@ -13,6 +13,11 @@ All documentation is written in ReStructured Text and is available in the `BlenderBIM Add-on docs directory `_. +You can link to `external websites `_. You can also +link to sections on the same page, like `Writing technical documentation`_. + +:doc:`Code examples` + The following colours and annotation styles should be used for annotating images. All stroke widths are 3px with a corner radius of 3px. Horizontal underlines are 5px with a corner radius of 2px. The dark green is ``39b54a`` and @@ -43,6 +48,16 @@ download. `Visit critical link `__ +You can use bulleted lists: + +- Like. +- This. + +Or ordered lists: + +1. Like. +2. This. + .. note:: Instead of writing "Note that XYZ ..." you should use notes sparingly to diff --git a/src/blenderbim/scripts/generate_demo_library.py b/src/blenderbim/scripts/generate_demo_library.py index 7f5775a39f..3990bdaab9 100644 --- a/src/blenderbim/scripts/generate_demo_library.py +++ b/src/blenderbim/scripts/generate_demo_library.py @@ -155,9 +155,10 @@ class LibraryGenerator: self.create_line_type("MEDIUM", "medium") self.create_line_type("THICK", "thick") self.create_line_type("STRONG", "strong") + self.create_text_type("SETOUT-TAG", "setout-tag", ["E ``round({{easting}}, 0.001)``", "N ``round({{northing}}, 0.001)``"]) self.create_text_type("DOOR-TAG", "door-tag", ["{{type.Name}}", "{{Name}}"]) self.create_text_type("WINDOW-TAG", "window-tag", ["{{Name}}"]) - self.create_text_type("SPACE-TAG", "space-tag", ["{{Name}}", "{{Description}}", "``round({{Qto_SpaceBaseQuantities.NetFloorArea}} or 0., 2)``"]) + self.create_text_type("SPACE-TAG", "space-tag", ["{{Name}}", "{{Description}}", "``round({{Qto_SpaceBaseQuantities.NetFloorArea}}, 0.01)``"]) self.create_text_type("MATERIAL-TAG", "rectangle-tag", ["{{material.Name}}"]) self.create_text_type("TYPE-TAG", "capsule-tag", ["{{type.Name}}"]) self.create_text_type("NAME-TAG", "capsule-tag", ["{{Name}}"]) diff --git a/src/ifcopenshell-python/docs/ifcopenshell-python/hello_world.rst b/src/ifcopenshell-python/docs/ifcopenshell-python/hello_world.rst index 5997eaaada..05289bbbd0 100644 --- a/src/ifcopenshell-python/docs/ifcopenshell-python/hello_world.rst +++ b/src/ifcopenshell-python/docs/ifcopenshell-python/hello_world.rst @@ -45,7 +45,7 @@ By selecting elements by their **IFC Class**, and reading their attributes, you can navigate from one element to another. The relationships between elements are called **IFC Concepts** and create meaning in our industry. For example, if a **IfcWall** element has an attribute that references an **IfcBuildingStorey** -element in a particular way, it might mean that the wall is located in the +element in a particular way, it will mean that the wall is located in the ground floor of the building. .. image:: images/ifc-concepts.svg diff --git a/src/ifcopenshell-python/docs/ifcopenshell-python/selector_syntax.rst b/src/ifcopenshell-python/docs/ifcopenshell-python/selector_syntax.rst index e3775e8d02..f01963a2da 100644 --- a/src/ifcopenshell-python/docs/ifcopenshell-python/selector_syntax.rst +++ b/src/ifcopenshell-python/docs/ifcopenshell-python/selector_syntax.rst @@ -184,6 +184,12 @@ Valid keys are: "``material`` or ``mat``", "Gets the assigned material, which may be a material set." "``item`` or ``i``", "If the previous key returns a material set, gets the relevant material set items" "``materials`` or ``mats``", "Gets a list of IfcMaterials assigned directly or indirectly (such as via a material set) to the element" + "``x``", "Gets the X coordinate of the element's placement" + "``y``", "Gets the Y coordinate of the element's placement" + "``z``", "Gets the Z coordinate of the element's placement" + "``easting``", "Gets the map easting of the element's placement" + "``northing``", "Gets the map northing of the element's placement" + "``elevation``", "Gets the map elevation of the element's placement" "``count``", "If the previous key returns multiple things, count that list. Otherwise, return 1." "``{{number}}``", "If the previous key returns multiple things, fetch the ``{{number}}`` index (e.g. 0, 1, 2, 3, etc) item in that list."