Detection of intersecting segments in user input #146
DanielVandH
started this conversation in
Ideas
Replies: 1 comment
-
Reopening. Maybe this can't go in the package directly, or it can and we just need to document examples of it properly and allow it to be done outside of |
Beta Was this translation helpful? Give feedback.
0 replies
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
-
Currently, the method for constrained triangulation assumes that segments do not intersect, although collinear segments are automatically detected (most of the time, floating point arithmetic can only do so much). It would be nice to have a way to automatically detect this in a user's provided edge input. e.g. some routine like
merge_constrained_edges
does this).(p, segments)
, wherep
is the intersection point andsegments
are the segments involved in the intersection.(p, segments)
, wheresegments
is say(c1, c2, ...)
, split eachci
insegments
atp
. A method likesplit_constrained_edge
can do this, similar to how we handle it inprocess_collinear_segments!
. Make sure boundary edges appropriately handled.Maybe
add_edge!
could have an initial seeking step that looks through all inserted segments (all_constrained_edges
) and just finds intersections there, in case users add edges after the initial construction of a triangulation. An option could be toggled to allow this, so that we disable it while the triangulation is being built but when usingadd_edge!
after the fact it is enabled by default.Beta Was this translation helpful? Give feedback.
All reactions