sewkokot / opsvis

OpenSeesPy postprocessing and plotting module
GNU General Public License v3.0
35 stars 21 forks source link

Suggestions... #12

Open ccaprani opened 2 years ago

ccaprani commented 2 years ago

Hi @sewkokot ! Thanks as ever for the great work. I have a few suggestions:

Looking forward to contributing!

sewkokot commented 2 years ago

Hi @ccaprani, thanks for the suggestions and your support!

  1. I need some time to prepare a roadmap for opsvis. Anyway we can always discuss here what features would be useful to have and if they can be implemented as extensions of the current opsvis functions or by creating new ones.
  2. Again I would need time to assess how much work and testing it would require to migrate the code to OO. As you wrote, the functional approach works for now, and the OO would require a volunteer to implement it or at least to help with specific plan of the OO code organization.
  3. Yes, in the refactored code (which I upload in two days) I have added the ax argument to almost all plotting functions. Testing will reveal what else can be improved. All plot model functions would return 'ax', and on the other plot_defo returns now the scale factor, so I could add 'ax' as the second return variable, but it will break some of user scripts (although the fix would be easy to fix by adding sfac, ax = opsv.plot_defo() or sfac, _ = opsv.plot_defo(), if the ax is redundant.
  4. The refactored opsvis hopefully includes improvements (for example plotting deformation of models composed of various element types, for example quads with beams, zero length or joint2d elements in a single model, which gives errors in the current opsvis etc.). I also plan to add other plotting libraries than matplotlib such as pyvista and pyevtk (for plotting models, deformation and stresses in Paraview). I have some working examples, however the installation of pyvista and pyevtk is not as easy as for matplotlib. For example, pyvista requires the vtk package which seems currently broken or dependencies cannot be resolved when installing with the 'pip' command. Anyway I will list all improvements and new features implemented in the new opsvis.