Menu

#3714 Update maxima to use vtk-8.2.0

None
closed
nobody
5
2021-02-16
2021-02-11
jpscasas
No

Graphics with draw work with vtk-8.1.0, but that's not the case with vtk-8.2.0 or
vtk-9.0.1. In Gentoo Linux (discussion) vtk-8.1.0 is deprecated, so maxima cannot use vtk anymore. Is it possible to update the draw package so it works with vtk-8.2.0 and/or vtk-9.0.1?

Discussion

  • Robert Dodier

    Robert Dodier - 2021-02-12
    • labels: --> share packages, plotting, draw, vtk
     
  • Robert Dodier

    Robert Dodier - 2021-02-12

    Hi, thanks for the request. Are you familiar enough with VTK to summarize the relevant changes from 8.1 to 8.2 or from 8.1 to 9.0? It seems likely that the update would have to be carried out by someone other than the original author of the draw package, so any information you can provide will help move the process forward.

     
    • Gunter Königsmann

      One of the bigger changes that might be necessary might be to somehow manage to somehow replace the last few places tcl/tk bindings (that were obsoleted a long time ago) are used in, perhaps by the python/tk bindings draw uses.

       
  • jpscasas

    jpscasas - 2021-02-12

    In 3d plots vtk-8.1 works fine, but I get:

    Generic Warning: In /var/tmp/portage/sci-libs/vtk-8.1.0-r4/work/VTK-8.1.0/Rendering/Core/vtkMapper.cxx, line 213
    vtkMapper::GlobalImmediateModeRenderingOn was deprecated for VTK 8.1 and will be removed in a future version.

    With vtk-8.2 now GlobalImmediateModeRenderingOn gives rise to:

    AttributeError: 'vtkRenderingOpenGL2Python.vtkOpenGLPolyDataMapper' object has no attribute 'GlobalImmediateModeRenderingOn'

    and the plot is not shown. But if lines with GlobalImmediateModeRenderingOn (less than 10 in the two cases I've tried) are commented out from the temporary python file maxout23520.py, the plot is again displayed with vtk-8.2. The same situation happens with vtk-9.0: the problem is fixed by removing lines with GlobalImmediateModeRenderingOn.

     
    • Leo Butler

      Leo Butler - 2021-02-12

      Are you able to apply this patch and test that it works on your problem
      case(s)?

      diff --git a/share/draw/vtk.lisp b/share/draw/vtk.lisp
      index 6ff0f9586..1964048d2 100644
      --- a/share/draw/vtk.lisp
      +++ b/share/draw/vtk.lisp
      @@ -224,7 +224,6 @@
       (defun vtkpolydatamapper-code (mn fn con)
         (concatenate 'string
           (format nil "~a=vtk.vtkPolyDataMapper()~%" mn)
      -    (format nil "~a.GlobalImmediateModeRenderingOn()~%" mn) 
           (if con
             (format nil "~a.SetInputConnection(~a.GetOutputPort())~%" mn fn)
             "") ))
      

      Leo

       
  • jpscasas

    jpscasas - 2021-02-13

    Yes, that patch solves the issue. Now I can plot from maxima-draw using vtk-8.2 and vtk-9.0. Thank you very much!

     
    • Leo Butler

      Leo Butler - 2021-02-13

      Ok, thanks for reporting the bug and testing the patch.
      The patch will be committed to the maxima repository soon.
      Leo

       
  • Leo Butler

    Leo Butler - 2021-02-16
    • status: open --> closed
     
  • Leo Butler

    Leo Butler - 2021-02-16

    Patch applied in commit b6bf72f7.

     

Log in to post a comment.

MongoDB Logo MongoDB