Update documentation with new selector keys.

This commit is contained in:
Dion Moult
2023-09-07 18:11:55 +10:00
parent 0fb9f584cb
commit 6ad51ebd18
4 changed files with 24 additions and 2 deletions
+15
View File
@@ -13,6 +13,11 @@ All documentation is written in ReStructured Text and is available in the
`BlenderBIM Add-on docs directory
<https://github.com/IfcOpenShell/IfcOpenShell/tree/v0.7.0/src/blenderbim/docs>`_.
You can link to `external websites <https://ifcopenshell.org>`_. You can also
link to sections on the same page, like `Writing technical documentation`_.
:doc:`Code examples<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 <https://blenderbim.org>`__
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
@@ -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}}"])
@@ -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
@@ -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."