Update libraries to use Plan/Body/PLAN_VIEW instead of annotations.

This commit is contained in:
Dion Moult
2023-02-04 14:09:35 +11:00
parent 6bab10d2ac
commit a7cc58fb50
11 changed files with 1225 additions and 1118 deletions
@@ -48,7 +48,7 @@ class LibraryGenerator:
model = ifcopenshell.api.run("context.add_context", self.file, context_type="Model")
plan = ifcopenshell.api.run("context.add_context", self.file, context_type="Plan")
self.representations = {
"body": ifcopenshell.api.run(
"model_body": ifcopenshell.api.run(
"context.add_context",
self.file,
context_type="Model",
@@ -56,7 +56,7 @@ class LibraryGenerator:
target_view="MODEL_VIEW",
parent=model,
),
"annotation": ifcopenshell.api.run(
"plan_body": ifcopenshell.api.run(
"context.add_context",
self.file,
context_type="Plan",
@@ -179,9 +179,9 @@ class LibraryGenerator:
)
self.create_profile_type("IfcBeamType", "DEMO2", profile)
self.create_type("IfcWindowType", "DEMO1", {"body": "Window", "annotation": "Window-Annotation"})
self.create_type("IfcDoorType", "DEMO1", {"body": "Door", "annotation": "Door-Annotation"})
self.create_type("IfcFurnitureType", "BUNNY", {"body": "Bunny", "annotation": "Bunny-Annotation"})
self.create_type("IfcWindowType", "DEMO1", {"model_body": "Window", "plan_body": "Window-Annotation"})
self.create_type("IfcDoorType", "DEMO1", {"model_body": "Door", "plan_body": "Door-Annotation"})
self.create_type("IfcFurnitureType", "BUNNY", {"model_body": "Bunny", "plan_body": "Bunny-Annotation"})
self.file.write("blenderbim-au-library.ifc")
@@ -41,7 +41,7 @@ class LibraryGenerator:
model = ifcopenshell.api.run("context.add_context", self.file, context_type="Model")
plan = ifcopenshell.api.run("context.add_context", self.file, context_type="Plan")
self.representations = {
"body": ifcopenshell.api.run(
"model_body": ifcopenshell.api.run(
"context.add_context",
self.file,
context_type="Model",
@@ -49,11 +49,11 @@ class LibraryGenerator:
target_view="MODEL_VIEW",
parent=model,
),
"annotation": ifcopenshell.api.run(
"plan_body": ifcopenshell.api.run(
"context.add_context",
self.file,
context_type="Plan",
context_identifier="Annotation",
context_identifier="Body",
target_view="PLAN_VIEW",
parent=plan,
),
@@ -127,9 +127,9 @@ class LibraryGenerator:
)
self.create_profile_type("IfcBeamType", "B2", profile)
self.create_type("IfcWindowType", "WT01", {"body": "Window", "annotation": "Window-Annotation"})
self.create_type("IfcDoorType", "DT01", {"body": "Door", "annotation": "Door-Annotation"})
self.create_type("IfcFurnitureType", "BUN01", {"body": "Bunny", "annotation": "Bunny-Annotation"})
self.create_type("IfcWindowType", "WT01", {"model_body": "Window", "plan_body": "Window-Plan"})
self.create_type("IfcDoorType", "DT01", {"model_body": "Door", "plan_body": "Door-Plan"})
self.create_type("IfcFurnitureType", "BUN01", {"model_body": "Bunny", "plan_body": "Bunny-Plan"})
self.file.write("IFC4 Demo Library.ifc")
File diff suppressed because it is too large Load Diff