Fix bounding box best origin default value

Initialize best_origin to 0 for the case no better origin is found.
Cheers!
This commit is contained in:
falken10vdl
2025-08-21 18:13:31 +02:00
committed by Bruno Perdigão
parent 14ed4d1d08
commit a717b348e0
@@ -1226,7 +1226,7 @@ class BoundingBoxDecorator:
def find_closest_trihedron(corners, edges, region, rv3d):
min_y = float("inf")
best_origin = None
best_origin = 0
for idx, corner in enumerate(corners):
screen_co = location_3d_to_region_2d(region, rv3d, corner)
if screen_co is not None and screen_co.y < min_y: