Skip to content

Commit 21d9646

Browse files
committed
Update Cargo.toml and examples: add README entry and adjust SVG configuration in offset_pline1 example; modify EPS_CONNECT constant for improved precision in offset_reconnect_arcs.
1 parent 8ca3ef2 commit 21d9646

3 files changed

Lines changed: 4 additions & 6 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ categories = ["algorithms", "data-structures", "graphics", "mathematics"]
88
keywords = ["offset", "arc", "polyline", "cnc", "polygon"]
99
license = "MIT"
1010
repository = "https://github.com/radevgit/offroad"
11+
readme = "README.md"
1112

1213

1314

@@ -26,9 +27,6 @@ divan = "0.1.21"
2627
name = "bench_offset_multiple"
2728
harness = false
2829

29-
[[example]]
30-
name = "offset_polyline"
31-
3230
[workspace.lints]
3331
rust.unsafe_code = "forbid"
3432

examples/offset_pline1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ fn main() {
77
let mut svg = SVG::new(300.0, 300.0, "/tmp/pline1.svg");
88
cfg.svg = Some(&mut svg);
99
cfg.svg_orig = true;
10-
cfg.svg_prune = true;
10+
cfg.svg_final = true;
1111

1212
let poly_orig = pline_01()[0].clone();
1313
// Translate to fit in the SVG viewport

src/offset_reconnect_arcs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#![allow(dead_code)]
22

3-
use std::collections::{HashMap, HashSet};
3+
use std::{collections::{HashMap, HashSet}, result};
44

55
use geom::prelude::*;
66

77

8-
const EPS_CONNECT: f64 = 1e-8;
8+
const EPS_CONNECT: f64 = 1e-6;
99

1010
#[doc(hidden)]
1111
/// Reconnects offset segments by merging adjacent arcs vertices.

0 commit comments

Comments
 (0)