This commit is contained in:
Andrej730
2024-06-10 14:53:14 +05:00
parent 6552463ed9
commit 51f859d8e4
5 changed files with 49 additions and 35 deletions
@@ -47,6 +47,7 @@ from math import radians
from pathlib import Path
from mathutils import Vector, Matrix
from bpy.app.handlers import persistent
from ifcopenshell.geom import ShapeElementType, ShapeType
from blenderbim.bim.module.project.data import LinksData
from blenderbim.bim.module.project.decorator import ProjectDecorator, ClippingPlaneDecorator
from typing import Union
@@ -1453,7 +1454,7 @@ class LoadLinkedProject(bpy.types.Operator):
break
return {"FINISHED"}
def is_local(self, shape):
def is_local(self, shape: ShapeElementType) -> bool:
m = shape.transformation.matrix
if max([abs(co) for co in (m[9], m[10], m[11])]) > 1000:
return False
@@ -1461,7 +1462,7 @@ class LoadLinkedProject(bpy.types.Operator):
return False
return True
def process_occurrence(self, shape):
def process_occurrence(self, shape: ShapeElementType) -> None:
element = self.file.by_id(shape.id)
matrix = shape.transformation.matrix
faces = shape.geometry.faces