open-lasso-python / lasso-python

Home of the open-source CAE library lasso-python 🐍
BSD 3-Clause "New" or "Revised" License
50 stars 12 forks source link

Incorrect naming and pids with d3write #46

Closed Vortex-CAE closed 2 months ago

Vortex-CAE commented 2 months ago

When comparing LS-Prepost, Hyperview and the Python arrays, the PIDs are correct in Hyperview but the names are wrong (but only for PIDS >=10), in LS-Prepost the names are correct but the PIDs are incorrect.

image

codie3611 commented 2 months ago

What exactly is wrong? That there is one PID more (854)? Otherwise everything looks fine to me.

Vortex-CAE commented 2 months ago

Hi Codie,

Not all part numbers in LS-Prepost are not correct, Rigid Element should have part # 851, similarly part 851 does not have the correct name in Hyperview.

However updating the encoding on part names to UTF-8 has fixed the part naming in Hyperview (and fixed the crashes with Oasys) but the numbering in LS-Prepost is still incorrect.

Many thanks

codie3611 commented 2 months ago

Hmmm might be a LS-PrePost thing if HyperView displays it correctly. It might just enumerate it. From what I see the index is 7 in the d3plot which would be 8 if one starts counting from 1 and not 0.

Vortex-CAE commented 2 months ago

There is something not quite right with the d3plot writer and LS-Prepost. For example I have taken one of your example files here:

image

origional.zip

I've then removed all solid arrays and written it out and I get this:

d3 = D3plot("C:/Users/PC/Downloads/lasso_test/d3plot")

d3_new = D3plot()

for i in list(d3.arrays):

    if "solid" in i:
        del d3.arrays[i]

d3_new.arrays = d3.arrays 
d3_new.write_d3plot("C:/Users/PC/Downloads/lasso_test/new_d3plot")

I get a corrupted plot that does not open in LS-Prepost.

If I use LS-Prepost to create a reduced d3plot I get this which is correct

image

reduce.zip

So I am trying to establish what differences there are between the last two d3plot examples - any ideas?

Vortex-CAE commented 2 months ago

Fixed https://github.com/Vortex-CAE/lasso-python/commit/3e337f23c64b4ffe9380841118b824901a028e37