mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-16 13:46:54 +00:00
Schema migrator now supports IfcElectricDistributionPoint
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"IfcElectricDistributionPoint": "IfcElectricDistributionBoard"
|
||||||
|
}
|
||||||
@@ -70,6 +70,7 @@ class Migrator:
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.migrated_ids = {}
|
self.migrated_ids = {}
|
||||||
self.class_4_to_2x3 = json.load(open(os.path.join(cwd, "class_4_to_2x3.json"), "r"))
|
self.class_4_to_2x3 = json.load(open(os.path.join(cwd, "class_4_to_2x3.json"), "r"))
|
||||||
|
self.class_2x3_to_4 = json.load(open(os.path.join(cwd, "class_2x3_to_4.json"), "r"))
|
||||||
|
|
||||||
# IFC4 classes, and their IFC4 attribute : IFC2X3 attributes
|
# IFC4 classes, and their IFC4 attribute : IFC2X3 attributes
|
||||||
self.attribute_4_to_2x3 = json.load(open(os.path.join(cwd, "attribute_4_to_2x3.json"), "r"))
|
self.attribute_4_to_2x3 = json.load(open(os.path.join(cwd, "attribute_4_to_2x3.json"), "r"))
|
||||||
@@ -151,8 +152,7 @@ class Migrator:
|
|||||||
if new_file.schema == "IFC2X3":
|
if new_file.schema == "IFC2X3":
|
||||||
new_element = new_file.create_entity(self.class_4_to_2x3[element.is_a()])
|
new_element = new_file.create_entity(self.class_4_to_2x3[element.is_a()])
|
||||||
elif new_file.schema == "IFC4":
|
elif new_file.schema == "IFC4":
|
||||||
print("Class migration to IFC4 not yet supported for", element)
|
new_element = new_file.create_entity(self.class_2x3_to_4[element.is_a()])
|
||||||
pass
|
|
||||||
return new_element
|
return new_element
|
||||||
|
|
||||||
def migrate_attributes(self, element, new_file, new_element, new_element_schema):
|
def migrate_attributes(self, element, new_file, new_element, new_element_schema):
|
||||||
|
|||||||
Reference in New Issue
Block a user