-
Notifications
You must be signed in to change notification settings - Fork 2
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
to_trangulation hang on certain shape #2
Comments
It seems to hang up in this loop here: https://github.com/iShape-Rust/iTriangle/blob/0.27.4/src/monotone/monotone_layout.rs#L255-L258 |
Also, just noticed the same things happens with IntShape triangulation: #[test]
fn test_crasher_int() {
let int_shape: IntShape = vec![
vec![
IntPoint::new(1, 1),
IntPoint::new(1, 4),
IntPoint::new(2, 4),
IntPoint::new(2, 3),
IntPoint::new(3, 3),
IntPoint::new(3, 1),
]
];
let triangulation = int_shape.triangulation();
eprintln!("we made it here");
} |
I'm not very proud of this library, as it was originally written 6 years ago and it's time for a rewrite. I don't recommend using it in production yet. But it seems that this bug has already been fixed in the latest version. |
Hey, don't sell yourself short, the library works nicely and is well documented, which is more than I can say for most of the other ones out there, having tried them. 😄 I will give the latest version a try and report back. |
Interestingly, when I check out master and run the tests, they pass. In my project, I'm getting failures. I will dig deeper into this. |
Huh, when I check out the i_triangle locally, and include the local version in my workspace using There doesn't seem to be any new commits since 0.27.4 was released, so I am a little stumped. |
I've been having an issue where if I try to triangulate the following shape, the code hangs up in the to_trangulation function:
I've created a unit test that reproduces this:
It doesn't seem to matter what FillRule I use, I get the same results. Interestingly, I don't get a crash if I close the shape (end with 1.0, 1.0).
This may be a case of me doing something wrong, but I can't seem to figure it out.
The text was updated successfully, but these errors were encountered: