@@ -352,7 +352,7 @@ def unique_vertices(self) -> set[Vec3]:
352352 e.g. if the vertices a, b are close together, you don't know if you get a or b,
353353 but it's guaranteed that you only get one of them
354354 """
355- return filter_close_vertices (self ._search_index .rtree , gap_tol = self .gap_tol )
355+ return filter_close_vertices (self ._search_index .rtree , gap_tol = self .gap_tol ) # type: ignore[arg-type]
356356
357357 def edges_linked_to (self , vertex : UVec , radius : float = - 1 ) -> Sequence [Edge ]:
358358 """Returns all edges linked to `vertex` in range of `radius`.
@@ -373,14 +373,14 @@ def find_nearest_edge(self, vertex: UVec) -> Edge | None:
373373 The distance is measured to the connection line from start to end of the edge.
374374 This is not correct for edges that represent arcs or splines.
375375 """
376+ vertex = Vec3 (vertex )
376377
377378 def distance (edge : Edge ) -> float :
378379 try :
379380 return distance_point_line_3d (vertex , edge .start , edge .end )
380381 except ZeroDivisionError :
381382 return edge .start .distance (vertex )
382383
383- vertex = Vec3 (vertex )
384384 si = self ._search_index
385385 nearest_vertex = si .nearest_vertex (vertex )
386386 edges = self .edges_linked_to (nearest_vertex )
@@ -738,16 +738,16 @@ def __init__(self, edges: Sequence[Edge]) -> None:
738738 self ._search_tree = rtree .RTree (vertices )
739739
740740 @property
741- def rtree (self ) -> rtree .RTree [Vec3 ]:
741+ def rtree (self ) -> rtree .RTree [_Vertex ]:
742742 return self ._search_tree
743743
744744 def vertices_in_sphere (self , center : Vec3 , radius : float ) -> Sequence [_Vertex ]:
745745 """Returns all vertices located around `center` with a max. distance of `radius`."""
746- return tuple (self ._search_tree .points_in_sphere (center , radius ))
746+ return tuple (self ._search_tree .points_in_sphere (center , radius )) # type: ignore[arg-type]
747747
748748 def nearest_vertex (self , location : Vec3 ) -> _Vertex :
749749 """Returns the nearest vertex to the given location."""
750- vertex , _ = self ._search_tree .nearest_neighbor (location )
750+ vertex , _ = self ._search_tree .nearest_neighbor (location ) # type: ignore[arg-type]
751751 return vertex
752752
753753
0 commit comments