Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Only a few contact orientations are calculated #109

Open
markjessell opened this issue Sep 9, 2023 · 2 comments
Open

[BUG] Only a few contact orientations are calculated #109

markjessell opened this issue Sep 9, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@markjessell
Copy link
Contributor

Describe your issue

If I set 'contact_decimate': 0, and 'contact_orientation_decimate': 0 I expect the same number of contact orientations as contacts, but I get 1658 contacts in contacts_clean.csv but only 14 contact orientations in contact_orientations.csv

Minimal reproducing code example

Try with the default dataset included in the notebooks

Error message

No error, but surprising behaviour...
@markjessell markjessell added the bug Something isn't working label Sep 9, 2023
@RoyThomsonMonash
Copy link
Contributor

Hi Mark,

Within the m2l_interpolation code there was an assumption that all LineStrings only contained 1 line segment. With the changes in 1.3.6 to using MultiLineStrings more LineStrings were also merged to have more than a single line segment within each LineString.

I have refactored the offending code (save_contact_vectors) making it more concise and with less repeated code. I tested it against the notebook examples 1 and 3 and the number of contact orientations has improved. I did not check whether they matched exactly however.

While looking through the code there is potential that interpolate_contacts and interpolate_contacts_grid also makes the same assumption so please check the outputs when creating these points to see if it has your expected behaviour.

I have pushed these changes to master and the next release will contain this fix.

@markjessell
Copy link
Contributor Author

markjessell commented Sep 13, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants