dlubal-software / RFEM_Python_Client

Python client (or high-level functions) for RFEM 6 using Web Services, SOAP and WSDL
https://dlubal-software.github.io/.github/
MIT License
71 stars 27 forks source link

BUG: LineSetLoad.Force() for "LOAD_DISTRIBUTION_VARYING" error handling issue #377

Closed Dervis-vL closed 5 months ago

Dervis-vL commented 5 months ago

Describe the bug When creating a LineSetLoad with the Force method and using the enum LineSetLoadDistribution.LOAD_DISTRIBUTION_VARYING as an argument for the load_distribution argument, and providing a list of lists, an error is raised on line 291 of the linesetLoad.py file.

image

The input for the load_parameter argument according to the documentation is a list of lists: image

The lists in the list contain the distance and magnitude.

The data provided is according the documentation: [(0.83, 1.125), (0, 5731.825), (1.67, 1.15), (2.5, 0.75), (2.5, 1.55), (3.33, 1.15), (4.17, 1.15), (5, 0.7), (5, 1.525), (5.83, 1.175), (6.67, 1.175)]

Expected behavior With the input provided I expect the forces to be placed on the lineSet on the provided distance.

Screenshots This is how the object is used: image

This is the error message: image

Desktop (please complete the following information):

Additional context It seems like the error occurs due to faulty error handling in the RFEM package. Line 290 checks if the length of each list is 3, otherwise throw error, but accorsing to the documentation, the length should be 2.

I am also flustered why line 290 says: if len(load_parameter[i]) != 3:

instead of: if len(j) != 3:

Because you are using the enumerate function.

I my opinion either the documentation is wrong or the error handling of the package is. Hope to hear the results soon.

Dervis-vL commented 5 months ago

I also seem to be having a struggle doing it in the GUI of RFEM 6.05. MemberSetLoads does not have an issue. LineSetLoads does

Dervis-vL commented 5 months ago

Thanks, great :-)