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

another edge case for add_constraint_and_split #116

Open
mockersf opened this issue Sep 10, 2024 · 0 comments
Open

another edge case for add_constraint_and_split #116

mockersf opened this issue Sep 10, 2024 · 0 comments

Comments

@mockersf
Copy link

with f64 precision, with spade 2.12.1

use spade::{ConstrainedDelaunayTriangulation, Point2, Triangulation};

#[test]
fn test() {
    let edges = [
        (
            Point2 {
                x: 15.435077667236328,
                y: 16.331045150756836,
            },
            Point2 {
                x: 20.322175979614258,
                y: 21.218143463134766,
            },
        ),
        (
            Point2 {
                x: 18.69314193725586,
                y: 19.589109420776367,
            },
            Point2 {
                x: 19.507659912109375,
                y: 20.40362548828125,
            },
        ),
        (
            Point2 {
                x: 19.507659912109375,
                y: 21.218143463134766,
            },
            Point2 {
                x: 19.507659912109375,
                y: 20.40362548828125,
            },
        ),
        (
            Point2 {
                x: 17.878625869750977,
                y: 18.774595260620117,
            },
            Point2 {
                x: 19.507659912109375,
                y: 20.40362548828125,
            },
        ),
    ];
    let mut cdt: ConstrainedDelaunayTriangulation<Point2<f64>> =
        ConstrainedDelaunayTriangulation::new();
    for edge in edges {
        let point_a = cdt.insert(edge.0).unwrap();
        let point_b = cdt.insert(edge.1).unwrap();
        cdt.add_constraint_and_split(point_a, point_b, |v| v);
    }
}
thread 'test' panicked at spade/src/cdt.rs:879:17:
assertion `left != right` failed
  left: []
 right: []
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

No branches or pull requests

1 participant