Home

Awesome

Summary

This project is a continuation of the C++ CavalierContours library rewritten in Rust with the goal of building out more functionality, better documentation, and creating a stable C FFI. This project has all of the functionality of the C++ repository with more code documentation, test coverage, and some additional functions for working with polylines. For tracking progress and contributing checkout the project GitHub issues. For more information about the parallel offset algorithm and background information see the old C++ repository README.md here.

This library uses no unsafe code (#![forbid(unsafe_code)] is applied) in the main cavalier_contours crate. Unsafe is used in the cavalier_contours_ffi crate for C bindings.

<img src="https://github.com/jbuckmccready/CavalierContoursDoc/blob/master/gifs/PolylineOffsets.gif" width="400"/> <img src="https://github.com/jbuckmccready/CavalierContoursDoc/blob/master/gifs/PolylineCombines.gif" width="400"/>

<img src="https://raw.githubusercontent.com/jbuckmccready/CavalierContoursDoc/master/images/pretty_examples/example1.png" width="400"/> <img src="https://raw.githubusercontent.com/jbuckmccready/CavalierContoursDoc/master/images/pretty_examples/islands_example1.png" width="400"/>

Interactive Web Page for Visualizing and Testing

This project is compiled to wasm to create an interactive web demo page for visualing and testing.

Why go to Rust?

New to Rust but still want to contribute?

I recommend the official rust book here. Visual Studio Code + rust-analyzer extension work great for editing. If you're looking for something specific to work on check the project issues labeled good first issue.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.