Skip to content
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

Merge contains into intersect #947

Merged
merged 5 commits into from
Aug 12, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Split test
hannobraun committed Aug 12, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit b45fcf016d38f74b6c7bca8db4d783c3b44fde41
8 changes: 5 additions & 3 deletions crates/fj-kernel/src/algorithms/intersect/face_point.rs
Original file line number Diff line number Diff line change
@@ -140,17 +140,19 @@ mod tests {
}

#[test]
fn ray_hits_parallel_edge() {
// Ray passes face boundary at a vertex.
fn ray_hits_parallel_edge_and_leaves_face_at_vertex() {
let face = Face::build(Surface::xy_plane()).polygon_from_points([
[0., 0.],
[2., 1.],
[3., 1.],
[0., 2.],
]);

assert_contains_point(face, [1., 1.]);
}

// Ray hits a vertex, but doesn't pass face boundary there.
#[test]
fn ray_hits_parallel_edge_and_does_not_leave_face_there() {
let face = Face::build(Surface::xy_plane()).polygon_from_points([
[0., 0.],
[2., 1.],