From 319aada33b320c0f6526866d905049dd49f1c8d1 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Sun, 11 Sep 2022 22:14:11 +1000 Subject: [PATCH] Fix #2388. --- src/blenderbim/blenderbim/bim/import_ifc.py | 2 +- src/blenderbim/docs/users/creating_an_ifc_model.rst | 12 ++++-------- src/ifctester/test/test_facet.py | 6 ++++-- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/blenderbim/blenderbim/bim/import_ifc.py b/src/blenderbim/blenderbim/bim/import_ifc.py index bc9e1c4984..a8e950752a 100644 --- a/src/blenderbim/blenderbim/bim/import_ifc.py +++ b/src/blenderbim/blenderbim/bim/import_ifc.py @@ -896,7 +896,7 @@ class IfcImporter: elif element.is_a("IfcAnnotation") and element.ObjectType == "DRAWING": mesh = self.create_camera(element, shape) self.link_mesh(shape, mesh) - elif element.is_a("IfcAnnotation") and self.is_curve_annotation(element): + elif element.is_a("IfcAnnotation") and self.is_curve_annotation(element) and shape: mesh = self.create_curve(element, shape) self.link_mesh(shape, mesh) elif shape: diff --git a/src/blenderbim/docs/users/creating_an_ifc_model.rst b/src/blenderbim/docs/users/creating_an_ifc_model.rst index 7cf6c74664..c2593a5b95 100644 --- a/src/blenderbim/docs/users/creating_an_ifc_model.rst +++ b/src/blenderbim/docs/users/creating_an_ifc_model.rst @@ -22,13 +22,10 @@ In the **Properties** panel in the bottom right, activate the icon for the .. image:: create-project.png -For convenience, this IFC project by default defines length, area, and volume -units, and assumes you'll be working with both 2D and 3D geoemtry. - In the top right **Outliner** panel, you will see a hierarchy of spaces that has been automatically created for you. This hierarchy is known is the **Spatial -Tree**. The Camera, Cube, and Light by default come with a fresh new Blender -session, and are not part of your IFC project. +Tree**. The Camera, Cube, and Light come with a fresh new Blender session by +default, and are not part of your IFC project. .. image:: default-spatial-tree.png @@ -46,9 +43,8 @@ IFC Class**. .. tip:: - Regardless of the type of geometry or shape of the object, there are no - restrictions on which category you can choose. You can have a monkey-shaped - wall if you want! + There are no restrictions on which **IFC Class** you can choose regardless of + the shape of your object. You can have a monkey-shaped wall if you want! All IFC objects must also belong inside the **Spatial Tree**. In the **Outliner** panel, you can drag and drop your newly created **IfcColumn/Cube** diff --git a/src/ifctester/test/test_facet.py b/src/ifctester/test/test_facet.py index d481091796..28920a7870 100644 --- a/src/ifctester/test/test_facet.py +++ b/src/ifctester/test/test_facet.py @@ -816,7 +816,7 @@ class TestProperty: propertySet="propertySet", name="name", value="value", - measure="String", + measure="measure", uri="https://test.com", minOccurs="0", maxOccurs="unbounded", @@ -826,7 +826,7 @@ class TestProperty: "propertySet": {"simpleValue": "propertySet"}, "name": {"simpleValue": "name"}, "value": {"simpleValue": "value"}, - "@measure": "String", + "@measure": "measure", "@uri": "https://test.com", "@minOccurs": "0", "@maxOccurs": "unbounded", @@ -1224,6 +1224,8 @@ class TestPartOf: } def test_filtering_using_a_partof_facet(self): + set_facet("partof") + ifc = ifcopenshell.file() element = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcElementAssembly")