-
Notifications
You must be signed in to change notification settings - Fork 126
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
Retain order of edges. #116
Comments
Hi @DarrenlloydGent, thank you your interest and for opening the issue. If I understand correctly, would you like to know to which original edge the newly added points belong to?
The complete example is: CDT::Triangulation<...> cdt = /*...*/;
const auto edge_to_split_points =
CDT::EdgeToSplitVertices(
CDT::EdgeToPiecesMapping(cdt.pieceToOriginals),
cdt.vertices); I hope this answers your question. Please let me know. Note to myself: I need to improve the documentation and add examples to make this functionality more discoverable. |
Hey @artem-ogre , got it! However... Not sure if it's me using this in Unreal Engine, but I had an issue with EdgeToSplitVertices. I kept getting errors with CDT.h, lines 412 and 433. It was complaining about the declarations obscuring previous declarations. So I changed the declarations on lines 412 and 414 from it to it2
and on lines 433 and 435 from it to it3
And I got the desired output that I'll put in another post for anyone finding this and working with UE5. |
Thanks for the find. I will rename the iterators to fix this. |
I will close this issue after merging the fix :) |
I've been using your awesome library in Unreal Engine 5 to deal with the triangulation of building data from Ordnance Survey shapefiles and DEFRA lidar data for height. The library works great in 2D, zipping through 100 square kilometers of London in seconds. However, I'm extruding the buildings to the heights identified and with the verts inserted in conforming and the fixedEdges returned with the lowest index first, I can't find a way to tell what vector the lines should be going, so that the extruded sides face the right way.
Below is an image of the problem. I thought of identifying if the difference between point indenices was more than +1 , then its dealing with an inserted vert and I should just flip, but it won't deal with the example here where three new verts were added on the same original edge.
![CDT](https://user-images.githubusercontent.com/4311557/210174475-4c9b81ca-cc85-41ff-bbdf-2e1d7924f7df.png)
Anything obvious I've missed? Below is a screenshot of all of the buildings...
![GIS](https://user-images.githubusercontent.com/4311557/210174779-c203a3a3-f403-4f53-9bab-ca938fc6d4b0.png)
The text was updated successfully, but these errors were encountered: