qhull-rs
Rust Qhull bindings
This is a safe wrapper around the qhull-sys crate, it is not feature complete yet, you might prefer to use the raw qhull-sys crate if you need more control.
⚠️Warning⚠️
Errors are not handled properly yet.
Examples
This creates a convex hull of a set of points in 2D:
use *;
let qh = builder
.build_from_iter;
assert_eq!;
for simplex in qh.simplices
To create a delaunay triangulation, you should use the [Qh::new_delaunay] method.
See the examples directory for more examples, you can run them with cargo run --example <example_name>, for example:
Error handling
Qhull uses setjmp/longjmp for error handling, this is not currently supported in Rust, so errors are not handled properly yet.
Relevant links:
To walk around #2625 we might use some custom C code, but this would require some work I'm not willing to do right now.
License
This crate uses Qhull, please refer to the Qhull license for more information when using this crate.