Skip to content

Commit

Permalink
fix inside point
Browse files Browse the repository at this point in the history
  • Loading branch information
brisvag committed Nov 16, 2023
1 parent 54ad1dc commit e111da1
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/blik/widgets/picking.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,12 @@ def _generate_surface_grids_from_shapes_layer(
colors = []
surface_grids = []
data_array = np.array(surface_shapes.data, dtype=object) # helps with indexing
inside_point = (
invert_xyz(inside_points.data[0]) if len(inside_points.data) else None
)
if inside_points is None:
inside_point = None
else:
inside_point = (
invert_xyz(inside_points.data[0]) if len(inside_points.data) else None
)
for _, surf in surface_shapes.features.groupby("surface_id"):
lines = data_array[surf.index]
# sort so lines can be added in between at a later point
Expand Down

0 comments on commit e111da1

Please sign in to comment.