mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 01:41:57 +00:00
You can now parametrically create profile / layer based objects of any type, no longer limited to walls, slabs, etc.
This commit is contained in:
@@ -12,13 +12,14 @@ with open(os.path.join(cwd, "entity_to_type_map_2x3.json")) as f:
|
||||
with open(os.path.join(cwd, "entity_to_type_map_4.json")) as f:
|
||||
entity_to_type_map["IFC4"] = json.load(f)
|
||||
|
||||
type_to_entity_map["IFC2X3"] = {
|
||||
value: [key] for key in entity_to_type_map["IFC2X3"] for value in entity_to_type_map["IFC2X3"][key]
|
||||
}
|
||||
|
||||
type_to_entity_map["IFC4"] = {
|
||||
value: [key] for key in entity_to_type_map["IFC4"] for value in entity_to_type_map["IFC4"][key]
|
||||
}
|
||||
for schema in ["IFC2X3", "IFC4"]:
|
||||
type_to_entity_map[schema] = {}
|
||||
for element, element_types in entity_to_type_map[schema].items():
|
||||
for element_type in element_types:
|
||||
type_to_entity_map[schema].setdefault(element_type, []).append(element)
|
||||
# TODO: this method just fails for IFC2X3 because 2X3 type mapping is just so broken.
|
||||
# Uncomment the following line to see how bad it is.
|
||||
# print(type_to_entity_map[schema])
|
||||
|
||||
|
||||
def get_applicable_types(ifc_class, schema="IFC4"):
|
||||
|
||||
Reference in New Issue
Block a user