An axis context is now added by default for all new projects

This commit is contained in:
Dion Moult
2022-09-17 21:41:09 +10:00
parent 6d0fdb32c6
commit ce8da8bd85
4 changed files with 17 additions and 5 deletions
@@ -45,6 +45,9 @@ def create_project(ifc, project, schema=None, template=None):
context_type="Model", context_identifier="Box", target_view="MODEL_VIEW", parent=model
)
plan = project.run_context_add_context(context_type="Plan", context_identifier="", target_view="", parent=0)
project.run_context_add_context(
context_type="Plan", context_identifier="Axis", target_view="GRAPH_VIEW", parent=plan
)
project.run_context_add_context(
context_type="Plan", context_identifier="Annotation", target_view="PLAN_VIEW", parent=plan
)
+3 -3
View File
@@ -94,7 +94,7 @@ Scenario: Enable pset editing - work schedule
Scenario: Enable pset editing - resource with time series properties
Given an empty IFC project
And I press "bim.load_resources"
And I press "bim.add_resource(ifc_class='IfcSubContractResource', resource=0)"
And I press "bim.add_resource(ifc_class='IfcSubContractResource', parent_resource=0)"
And I set "scene.ResourcePsetProperties.pset_name" to "Pset_ConstructionResource"
And I press "bim.add_pset(obj_type='Resource')"
And the variable "pset" is "{ifc}.by_type('IfcPropertySet')[-1].id()"
@@ -104,9 +104,9 @@ Scenario: Enable pset editing - resource with time series properties
Scenario: Enable pset editing - resource with regular single properties
Given an empty IFC project
And I press "bim.load_resources"
And I press "bim.add_resource(ifc_class='IfcCrewResource', resource=0)"
And I press "bim.add_resource(ifc_class='IfcCrewResource', parent_resource=0)"
And the variable "resource" is "{ifc}.by_type('IfcCrewResource')[-1].id()"
And I press "bim.add_resource(ifc_class='IfcLaborResource', resource={resource})"
And I press "bim.add_resource(ifc_class='IfcLaborResource', parent_resource={resource})"
And I set "scene.BIMResourceProperties.active_resource_index" to "1"
And I set "scene.ResourcePsetProperties.pset_name" to "EPset_Productivity"
And I press "bim.add_pset(obj_type='Resource')"
@@ -388,7 +388,7 @@ Scenario: Animate the demolition of a wall
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.assign_product(task={task}, relating_product=0)"
And I press "bim.assign_process(task={task}, related_object=0)"
And I set "scene.BIMWorkScheduleProperties.visualisation_start" to "01/01/21"
And I set "scene.BIMWorkScheduleProperties.visualisation_finish" to "01/02/21"
And I set "scene.BIMWorkScheduleProperties.speed_types" to "FRAME_SPEED"
@@ -713,4 +713,4 @@ Scenario: Expand All Tasks
And the variable "nested_task_two" is "IfcStore.get_file().by_type('IfcTask')[1].id()"
And I press "bim.contract_all_tasks()"
When I press "bim.expand_all_tasks()"
Then nothing happens
Then nothing happens
+9
View File
@@ -50,6 +50,9 @@ class TestCreateProject:
project.run_context_add_context(
context_type="Plan", context_identifier="", target_view="", parent=0
).should_be_called().will_return("plan")
project.run_context_add_context(
context_type="Plan", context_identifier="Axis", target_view="GRAPH_VIEW", parent="plan"
).should_be_called()
project.run_context_add_context(
context_type="Plan", context_identifier="Annotation", target_view="PLAN_VIEW", parent="plan"
).should_be_called()
@@ -97,6 +100,9 @@ class TestCreateProject:
project.run_context_add_context(
context_type="Plan", context_identifier="", target_view="", parent=0
).should_be_called().will_return("plan")
project.run_context_add_context(
context_type="Plan", context_identifier="Axis", target_view="GRAPH_VIEW", parent="plan"
).should_be_called()
project.run_context_add_context(
context_type="Plan", context_identifier="Annotation", target_view="PLAN_VIEW", parent="plan"
).should_be_called()
@@ -153,6 +159,9 @@ class TestCreateProject:
project.run_context_add_context(
context_type="Plan", context_identifier="", target_view="", parent=0
).should_be_called().will_return("plan")
project.run_context_add_context(
context_type="Plan", context_identifier="Axis", target_view="GRAPH_VIEW", parent="plan"
).should_be_called()
project.run_context_add_context(
context_type="Plan", context_identifier="Annotation", target_view="PLAN_VIEW", parent="plan"
).should_be_called()