mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 02:02:22 +00:00
Support invalid IfcGrid elements coming from Revit. See #1133.
This commit is contained in:
@@ -787,8 +787,10 @@ class IfcImporter:
|
||||
collection.children.link(u_axes)
|
||||
v_axes = bpy.data.collections.new("VAxes")
|
||||
collection.children.link(v_axes)
|
||||
self.create_grid_axes(grid.UAxes, u_axes, element_matrix)
|
||||
self.create_grid_axes(grid.VAxes, v_axes, element_matrix)
|
||||
if grid.UAxes: # Revit is known to create invalid grids
|
||||
self.create_grid_axes(grid.UAxes, u_axes, element_matrix)
|
||||
if grid.VAxes: # Revit is known to create invalid grids
|
||||
self.create_grid_axes(grid.VAxes, v_axes, element_matrix)
|
||||
if grid.WAxes:
|
||||
w_axes = bpy.data.collections.new("WAxes")
|
||||
collection.children.link(w_axes)
|
||||
@@ -1903,8 +1905,11 @@ class IfcImporter:
|
||||
return self.place_object_in_spatial_tree(container, obj)
|
||||
elif element.is_a("IfcGrid"):
|
||||
grid_collection = bpy.data.collections.get(obj.name)
|
||||
self.spatial_structure_elements[container.GlobalId]["blender"].children.link(grid_collection)
|
||||
grid_collection.objects.link(obj)
|
||||
if grid_collection:
|
||||
self.spatial_structure_elements[container.GlobalId]["blender"].children.link(grid_collection)
|
||||
grid_collection.objects.link(obj)
|
||||
else: # Revit can create invalid grid objects
|
||||
self.spatial_structure_elements[container.GlobalId]["blender"].objects.link(obj)
|
||||
else:
|
||||
self.spatial_structure_elements[container.GlobalId]["blender"].objects.link(obj)
|
||||
elif hasattr(element, "Decomposes") and element.Decomposes:
|
||||
|
||||
Reference in New Issue
Block a user