mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
Added Model/Profile/Elevation_VIEW context as default for new projects #2784
Default Model/Profile/Elevation_VIEW context could be helpful to make openings created with BIM tool more correct.
This commit is contained in:
@@ -53,6 +53,9 @@ def create_project(ifc, project, schema=None, template=None):
|
||||
project.run_context_add_context(
|
||||
context_type="Model", context_identifier="Annotation", target_view="ELEVATION_VIEW", parent=model
|
||||
)
|
||||
project.run_context_add_context(
|
||||
context_type="Model", context_identifier="Profile", target_view="ELEVATION_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
|
||||
|
||||
@@ -56,6 +56,9 @@ class TestCreateProject:
|
||||
project.run_context_add_context(
|
||||
context_type="Model", context_identifier="Annotation", target_view="ELEVATION_VIEW", parent="model"
|
||||
).should_be_called()
|
||||
project.run_context_add_context(
|
||||
context_type="Model", context_identifier="Profile", target_view="ELEVATION_VIEW", parent="model"
|
||||
).should_be_called()
|
||||
project.run_context_add_context(
|
||||
context_type="Plan", context_identifier="", target_view="", parent=0
|
||||
).should_be_called().will_return("plan")
|
||||
@@ -116,6 +119,9 @@ class TestCreateProject:
|
||||
project.run_context_add_context(
|
||||
context_type="Model", context_identifier="Annotation", target_view="ELEVATION_VIEW", parent="model"
|
||||
).should_be_called()
|
||||
project.run_context_add_context(
|
||||
context_type="Model", context_identifier="Profile", target_view="ELEVATION_VIEW", parent="model"
|
||||
).should_be_called()
|
||||
project.run_context_add_context(
|
||||
context_type="Plan", context_identifier="", target_view="", parent=0
|
||||
).should_be_called().will_return("plan")
|
||||
@@ -185,6 +191,9 @@ class TestCreateProject:
|
||||
project.run_context_add_context(
|
||||
context_type="Model", context_identifier="Annotation", target_view="ELEVATION_VIEW", parent="model"
|
||||
).should_be_called()
|
||||
project.run_context_add_context(
|
||||
context_type="Model", context_identifier="Profile", target_view="ELEVATION_VIEW", parent="model"
|
||||
).should_be_called()
|
||||
project.run_context_add_context(
|
||||
context_type="Plan", context_identifier="", target_view="", parent=0
|
||||
).should_be_called().will_return("plan")
|
||||
|
||||
Reference in New Issue
Block a user