Skip to content

WIP: refine point_in_prism to handle points on prism faces more carefully#23

Merged
stevengj merged 1 commit intoNanoComp:masterfrom
HomerReid:update_point_in_prism
Aug 15, 2018
Merged

WIP: refine point_in_prism to handle points on prism faces more carefully#23
stevengj merged 1 commit intoNanoComp:masterfrom
HomerReid:update_point_in_prism

Conversation

@HomerReid
Copy link

Introduce a more systematic strategy for adjudicating geometric questions involving (a) points lying precisely on polygon edges or prism faces, (b) the degenerate case of line/line intersection in the case where the lines are exactly or nearly parallel.

With this revision, the default convention is to consider points lying on polygon edges or prism faces to be inside the polygon/prism. However, this convention may be reversed by setting the environment variable LIBCTL_EXCLUDE_BOUNDARIES=1, in which case points on edges/faces are not considered interior points.

With this update, the test-prism unit test needed to be updated----it seems the legacy point_in_object implementation for blocks make somewhat arbitrary decisions about whether points on boundaries are interior points. This was causing mismatches with the new point_in_prism implementation, which makes more consistent decisions. In the updated test, if the results of point_in_block and point_in_prism disagree for a given point, the point_in_prism test is repeated with the sense of the boundary-point exclusion inverted (i.e. if points on prism faces were considered interior before, they are considered exterior now). This update eliminates all mismatches with the point_in_block code, so the unit test is passing again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants