-
Notifications
You must be signed in to change notification settings - Fork 82
Reversal of boundary segments #167
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
Conversation
krober10nd
commented
Dec 23, 2020
- fixing bug from Error in specifying riverine boundary segments! #166
- Second to last and last point in drawn boundary segments were reversed.
fixing bug from #166
|
I also encountered this strange ordering before but I remember depending on the clockwise/anticlockwise choice would produce different results. Would be good to find out the source of the error instead of the ad-hoc adjustment at the end. |
|
It isn't ad hoc but it does suggest other changes. The edges are ordered in a way that creates this problem Perhaps we should get rid of this CW and CCW option and instead just make people switch the ordering of the inputs. It's not clear what CW and CCW always mean for complex polygons and most people (including me) simply guess. |
|
Perhaps the default should be 1 and leave it like that. |
|
Right so tell people they have to enter it in Clockwise ordering? Which is 1 again? |
Yes something like. Just get rid of this option in the API. In the file |
|
I think I've found the origin of the problem. Line 66-67 of utilities/extract_boundary adds the entire selected edge to the polygon list ignoring the v_start and v_next while all other segments consider this. |
v_next must appear second in the list for the first edge.
|
Okay put in a fix. If |
|
Ok cool so it definitely works for normal open boundary selection as well as small river like segments? |
if segment is one edge long (2 vertices).
|
I've tested it with a one edge segment with order=0 and order=1 on two different meshes and they all worked. I've also tested segments for length 3 vertices and on larger domains as well and the original problem did not crop up. |

