diff --git a/src/blenderbim/blenderbim/bim/module/root/data.py b/src/blenderbim/blenderbim/bim/module/root/data.py index fc72d15a32..123440327c 100644 --- a/src/blenderbim/blenderbim/bim/module/root/data.py +++ b/src/blenderbim/blenderbim/bim/module/root/data.py @@ -79,6 +79,11 @@ class IfcClassData: names = [d.name() for d in declarations] if ifc_product == "IfcElementType" and tool.Ifc.get_schema() in ("IFC2X3", "IFC4"): names.extend(("IfcDoorStyle", "IfcWindowStyle")) + if ifc_product == "IfcElement": + names.remove("IfcOpeningElement") + if tool.Ifc.get_schema() == "IFC4": + # Yeah, weird isn't it. + names.remove("IfcOpeningStandardCase") version = tool.Ifc.get_schema() return [(c, c, (get_entity_doc(version, c) or {}).get("description", "")) for c in sorted(names)] diff --git a/src/blenderbim/test/bim/feature/material.feature b/src/blenderbim/test/bim/feature/material.feature index 8b5127edd7..3e850021bb 100644 --- a/src/blenderbim/test/bim/feature/material.feature +++ b/src/blenderbim/test/bim/feature/material.feature @@ -141,7 +141,7 @@ Scenario: Assign material - material layer set When I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialLayerSet" And I press "bim.assign_material" Then the object "IfcWallType/Empty" does not have the material "Default" - And the object "IfcWallType/Empty" has a "0.1" thick layered material containing the material "Default" + And the object "IfcWallType/Empty" has a "100" thick layered material containing the material "Default" Scenario: Unassign material - material layer set Given an empty IFC project @@ -173,9 +173,9 @@ Scenario: Unassign material - material layer set usages will not be removed And the object "IfcWall/Cube" is selected When the variable "type" is "{ifc}.by_type('IfcWallType')[0].id()" And I press "bim.assign_type(relating_type={type}, related_object='IfcWall/Cube')" - Then the object "IfcWall/Cube" has a "0.1" thick layered material containing the material "Default" + Then the object "IfcWall/Cube" has a "100" thick layered material containing the material "Default" When I press "bim.unassign_material" - Then the object "IfcWall/Cube" has a "0.1" thick layered material containing the material "Default" + Then the object "IfcWall/Cube" has a "100" thick layered material containing the material "Default" Scenario: Enable editing assigned material - material layer set Given an empty IFC project @@ -448,4 +448,4 @@ Scenario: Remove material set layer And I press "bim.remove_layer(layer={ifc}.by_id({material_set}).MaterialLayers[0].id())" And I press "bim.add_layer(layer_set={material_set})" When I press "bim.remove_layer(layer={ifc}.by_id({material_set}).MaterialLayers[0].id())" - Then nothing happens \ No newline at end of file + Then nothing happens diff --git a/src/blenderbim/test/bim/feature/root.feature b/src/blenderbim/test/bim/feature/root.feature index 9b80a2419a..16e7adb964 100644 --- a/src/blenderbim/test/bim/feature/root.feature +++ b/src/blenderbim/test/bim/feature/root.feature @@ -82,18 +82,6 @@ Scenario: Assign a spatial class to a cube already in a collection And the collection "IfcSpace/Cube" is in the collection "IfcBuildingStorey/My Storey" And the object "IfcSpace/Cube" has a "Tessellation" representation of "Model/Body/MODEL_VIEW" -Scenario: Assign an opening class to a cube - Given an empty IFC project - And I add a cube - When the object "Cube" is selected - And I set "scene.BIMRootProperties.ifc_product" to "IfcElement" - And I set "scene.BIMRootProperties.ifc_class" to "IfcOpeningElement" - And I press "bim.assign_class" - Then the object "IfcOpeningElement/Cube" is an "IfcOpeningElement" - And the object "IfcOpeningElement/Cube" should display as "WIRE" - And the object "IfcOpeningElement/Cube" is in the collection "IfcOpeningElements" - And the object "IfcOpeningElement/Cube" has a "Tessellation" representation of "Model/Body/MODEL_VIEW" - Scenario: Assign a class to a cube in a collection Given an empty IFC project And I add a cube diff --git a/src/blenderbim/test/bim/feature/type.feature b/src/blenderbim/test/bim/feature/type.feature index ec6994c864..1e02167b6b 100644 --- a/src/blenderbim/test/bim/feature/type.feature +++ b/src/blenderbim/test/bim/feature/type.feature @@ -87,10 +87,10 @@ Scenario: Assign type - assign to a type with a material layer set, which automa And I press "bim.assign_type(relating_type={type}, related_object='IfcWall/Cube')" Then the object "IfcWall/Cube" has a "SweptSolid" representation of "Model/Body/MODEL_VIEW" And the object "IfcWall/Cube" has the material "Default" - And the object "IfcWall/Cube" has a "0.1" thick layered material containing the material "Default" + And the object "IfcWall/Cube" has a "100" thick layered material containing the material "Default" And the object "IfcWall/Cube" dimensions are "2,.1,3" -Scenario: Assign type - assign to a dfferent type with a material layer set +Scenario: Assign type - assign to a different type with a material layer set Given an empty IFC project And I add a cube And the object "Cube" is selected @@ -116,16 +116,16 @@ Scenario: Assign type - assign to a dfferent type with a material layer set And the variable "layer_set" is "ifcopenshell.util.element.get_material({ifc}.by_id({type2})).id()" And the variable "layer" is "{ifc}.by_id({layer_set}).MaterialLayers[0].id()" And I press "bim.enable_editing_material_set_item(material_set_item={layer})" - And I set "active_object.BIMObjectMaterialProperties.material_set_item_attributes[0].float_value" to "0.2" + And I set "active_object.BIMObjectMaterialProperties.material_set_item_attributes[0].float_value" to "200" And I press "bim.edit_material_set_item(material_set_item={layer})" And I press "bim.edit_assigned_material(material_set={layer_set})" When I press "bim.assign_type(relating_type={type}, related_object='IfcWall/Cube')" Then the object "IfcWall/Cube" has a "SweptSolid" representation of "Model/Body/MODEL_VIEW" And the object "IfcWall/Cube" has the material "Default" - And the object "IfcWall/Cube" has a "0.1" thick layered material containing the material "Default" + And the object "IfcWall/Cube" has a "100" thick layered material containing the material "Default" And the object "IfcWall/Cube" dimensions are "2,.1,3" When I press "bim.assign_type(relating_type={type2}, related_object='IfcWall/Cube')" - Then the object "IfcWall/Cube" has a "0.2" thick layered material containing the material "Default" + Then the object "IfcWall/Cube" has a "200" thick layered material containing the material "Default" And the object "IfcWall/Cube" dimensions are "2,.2,3" Scenario: Assign type - assign to a type with a material profile set diff --git a/src/blenderbim/test/bim/feature/void.feature b/src/blenderbim/test/bim/feature/void.feature index cdba961635..9052fb8409 100644 --- a/src/blenderbim/test/bim/feature/void.feature +++ b/src/blenderbim/test/bim/feature/void.feature @@ -15,34 +15,6 @@ Scenario: Add an opening Then the object "Cube" does not exist And the object "IfcWall/Cube" is voided by "Cube" -Scenario: Add an opening on an opening - Given an empty IFC project - And I add a cube - And the object "Cube" is selected - And I set "scene.BIMRootProperties.ifc_class" to "IfcOpeningElement" - And I press "bim.assign_class" - And I add a cube - And the object "Cube" is selected - And I set "scene.BIMRootProperties.ifc_class" to "IfcOpeningElement" - And I press "bim.assign_class" - And the object "IfcOpeningElement/Cube" is selected - And additionally the object "IfcOpeningElement/Cube.001" is selected - When I press "bim.add_opening" - Then the object "IfcOpeningElement/Cube" is not a void - And the object "IfcOpeningElement/Cube.001" is not a void - -Scenario: Add an opening on a non IFC object - Given an empty IFC project - And I add a cube - And the object "Cube" is selected - And I set "scene.BIMRootProperties.ifc_class" to "IfcOpeningElement" - And I press "bim.assign_class" - And I add a cube - And the object "Cube" is selected - When I press "bim.add_opening" - Then the object "IfcOpeningElement/Cube" is not a void - And the object "Cube" is not an IFC element - Scenario: Add an opening using the BIM tool Given an empty IFC project And I add a cube