Path Offset
A simple Rust library for offsetting paths, leveraging other powerful libraries for robust geometric calculations.
Features
- Path Offsetting: Easily offset complex paths.
- Multiple Backends: Choose between
flo_curvesandcavalier_contoursfor the offsetting algorithm. - Path Utilities: Includes utilities for path manipulation, such as finding the outer shell of a complex path.
- SVG Path Support: Parse SVG path data and convert paths back to SVG path strings.
Usage
Add this to your Cargo.toml:
[]
= "0.1.1"
Offsetting a Path
use Offset;
use Path;
use FromStr;
let path = from_str.unwrap;
// Use one of the available offsetters
let offsetter = new;
let offset_path = offsetter.offset_path.unwrap;
println!;
Finding the Outer Shell
use Path;
use FromStr;
let path = from_str.unwrap;
let outer_shell = path.find_outer_shell.unwrap;
println!;
Backends
This library uses the following backends for path offsetting:
flo_curves: A robust library for path and curve manipulation.cavalier_contours: A fast and reliable library for path offsetting.
You can choose the backend that best suits your needs.
Contributing
Contributions are welcome! Please open an issue or submit a pull request.
License
This project is licensed under the Apache-2.0 License.