mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-26 10:11:46 +00:00
typing
This commit is contained in:
@@ -38,7 +38,7 @@ from ifcopenshell.util.shape_builder import np_to_4d
|
|||||||
from math import atan, radians
|
from math import atan, radians
|
||||||
from mathutils import Vector, Matrix
|
from mathutils import Vector, Matrix
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Union, Any, Optional
|
from typing import Union, Any, Optional, cast
|
||||||
|
|
||||||
|
|
||||||
# Progressively we'll refactor loading elements into Blender objects into this
|
# Progressively we'll refactor loading elements into Blender objects into this
|
||||||
@@ -640,7 +640,10 @@ class Loader(bonsai.core.tool.Loader):
|
|||||||
) -> bool:
|
) -> bool:
|
||||||
limit = cls.settings.distance_limit
|
limit = cls.settings.distance_limit
|
||||||
limit = limit if is_meters else (limit / cls.unit_scale)
|
limit = limit if is_meters else (limit / cls.unit_scale)
|
||||||
coords = getattr(point, "Coordinates", point)
|
if isinstance(point, ifcopenshell.entity_instance):
|
||||||
|
coords = cast(tuple[float, ...], point.Coordinates)
|
||||||
|
else:
|
||||||
|
coords = point
|
||||||
return any(abs(c) > limit for c in coords)
|
return any(abs(c) > limit for c in coords)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|||||||
Reference in New Issue
Block a user