Skip to content

Commit

Permalink
Unpin vtk (#1285)
Browse files Browse the repository at this point in the history
Resolve change in vtk and silence mypy warnings
  • Loading branch information
andreas-el authored May 13, 2024
1 parent 3f9325a commit af53061
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
"scipy>=1.2",
"statsmodels>=0.12.1", # indirect dependency through https://plotly.com/python/linear-fits/
"xtgeo>=2.20.0",
"vtk>=9.2.2,<9.3",
"vtk>=9.2.2",
"webviz-config",
"webviz-core-components>=0.6",
"webviz-subsurface-components==1.0.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def _create_vtk_esgrid_from_verts_and_conn(
vtk_cell_array.SetData(8, conn_idarr)

vtk_esgrid = vtkExplicitStructuredGrid()
vtk_esgrid.SetDimensions(point_dims)
vtk_esgrid.SetDimensions(point_dims.tolist())
vtk_esgrid.SetPoints(vtk_points)
vtk_esgrid.SetCells(vtk_cell_array)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -365,15 +365,15 @@ def cut_along_polyline(

plane = vtkPlane()
plane.SetOrigin([x_0, y_0, 0])
plane.SetNormal(right_vec)
plane.SetNormal(right_vec.tolist())

plane_0 = vtkPlane()
plane_0.SetOrigin([x_0, y_0, 0])
plane_0.SetNormal(fwd_vec)
plane_0.SetNormal(fwd_vec.tolist())

plane_1 = vtkPlane()
plane_1.SetOrigin([x_1, y_1, 0])
plane_1.SetNormal(-fwd_vec)
plane_1.SetNormal((-fwd_vec).tolist())

cutter_alg.SetPlane(plane)
cutter_alg.Update()
Expand Down Expand Up @@ -478,7 +478,7 @@ def ray_pick(
i_ref = reference(0)
j_ref = reference(0)
k_ref = reference(0)
grid.ComputeCellStructuredCoords(cell_id, i_ref, j_ref, k_ref, True)
grid.ComputeCellStructuredCoords(cell_id, i_ref, j_ref, k_ref, True) # type: ignore[arg-type]

cell_property_val: Optional[np.ndarray] = None
if property_spec:
Expand All @@ -497,9 +497,9 @@ def ray_pick(

return PickResult(
cell_index=original_cell_id,
cell_i=i_ref.get(),
cell_j=j_ref.get(),
cell_k=k_ref.get(),
cell_i=i_ref.get(), # type: ignore[arg-type, misc]
cell_j=j_ref.get(), # type: ignore[arg-type, misc]
cell_k=k_ref.get(), # type: ignore[arg-type, misc]
intersection_point=isect_pt,
cell_property_value=cell_property_val,
)
Expand Down

0 comments on commit af53061

Please sign in to comment.