mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-23 03:10:06 +00:00
intersect_edge_region_border: Change return statements to return None, None for no intersection
In order to fix error of the type:
| point, _ = cls.intersect_edge_region_border(
| ^^^^^^^^
| TypeError: cannot unpack non-iterable NoneType object
a tuple is expected.
This commit is contained in:
committed by
Bruno Perdigão
parent
70a4fdbf95
commit
39a376df95
@@ -202,7 +202,7 @@ class Raycast(bonsai.core.tool.Raycast):
|
|||||||
|
|
||||||
if inter_world is None:
|
if inter_world is None:
|
||||||
print("No intersection with viewport near plane found for the segment.")
|
print("No intersection with viewport near plane found for the segment.")
|
||||||
return
|
return None, None
|
||||||
|
|
||||||
init_2d = view3d_utils.location_3d_to_region_2d(region, rv3d, inter_world)
|
init_2d = view3d_utils.location_3d_to_region_2d(region, rv3d, inter_world)
|
||||||
|
|
||||||
@@ -217,7 +217,7 @@ class Raycast(bonsai.core.tool.Raycast):
|
|||||||
if found_world is None:
|
if found_world is None:
|
||||||
if init_2d is None:
|
if init_2d is None:
|
||||||
print("Initial projection invalid and iterative search failed.")
|
print("Initial projection invalid and iterative search failed.")
|
||||||
return
|
return None, None
|
||||||
# fallback: clamp projected point to border via manual mapping
|
# fallback: clamp projected point to border via manual mapping
|
||||||
final_2d = clamp_to_region_border(init_2d, region)
|
final_2d = clamp_to_region_border(init_2d, region)
|
||||||
final_world = None
|
final_world = None
|
||||||
|
|||||||
Reference in New Issue
Block a user