u-anurag / vfo-docs

Documentation for vfo (Visualization for OpenSees)
https://vfo.readthedocs.io
0 stars 1 forks source link

Errors plotting OBD files #9

Open Omar-A-M opened 1 month ago

Omar-A-M commented 1 month ago

Hey Anurag,

I have been trying to use the new update which allows plotting models will long node and element tags. But I face the following errors while plotting the ODB file:

File "c:\Users\user\Desktop\Vis\v.py", line 4, in vfo.plot_model(model='Pushover4_X_16mm', line_width=1) File "C:\Users\user\Desktop\Vis.venv\Lib\site-packages\vfo\vfo.py", line 483, in plot_model mesh_original, mesh_lines_original, vertices, nodeTags = _get_modelDisplay(nodeArray, elementArray, eleClassTags) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\user\Desktop\Vis.venv\Lib\site-packages\vfo\vfo.py", line 350, in _get_modelDisplay lines = _getPV_2NodeELements(elementArray) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\user\Desktop\Vis.venv\Lib\site-packages\vfo\vfo.py", line 292, in _getPV_2NodeELements tempArray = np.array([2, _getNodeIndex(ii[1]), _getNodeIndex(ii[2])]) ^^^^^^^^^^^^^^^^^^^^ File "C:\Users\user\Desktop\Vis.venv\Lib\site-packages\vfo\vfo.py", line 271, in _getNodeIndex return int(nodeIndex) ^^^^^^^^^^^^^^ TypeError: only length-1 arrays can be converted to Python scalars

The ODB file is on the link bellow: https://drive.google.com/drive/folders/1DSOnwwWhOKrknjdEqtEfjkkv5emTEd63?usp=sharing

Thank you in advance

u-anurag commented 1 month ago

I am sorry I couldn't respond earlier. Were you able to make it work?