more notes

main
Motiejus Jakštys 2021-05-19 22:57:45 +03:00 committed by Motiejus Jakštys
parent e29761d2ef
commit ec4b84b36f
1 changed files with 11 additions and 8 deletions

View File

@ -18,19 +18,22 @@ after a few bends have been skipped. E.g. ends of A<->B cross the line, but
/ | | |___,---,___/A |
/ | \_________________|
\ |
\ |
/ /
----/ /
/ ,____/
/ B|
\ | \ |
/ / B\ | _ __
----/ / | | / \ / \
/ ,____/ | |___/ \___/A |
/ B| \_________________|
|
If a bend with 180+ deg inflection is found, its line between inflection angles
(AB in our examples) must be crossed with all the other bends to detect a
possible line-crossing. This is O(N*M), where N is the total number of line
segments, and M is the number of qualifying bends. In other words, can be very
computationally expensive.
This may be slightly computationally simplified: if other bend's
endpoints (A' and B') are in different sub-planes as divided by AB, then the
crossing exists, and more expensive st_split can be used.
This may be simplified: if other bend's endpoints (A' and B') are in the same
sub-plane as divided by AB, then the bend can be skipped from checking if it
intersects with AB. Some intersections may be missed (see the example), but
they will be eliminated by just joining A and B.