polyops 0.0.4

Martinez-Rueda polygon clipping algorithm: Boolean operations (intersection, union, difference, xor) over polygons and multipolygons. Rust port of martinez-polygon-clipping.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
//! Smoke tests — exercise the public surface enough that the type
//! signatures compile and a build regression surfaces in CI even while
//! the algorithm is still stubbed.

use polyops::{Geometry, Polygon};

#[test]
fn public_types_compile() {
    /* Confirm the public types and From impls round-trip cleanly. */
    let polygon: Polygon = vec![vec![[0.0, 0.0], [1.0, 0.0], [1.0, 1.0], [0.0, 0.0]]];
    let _geom: Geometry = polygon.clone().into();
    let _multi: Geometry = vec![polygon].into();
}