Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
romanarust committed Nov 18, 2024
1 parent 77ee059 commit 44c7d8c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/compas/topology/orientation.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def _closest_faces(vertices, faces, nmax=10, max_distance=10.0):

tree = KDTree(points)
closest = [tree.nearest_neighbors(point, k) for point in points]
closest = [[index for xyz, index, d in nnbrs] for nnbrs in closest]
closest = [[index for xyz, index, d in nnbrs if d < max_distance] for nnbrs in closest]

else:
tree = RTree()
Expand Down
7 changes: 2 additions & 5 deletions tests/compas/topology/test_unify_cycles.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,5 @@ def test_face_adjacency():
dy = 10
mesh = Mesh.from_meshgrid(dx, nx, dy, ny)
vertices, faces = mesh.to_vertices_and_faces()
radius = math.sqrt((dx / nx) ** 2 + (dy / ny) ** 2) + TOL.absolute
unify_cycles(vertices, faces, max_distance=radius)


test_face_adjacency()
max_distance = math.sqrt((dx / nx) ** 2 + (dy / ny) ** 2) + TOL.absolute
unify_cycles(vertices, faces, max_distance=max_distance)

0 comments on commit 44c7d8c

Please sign in to comment.