offroad 0.5.7

2D offsetting for arc polylines/polygons.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use togo::{poly::{arcline500}, prelude::*};
use offroad::prelude::*;

fn main() {
    let mut cfg = OffsetCfg::default();
    let mut svg = SVG::new(800.0, 800.0, Some("/tmp/arcline500.svg"));
    cfg.svg = Some(&mut svg);
    cfg.svg_orig = true;
    cfg.svg_final = true;

    let poly = arcline500();
    let _offset_polylines = offset_arcline_to_arcline(&poly, 13.0, &mut cfg);

    if let Some(svg) = cfg.svg.as_mut(){
        // Write svg to file
        svg.write_stroke_width(0.1);
    }
}