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 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) 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( project.run_context_add_context(
context_type="Plan", context_identifier="Annotation", target_view="PLAN_VIEW", parent=plan 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 Scenario: Enable pset editing - resource with time series properties
Given an empty IFC project Given an empty IFC project
And I press "bim.load_resources" 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 set "scene.ResourcePsetProperties.pset_name" to "Pset_ConstructionResource"
And I press "bim.add_pset(obj_type='Resource')" And I press "bim.add_pset(obj_type='Resource')"
And the variable "pset" is "{ifc}.by_type('IfcPropertySet')[-1].id()" 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 Scenario: Enable pset editing - resource with regular single properties
Given an empty IFC project Given an empty IFC project
And I press "bim.load_resources" 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 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.BIMResourceProperties.active_resource_index" to "1"
And I set "scene.ResourcePsetProperties.pset_name" to "EPset_Productivity" And I set "scene.ResourcePsetProperties.pset_name" to "EPset_Productivity"
And I press "bim.add_pset(obj_type='Resource')" 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 set "scene.BIMRootProperties.ifc_class" to "IfcWall"
And I press "bim.assign_class" And I press "bim.assign_class"
And the object "IfcWall/Cube" is selected 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_start" to "01/01/21"
And I set "scene.BIMWorkScheduleProperties.visualisation_finish" to "01/02/21" And I set "scene.BIMWorkScheduleProperties.visualisation_finish" to "01/02/21"
And I set "scene.BIMWorkScheduleProperties.speed_types" to "FRAME_SPEED" And I set "scene.BIMWorkScheduleProperties.speed_types" to "FRAME_SPEED"
+9
View File
@@ -50,6 +50,9 @@ class TestCreateProject:
project.run_context_add_context( project.run_context_add_context(
context_type="Plan", context_identifier="", target_view="", parent=0 context_type="Plan", context_identifier="", target_view="", parent=0
).should_be_called().will_return("plan") ).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( project.run_context_add_context(
context_type="Plan", context_identifier="Annotation", target_view="PLAN_VIEW", parent="plan" context_type="Plan", context_identifier="Annotation", target_view="PLAN_VIEW", parent="plan"
).should_be_called() ).should_be_called()
@@ -97,6 +100,9 @@ class TestCreateProject:
project.run_context_add_context( project.run_context_add_context(
context_type="Plan", context_identifier="", target_view="", parent=0 context_type="Plan", context_identifier="", target_view="", parent=0
).should_be_called().will_return("plan") ).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( project.run_context_add_context(
context_type="Plan", context_identifier="Annotation", target_view="PLAN_VIEW", parent="plan" context_type="Plan", context_identifier="Annotation", target_view="PLAN_VIEW", parent="plan"
).should_be_called() ).should_be_called()
@@ -153,6 +159,9 @@ class TestCreateProject:
project.run_context_add_context( project.run_context_add_context(
context_type="Plan", context_identifier="", target_view="", parent=0 context_type="Plan", context_identifier="", target_view="", parent=0
).should_be_called().will_return("plan") ).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( project.run_context_add_context(
context_type="Plan", context_identifier="Annotation", target_view="PLAN_VIEW", parent="plan" context_type="Plan", context_identifier="Annotation", target_view="PLAN_VIEW", parent="plan"
).should_be_called() ).should_be_called()