mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-10-01 04:29:38 +00:00
fix materials / styles bim tests #4843
This commit is contained in:
@@ -192,13 +192,14 @@ Scenario: Add classification reference - material
|
||||
And the variable "classification" is "{classification_ifc}.by_type('IfcClassification')[0].id()"
|
||||
And I set "scene.BIMClassificationProperties.available_classifications" to "{classification}"
|
||||
And I press "bim.add_classification"
|
||||
And I add a cube
|
||||
And I add a material
|
||||
And I press "bim.add_material(obj='Material')"
|
||||
And I press "bim.add_material(name='Material')"
|
||||
And I press "bim.load_materials"
|
||||
And I press "bim.expand_material_category(category='Uncategorised')"
|
||||
And I set "scene.BIMMaterialProperties.active_material_index" to "1"
|
||||
And the variable "material" is "{ifc}.by_type('IfcMaterial')[0].id()"
|
||||
And I press "bim.change_classification_level(parent_id={classification})"
|
||||
And the variable "reference" is "{classification_ifc}.by_type('IfcClassificationReference')[0].id()"
|
||||
When I press "bim.add_classification_reference(reference={reference}, obj='Material', obj_type='Material')"
|
||||
When I press "bim.add_classification_reference(reference={reference}, obj_type='Material')"
|
||||
Then nothing happens
|
||||
|
||||
Scenario: Remove classification reference - material
|
||||
@@ -207,14 +208,14 @@ Scenario: Remove classification reference - material
|
||||
And the variable "classification" is "{classification_ifc}.by_type('IfcClassification')[0].id()"
|
||||
And I set "scene.BIMClassificationProperties.available_classifications" to "{classification}"
|
||||
And I press "bim.add_classification"
|
||||
And I add a cube
|
||||
And I add a material
|
||||
And I press "bim.add_material(obj='Material')"
|
||||
And the variable "material" is "{ifc}.by_type('IfcMaterial')[0].id()"
|
||||
And I press "bim.add_material(name='Material')"
|
||||
And I press "bim.load_materials"
|
||||
And I press "bim.expand_material_category(category='Uncategorised')"
|
||||
And I set "scene.BIMMaterialProperties.active_material_index" to "1"
|
||||
And I press "bim.change_classification_level(parent_id={classification})"
|
||||
And the variable "reference" is "{classification_ifc}.by_type('IfcClassificationReference')[0].id()"
|
||||
And I press "bim.add_classification_reference(reference={reference}, obj='Material', obj_type='Material')"
|
||||
When I press "bim.remove_classification_reference(reference={reference}, obj='Material', obj_type='Material')"
|
||||
And I press "bim.add_classification_reference(reference={reference}, obj_type='Material')"
|
||||
When I press "bim.remove_classification_reference(reference={reference}, obj_type='Material')"
|
||||
Then nothing happens
|
||||
|
||||
Scenario: Add classification reference - cost
|
||||
|
||||
@@ -207,7 +207,7 @@ Scenario: Update representation - updating a layered extrusion
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType"
|
||||
And I press "bim.assign_class"
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialLayerSet"
|
||||
And I press "bim.assign_material"
|
||||
And I press "bim.enable_editing_assigned_material"
|
||||
@@ -235,7 +235,7 @@ Scenario: Update representation - updating a profiled extrusion
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType"
|
||||
And I press "bim.assign_class"
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialProfileSet"
|
||||
And I press "bim.assign_material"
|
||||
And I press "bim.enable_editing_assigned_material"
|
||||
@@ -327,19 +327,24 @@ Scenario: Override duplicate move - copying a coloured representation
|
||||
Given an empty IFC project
|
||||
And I add a cube
|
||||
And the object "Cube" is selected
|
||||
And I add a material
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
|
||||
And I press "bim.assign_class"
|
||||
And the object "IfcWall/Cube" is selected
|
||||
And the material "Material" colour is set to "1,0,0,1"
|
||||
And I press "bim.load_styles(style_type='IfcSurfaceStyle')"
|
||||
And I press "bim.enable_adding_presentation_style"
|
||||
And I set "scene.BIMStylesProperties.style_name" to "Style"
|
||||
And I set "scene.BIMStylesProperties.surface_colour" to "[1.0,0.0,0.0]"
|
||||
And I press "bim.add_presentation_style"
|
||||
And the variable "style" is "{ifc}.by_type('IfcSurfaceStyle')[0].id()"
|
||||
And I press "bim.assign_style_to_selected(style_id={style})"
|
||||
When I duplicate the selected objects
|
||||
And I press "export_ifc.bim(filepath='{cwd}/test/files/temp/export.ifc')"
|
||||
And an empty Blender session is started
|
||||
And I press "bim.load_project(filepath='{cwd}/test/files/temp/export.ifc', should_start_fresh_session=False)"
|
||||
Then the material "Material" colour is "1,0,0,1"
|
||||
And the object "IfcWall/Cube" has the material "Material"
|
||||
And the object "IfcWall/Cube.001" has the material "Material"
|
||||
Then the material "Style" colour is "1,0,0,1"
|
||||
And the object "IfcWall/Cube" has the material "Style"
|
||||
And the object "IfcWall/Cube.001" has the material "Style"
|
||||
|
||||
Scenario: Override duplicate move - copying a type instance with a representation map
|
||||
Given an empty IFC project
|
||||
@@ -369,7 +374,7 @@ Scenario: Override duplicate move - copying a layered extrusion
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType"
|
||||
And I press "bim.assign_class"
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialLayerSet"
|
||||
And I press "bim.assign_material"
|
||||
And I press "bim.enable_editing_assigned_material"
|
||||
@@ -399,7 +404,7 @@ Scenario: Override duplicate move - copying a profiled extrusion
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType"
|
||||
And I press "bim.assign_class"
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialProfileSet"
|
||||
And I press "bim.assign_material"
|
||||
And I press "bim.enable_editing_assigned_material"
|
||||
|
||||
@@ -3,13 +3,13 @@ Feature: Material
|
||||
|
||||
Scenario: Load materials
|
||||
Given an empty IFC project
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
When I press "bim.load_materials"
|
||||
Then nothing happens
|
||||
|
||||
Scenario: Disable editing materials
|
||||
Given an empty IFC project
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
And I press "bim.load_materials"
|
||||
When I press "bim.disable_editing_materials"
|
||||
Then nothing happens
|
||||
@@ -17,8 +17,8 @@ Scenario: Disable editing materials
|
||||
Scenario: Load materials - then add material
|
||||
Given an empty IFC project
|
||||
And I press "bim.load_materials"
|
||||
When I press "bim.add_material(obj='')"
|
||||
Then the material "Default" exists
|
||||
When I press "bim.add_material()"
|
||||
Then the IFC material "Default" exists
|
||||
|
||||
Scenario: Load materials - then add material set
|
||||
Given an empty IFC project
|
||||
@@ -29,26 +29,8 @@ Scenario: Load materials - then add material set
|
||||
|
||||
Scenario: Add default material
|
||||
Given an empty IFC project
|
||||
When I press "bim.add_material(obj='')"
|
||||
Then the material "Default" exists
|
||||
|
||||
Scenario: Add material
|
||||
Given an empty IFC project
|
||||
And I add a cube
|
||||
And the object "Cube" is selected
|
||||
And I add a material
|
||||
When I press "bim.add_material(obj='Material')"
|
||||
Then the material "Material" is an IFC material
|
||||
|
||||
Scenario: Remove material
|
||||
Given an empty IFC project
|
||||
And I add a cube
|
||||
And the object "Cube" is selected
|
||||
And I add a material
|
||||
And I press "bim.add_material(obj='Material')"
|
||||
And the variable "material" is "{ifc}.by_type('IfcMaterial')[0].id()"
|
||||
When I press "bim.remove_material(material={material})"
|
||||
Then the material "Material" does not exist
|
||||
When I press "bim.add_material()"
|
||||
Then the IFC material "Default" exists
|
||||
|
||||
Scenario: Remove material set
|
||||
Given an empty IFC project
|
||||
@@ -66,10 +48,10 @@ Scenario: Assign material - single material
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
|
||||
And I press "bim.assign_class"
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
When I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterial"
|
||||
And I press "bim.assign_material"
|
||||
Then the object "IfcWall/Cube" has the material "Default"
|
||||
Then the object "IfcWall/Cube" has the IFC material "Default"
|
||||
|
||||
Scenario: Unassign material - single material
|
||||
Given an empty IFC project
|
||||
@@ -78,7 +60,7 @@ Scenario: Unassign material - single material
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
|
||||
And I press "bim.assign_class"
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterial"
|
||||
And I press "bim.assign_material"
|
||||
When I press "bim.unassign_material"
|
||||
@@ -91,7 +73,7 @@ Scenario: Enable editing assigned material - single material
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
|
||||
And I press "bim.assign_class"
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterial"
|
||||
And I press "bim.assign_material"
|
||||
When I press "bim.enable_editing_assigned_material"
|
||||
@@ -104,7 +86,7 @@ Scenario: Disable editing assigned material - single material
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
|
||||
And I press "bim.assign_class"
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterial"
|
||||
And I press "bim.assign_material"
|
||||
And I press "bim.enable_editing_assigned_material"
|
||||
@@ -118,7 +100,7 @@ Scenario: Edit assigned material - single material
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
|
||||
And I press "bim.assign_class"
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterial"
|
||||
And I press "bim.assign_material"
|
||||
And I press "bim.enable_editing_assigned_material"
|
||||
@@ -133,7 +115,7 @@ Scenario: Assign material - material layer set
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType"
|
||||
And I press "bim.assign_class"
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
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"
|
||||
@@ -146,7 +128,7 @@ Scenario: Unassign material - material layer set
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType"
|
||||
And I press "bim.assign_class"
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialLayerSet"
|
||||
And I press "bim.assign_material"
|
||||
When I press "bim.unassign_material"
|
||||
@@ -166,7 +148,7 @@ Scenario: Unassign material - removing inherited material
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType"
|
||||
And I press "bim.assign_class"
|
||||
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialLayerSet"
|
||||
And I press "bim.assign_material"
|
||||
|
||||
@@ -191,7 +173,7 @@ Scenario: Enable editing assigned material - material layer set
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType"
|
||||
And I press "bim.assign_class"
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialLayerSet"
|
||||
And I press "bim.assign_material"
|
||||
When I press "bim.enable_editing_assigned_material"
|
||||
@@ -209,7 +191,7 @@ Scenario: Disable editing assigned material - material layer set
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType"
|
||||
And I press "bim.assign_class"
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialLayerSet"
|
||||
And I press "bim.assign_material"
|
||||
And I press "bim.enable_editing_assigned_material"
|
||||
@@ -228,7 +210,7 @@ Scenario: Edit assigned material - material layer set
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType"
|
||||
And I press "bim.assign_class"
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialLayerSet"
|
||||
And I press "bim.assign_material"
|
||||
And I press "bim.enable_editing_assigned_material"
|
||||
@@ -243,7 +225,7 @@ Scenario: Assign material - material profile set
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType"
|
||||
And I press "bim.assign_class"
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
When I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialProfileSet"
|
||||
And I press "bim.assign_material"
|
||||
Then the object "IfcWallType/Empty" does not have the material "Default"
|
||||
@@ -256,7 +238,7 @@ Scenario: Unassign material - material profile set
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType"
|
||||
And I press "bim.assign_class"
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialProfileSet"
|
||||
And I press "bim.assign_material"
|
||||
When I press "bim.unassign_material"
|
||||
@@ -274,7 +256,7 @@ Scenario: Enable editing assigned material - material profile set
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType"
|
||||
And I press "bim.assign_class"
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialProfileSet"
|
||||
And I press "bim.assign_material"
|
||||
When I press "bim.enable_editing_assigned_material"
|
||||
@@ -292,7 +274,7 @@ Scenario: Disable editing assigned material - material profile set
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType"
|
||||
And I press "bim.assign_class"
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialProfileSet"
|
||||
And I press "bim.assign_material"
|
||||
And I press "bim.enable_editing_assigned_material"
|
||||
@@ -311,7 +293,7 @@ Scenario: Edit assigned material - material profile set
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType"
|
||||
And I press "bim.assign_class"
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialProfileSet"
|
||||
And I press "bim.assign_material"
|
||||
And I press "bim.enable_editing_assigned_material"
|
||||
@@ -326,7 +308,7 @@ Scenario: Assign material - material constituent set
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
|
||||
And I press "bim.assign_class"
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
When I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialConstituentSet"
|
||||
And I press "bim.assign_material"
|
||||
Then nothing happens
|
||||
@@ -338,7 +320,7 @@ Scenario: Unassign material - material constituent set
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
|
||||
And I press "bim.assign_class"
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialConstituentSet"
|
||||
And I press "bim.assign_material"
|
||||
When I press "bim.unassign_material"
|
||||
@@ -351,7 +333,7 @@ Scenario: Enable editing assigned material - material constituent set
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
|
||||
And I press "bim.assign_class"
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialConstituentSet"
|
||||
And I press "bim.assign_material"
|
||||
When I press "bim.enable_editing_assigned_material"
|
||||
@@ -364,7 +346,7 @@ Scenario: Disable editing assigned material - material constituent set
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
|
||||
And I press "bim.assign_class"
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialConstituentSet"
|
||||
And I press "bim.assign_material"
|
||||
And I press "bim.enable_editing_assigned_material"
|
||||
@@ -378,7 +360,7 @@ Scenario: Edit assigned material - material constituent set
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
|
||||
And I press "bim.assign_class"
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialConstituentSet"
|
||||
And I press "bim.assign_material"
|
||||
And I press "bim.enable_editing_assigned_material"
|
||||
@@ -389,7 +371,7 @@ Scenario: Edit assigned material - material constituent set
|
||||
Scenario: Select by material
|
||||
Given an empty IFC project
|
||||
And I press "bim.load_materials"
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
And the variable "material" is "{ifc}.by_type('IfcMaterial')[0].id()"
|
||||
When I press "bim.select_by_material(material={material})"
|
||||
Then nothing happens
|
||||
@@ -397,14 +379,14 @@ Scenario: Select by material
|
||||
Scenario: Expand material category
|
||||
Given an empty IFC project
|
||||
And I press "bim.load_materials"
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
When I press "bim.expand_material_category(category='')"
|
||||
Then nothing happens
|
||||
|
||||
Scenario: Contract material category
|
||||
Given an empty IFC project
|
||||
And I press "bim.load_materials"
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
And I press "bim.expand_material_category(category='')"
|
||||
When I press "bim.contract_material_category(category='')"
|
||||
Then nothing happens
|
||||
@@ -435,7 +417,7 @@ Scenario: Add material set layer
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType"
|
||||
And I press "bim.assign_class"
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialLayerSet"
|
||||
And I press "bim.assign_material"
|
||||
And I press "bim.enable_editing_assigned_material"
|
||||
@@ -457,7 +439,7 @@ Scenario: Remove material set layer
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType"
|
||||
And I press "bim.assign_class"
|
||||
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialLayerSet"
|
||||
And I press "bim.assign_material"
|
||||
|
||||
|
||||
@@ -909,19 +909,3 @@ Scenario: Export IFC - with changed object scale synchronised
|
||||
And an empty Blender session is started
|
||||
And I press "bim.load_project(filepath='{cwd}/test/files/temp/export.ifc')"
|
||||
Then the object "IfcWall/Cube" dimensions are "4,4,4"
|
||||
|
||||
Scenario: Export IFC - with changed style element synchronised
|
||||
Given an empty IFC project
|
||||
And I add a cube
|
||||
And the object "Cube" is selected
|
||||
And I add a material
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
|
||||
And I press "bim.assign_class"
|
||||
And the object "IfcWall/Cube" is selected
|
||||
When I add a material
|
||||
And the material "Material.001" colour is set to "1,0,0,1"
|
||||
And I press "export_ifc.bim(filepath='{cwd}/test/files/temp/export.ifc')"
|
||||
And an empty Blender session is started
|
||||
And I press "bim.load_project(filepath='{cwd}/test/files/temp/export.ifc', should_start_fresh_session=False)"
|
||||
Then the material "Material.001" colour is "1,0,0,1"
|
||||
|
||||
@@ -50,20 +50,16 @@ Scenario: Enable pset editing - object
|
||||
|
||||
Scenario: Enable pset editing - material
|
||||
Given an empty IFC project
|
||||
And I add a cube
|
||||
And the object "Cube" is selected
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
|
||||
And I press "bim.assign_class"
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterial"
|
||||
And I press "bim.assign_material"
|
||||
And the object "IfcWall/Cube" is selected
|
||||
And I press "bim.add_pset(obj='Default', obj_type='Material')"
|
||||
And I set "active_object.active_material.PsetProperties.properties[0].metadata.float_value" to "0.42"
|
||||
And I press "bim.edit_pset(obj='Default', obj_type='Material')"
|
||||
And I press "bim.add_material()"
|
||||
And I press "bim.load_materials"
|
||||
And I press "bim.expand_material_category(category='Uncategorised')"
|
||||
And I set "scene.BIMMaterialProperties.active_material_index" to "1"
|
||||
And I set "scene.MaterialPsetProperties.pset_name" to "Pset_MaterialCommon"
|
||||
And I press "bim.add_pset(obj='', obj_type='Material')"
|
||||
And I set "scene.MaterialPsetProperties.properties[0].metadata.float_value" to "0.42"
|
||||
And I press "bim.edit_pset(obj='', obj_type='Material')"
|
||||
And the variable "pset" is "{ifc}.by_type('IfcMaterialProperties')[-1].id()"
|
||||
When I press "bim.enable_pset_editing(pset_id={pset}, obj='Default', obj_type='Material')"
|
||||
When I press "bim.enable_pset_editing(pset_id={pset}, obj='', obj_type='Material')"
|
||||
Then nothing happens
|
||||
|
||||
Scenario: Enable pset editing - profile
|
||||
@@ -143,15 +139,10 @@ Scenario: Disable pset editing - object
|
||||
|
||||
Scenario: Disable pset editing - material
|
||||
Given an empty IFC project
|
||||
And I add a cube
|
||||
And the object "Cube" is selected
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
|
||||
And I press "bim.assign_class"
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterial"
|
||||
And I press "bim.assign_material"
|
||||
And the object "IfcWall/Cube" is selected
|
||||
And I press "bim.add_material()"
|
||||
And I press "bim.load_materials"
|
||||
And I press "bim.expand_material_category(category='Uncategorised')"
|
||||
And I set "scene.BIMMaterialProperties.active_material_index" to "1"
|
||||
And I press "bim.add_pset(obj='Default', obj_type='Material')"
|
||||
When I press "bim.disable_pset_editing(obj='Default', obj_type='Material')"
|
||||
Then nothing happens
|
||||
@@ -236,17 +227,12 @@ Scenario: Edit qto - object
|
||||
|
||||
Scenario: Edit pset - material
|
||||
Given an empty IFC project
|
||||
And I add a cube
|
||||
And the object "Cube" is selected
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
|
||||
And I press "bim.assign_class"
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterial"
|
||||
And I press "bim.assign_material"
|
||||
And the object "IfcWall/Cube" is selected
|
||||
And I press "bim.add_pset(obj='Default', obj_type='Material')"
|
||||
When I press "bim.edit_pset(obj='Default', obj_type='Material')"
|
||||
And I press "bim.add_material()"
|
||||
And I press "bim.load_materials"
|
||||
And I press "bim.expand_material_category(category='Uncategorised')"
|
||||
And I set "scene.BIMMaterialProperties.active_material_index" to "1"
|
||||
And I press "bim.add_pset(obj='', obj_type='Material')"
|
||||
When I press "bim.edit_pset(obj='', obj_type='Material')"
|
||||
Then nothing happens
|
||||
|
||||
Scenario: Edit pset - profile
|
||||
|
||||
@@ -20,15 +20,20 @@ Scenario: Unlink object
|
||||
Given an empty IFC project
|
||||
And I add a cube
|
||||
And the object "Cube" is selected
|
||||
And I add a material
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
|
||||
And I press "bim.assign_class"
|
||||
And I press "bim.add_style()"
|
||||
And I press "bim.load_styles(style_type='IfcSurfaceStyle')"
|
||||
And I press "bim.enable_adding_presentation_style"
|
||||
And I set "scene.BIMStylesProperties.style_name" to "Style"
|
||||
And I press "bim.add_presentation_style"
|
||||
And the object "IfcWall/Cube" is selected
|
||||
And the variable "style" is "{ifc}.by_type('IfcSurfaceStyle')[0].id()"
|
||||
And I press "bim.assign_style_to_selected(style_id={style})"
|
||||
When I press "bim.unlink_object(obj='IfcWall/Cube')"
|
||||
Then the object "Cube" is not an IFC element
|
||||
And the material "Material" is an IFC style
|
||||
And the material "Material.001" is not an IFC style
|
||||
And the material "Style" is an IFC style
|
||||
And the material "Style.001" is not an IFC style
|
||||
|
||||
Scenario: Copy class
|
||||
Given an empty IFC project
|
||||
|
||||
@@ -1,94 +1,121 @@
|
||||
@style
|
||||
Feature: Style
|
||||
|
||||
Scenario: Update style colours
|
||||
Given an empty IFC project
|
||||
And I add a cube
|
||||
And I add a material
|
||||
And I press "bim.add_style"
|
||||
When I press "bim.update_style_colours"
|
||||
Then nothing happens
|
||||
|
||||
Scenario: Remove style
|
||||
Given an empty IFC project
|
||||
And I add a cube
|
||||
And I add a material
|
||||
And I press "bim.add_style"
|
||||
And the variable "style" is "{ifc}.by_type('IfcSurfaceStyle')[0].id()"
|
||||
When I press "bim.remove_style(style={style})"
|
||||
Then nothing happens
|
||||
|
||||
Scenario: Add style to current blender material
|
||||
Given an empty IFC project
|
||||
And I add a cube
|
||||
And I add a material
|
||||
When I press "bim.add_style"
|
||||
Then nothing happens
|
||||
|
||||
Scenario: Unlink style
|
||||
Given an empty IFC project
|
||||
And I add a cube
|
||||
And I add a material
|
||||
And I press "bim.add_style"
|
||||
When I press "bim.unlink_style"
|
||||
Then the material "Material" is not an IFC style
|
||||
And the object "Cube" is selected
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
|
||||
And I press "bim.assign_class"
|
||||
And the object "IfcWall/Cube" is selected
|
||||
And I press "bim.load_styles(style_type='IfcSurfaceStyle')"
|
||||
And I press "bim.enable_adding_presentation_style"
|
||||
And I set "scene.BIMStylesProperties.style_name" to "Style"
|
||||
And I press "bim.add_presentation_style"
|
||||
And the variable "style" is "{ifc}.by_type('IfcSurfaceStyle')[0].id()"
|
||||
And I press "bim.assign_style_to_selected(style_id={style})"
|
||||
When I press "bim.unlink_style(blender_material='Style')"
|
||||
Then the material "Style" is not an IFC style
|
||||
|
||||
Scenario: Add a new style
|
||||
Given an empty IFC project
|
||||
And I press "bim.load_styles(style_type='IfcSurfaceStyle')"
|
||||
And I press "bim.enable_adding_presentation_style"
|
||||
And I set "scene.BIMStylesProperties.style_name" to "Style"
|
||||
And I set "scene.BIMStylesProperties.surface_colour" to "[1.0,0.0,0.0]"
|
||||
When I press "bim.add_presentation_style"
|
||||
Then nothing happens
|
||||
Then the material "Style" colour is "1,0,0,1"
|
||||
And the material "Style" is an IFC style
|
||||
|
||||
Scenario: Disable adding a new style
|
||||
Given an empty IFC project
|
||||
And I press "bim.load_styles(style_type='IfcSurfaceStyle')"
|
||||
And I press "bim.enable_adding_presentation_style"
|
||||
When I press "bim.disable_adding_presentation_style"
|
||||
Then nothing happens
|
||||
|
||||
Scenario: Remove style
|
||||
Given an empty IFC project
|
||||
And I press "bim.load_styles(style_type='IfcSurfaceStyle')"
|
||||
And I press "bim.enable_adding_presentation_style"
|
||||
And I set "scene.BIMStylesProperties.style_name" to "Style"
|
||||
And I set "scene.BIMStylesProperties.surface_colour" to "[1.0,0.0,0.0]"
|
||||
And I press "bim.add_presentation_style"
|
||||
And the variable "style" is "{ifc}.by_type('IfcSurfaceStyle')[0].id()"
|
||||
When I press "bim.remove_style(style={style})"
|
||||
Then the material "Style" does not exist
|
||||
|
||||
Scenario: Edit style
|
||||
Given an empty IFC project
|
||||
And I press "bim.load_styles(style_type='IfcSurfaceStyle')"
|
||||
And I press "bim.enable_adding_presentation_style"
|
||||
And I set "scene.BIMStylesProperties.style_name" to "Style"
|
||||
And I press "bim.add_presentation_style"
|
||||
And the variable "style" is "{ifc}.by_type('IfcSurfaceStyle')[0].id()"
|
||||
And I press "bim.enable_editing_style(style={style})"
|
||||
And I set "scene.BIMStylesProperties.attributes[0].string_value" to "NewStyle"
|
||||
When I press "bim.edit_style"
|
||||
Then nothing happens
|
||||
Then the material "Style" does not exist
|
||||
And the material "NewStyle" exists
|
||||
|
||||
Scenario: Disable editing style
|
||||
Given an empty IFC project
|
||||
And I press "bim.load_styles(style_type='IfcSurfaceStyle')"
|
||||
And I press "bim.enable_adding_presentation_style"
|
||||
And I set "scene.BIMStylesProperties.style_name" to "Style"
|
||||
And I press "bim.add_presentation_style"
|
||||
And the variable "style" is "{ifc}.by_type('IfcSurfaceStyle')[0].id()"
|
||||
And I press "bim.enable_editing_style(style={style})"
|
||||
And I set "scene.BIMStylesProperties.attributes[0].string_value" to "NewStyle"
|
||||
When I press "bim.disable_editing_style"
|
||||
Then nothing happens
|
||||
Then the material "NewStyle" does not exist
|
||||
And the material "Style" exists
|
||||
|
||||
Scenario: Load styles
|
||||
Given an empty IFC project
|
||||
And I add a cube
|
||||
And I add a material
|
||||
And I press "bim.add_style"
|
||||
When I press "bim.load_styles(style_type='IfcSurfaceStyle')"
|
||||
Then nothing happens
|
||||
|
||||
Scenario: Disable editing styles
|
||||
Given an empty IFC project
|
||||
And I add a cube
|
||||
And I add a material
|
||||
And I press "bim.add_style"
|
||||
And I press "bim.load_styles(style_type='IfcSurfaceStyle')"
|
||||
When I press "bim.disable_editing_styles"
|
||||
Then nothing happens
|
||||
|
||||
Scenario: Assign style to selected
|
||||
Given an empty IFC project
|
||||
And I add a cube
|
||||
And the object "Cube" is selected
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
|
||||
And I press "bim.assign_class"
|
||||
And the object "IfcWall/Cube" is selected
|
||||
And I press "bim.load_styles(style_type='IfcSurfaceStyle')"
|
||||
And I press "bim.enable_adding_presentation_style"
|
||||
And I set "scene.BIMStylesProperties.style_name" to "Style"
|
||||
And I press "bim.add_presentation_style"
|
||||
And the variable "style" is "{ifc}.by_type('IfcSurfaceStyle')[0].id()"
|
||||
When I press "bim.assign_style_to_selected(style_id={style})"
|
||||
Then the object "IfcWall/Cube" has the material "Style"
|
||||
|
||||
Scenario: Select by style
|
||||
Given an empty IFC project
|
||||
And I add a cube
|
||||
And I add a material
|
||||
And I press "bim.add_style"
|
||||
And the object "Cube" is selected
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
|
||||
And I press "bim.assign_class"
|
||||
And the object "IfcWall/Cube" is selected
|
||||
And I press "bim.load_styles(style_type='IfcSurfaceStyle')"
|
||||
And I press "bim.enable_adding_presentation_style"
|
||||
And I set "scene.BIMStylesProperties.style_name" to "Style"
|
||||
And I press "bim.add_presentation_style"
|
||||
And the variable "style" is "{ifc}.by_type('IfcSurfaceStyle')[0].id()"
|
||||
When I press "bim.select_by_style(style={style})"
|
||||
Then nothing happens
|
||||
And I press "bim.assign_style_to_selected(style_id={style})"
|
||||
And the variable "style" is "{ifc}.by_type('IfcSurfaceStyle')[0].id()"
|
||||
When I deselect all objects
|
||||
And I press "bim.select_by_style(style={style})"
|
||||
Then the object "IfcWall/Cube" is selected
|
||||
|
||||
@@ -85,13 +85,12 @@ Scenario: Assign type - assign to a type with a material layer set, which automa
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType"
|
||||
And I press "bim.assign_class"
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialLayerSet"
|
||||
And I press "bim.assign_material"
|
||||
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 "SweptSolid" representation of "Model/Body/MODEL_VIEW"
|
||||
And the object "IfcWall/Cube" has 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"
|
||||
|
||||
@@ -108,7 +107,7 @@ Scenario: Assign type - assign to a different type with a material layer set
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType"
|
||||
And I press "bim.assign_class"
|
||||
And the variable "type" is "{ifc}.by_type('IfcWallType')[-1].id()"
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialLayerSet"
|
||||
And I press "bim.assign_material"
|
||||
And I add an empty
|
||||
@@ -127,7 +126,6 @@ Scenario: Assign type - assign to a different type with a material layer set
|
||||
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 "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')"
|
||||
@@ -146,7 +144,7 @@ Scenario: Assign type - assign to a type with a material profile set
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType"
|
||||
And I press "bim.assign_class"
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialProfileSet"
|
||||
And I press "bim.assign_material"
|
||||
And I press "bim.enable_editing_assigned_material"
|
||||
|
||||
Reference in New Issue
Block a user