Skip to content

Commit 3c4e3f0

Browse files
Merge pull request #63 from iShape-Rust/feature/replace_outline
Feature/replace outline
2 parents 373b0cb + 1fe9552 commit 3c4e3f0

33 files changed

Lines changed: 1393 additions & 882 deletions

examples/tests/outline/test_0.json

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,7 @@
22
"scale": 1000.0,
33
"outline": [
44
[
5-
[-15.0, -15.0],
6-
[ 15.0, -15.0],
7-
[ 15.0, 15.0],
8-
[-15.0, 15.0]
9-
],
10-
[
11-
[-5.0, -5.0],
12-
[-5.0, 5.0],
13-
[ 5.0, 5.0],
14-
[ 5.0, -5.0]
5+
[-5.0, 5.0], [-5.0, -5.0], [5.0, -5.0], [5.0, 5.0]
156
]
167
]
178
}

examples/tests/outline/test_1.json

Lines changed: 1 addition & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -2,58 +2,7 @@
22
"scale": 1000.0,
33
"outline": [
44
[
5-
[0.0, 0.0],
6-
[1.0, 0.0],
7-
[1.0, 1.0],
8-
[0.0, 1.0]
9-
],
10-
[
11-
[1.0, 2.0],
12-
[1.0, 3.0],
13-
[0.0, 3.0],
14-
[0.0, 2.0]
15-
],
16-
[
17-
[1.0, 4.0],
18-
[1.0, 5.0],
19-
[0.0, 5.0],
20-
[0.0, 4.0]
21-
],
22-
[
23-
[3.0, 0.0],
24-
[3.0, 1.0],
25-
[2.0, 1.0],
26-
[2.0, 0.0]
27-
],
28-
[
29-
[3.0, 2.0],
30-
[3.0, 3.0],
31-
[2.0, 3.0],
32-
[2.0, 2.0]
33-
],
34-
[
35-
[3.0, 4.0],
36-
[3.0, 5.0],
37-
[2.0, 5.0],
38-
[2.0, 4.0]
39-
],
40-
[
41-
[5.0, 0.0],
42-
[5.0, 1.0],
43-
[4.0, 1.0],
44-
[4.0, 0.0]
45-
],
46-
[
47-
[5.0, 2.0],
48-
[5.0, 3.0],
49-
[4.0, 3.0],
50-
[4.0, 2.0]
51-
],
52-
[
53-
[5.0, 4.0],
54-
[5.0, 5.0],
55-
[4.0, 5.0],
56-
[4.0, 4.0]
5+
[-5.0, 5.0], [-5.0, -5.0], [5.0, -5.0], [5.0, 0.0], [0.0, 0.0], [0.0, 5.0]
576
]
587
]
598
}

examples/tests/outline/test_2.json

Lines changed: 8 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,16 @@
22
"scale": 1000.0,
33
"outline": [
44
[
5-
[ 0.0, 0.0],
6-
[25.0, 0.0],
7-
[25.0, 25.0],
8-
[ 0.0, 25.0]
5+
[-15.0, -15.0],
6+
[ 15.0, -15.0],
7+
[ 15.0, 15.0],
8+
[-15.0, 15.0]
99
],
1010
[
11-
[ 5.0, 10.0],
12-
[10.0, 10.0],
13-
[10.0, 5.0],
14-
[ 5.0, 5.0]
15-
],
16-
[
17-
[ 5.0, 20.0],
18-
[10.0, 20.0],
19-
[10.0, 15.0],
20-
[ 5.0, 15.0]
21-
22-
],
23-
[
24-
[15.0, 10.0],
25-
[20.0, 10.0],
26-
[20.0, 5.0],
27-
[15.0, 5.0]
28-
],
29-
[
30-
[15.0, 20.0],
31-
[20.0, 20.0],
32-
[20.0, 15.0],
33-
[15.0, 15.0]
11+
[-5.0, -5.0],
12+
[-5.0, 5.0],
13+
[ 5.0, 5.0],
14+
[ 5.0, -5.0]
3415
]
3516
]
3617
}

examples/tests/outline/test_3.json

Lines changed: 52 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,58 @@
22
"scale": 1000.0,
33
"outline": [
44
[
5-
[-10.0, -20.0],
6-
[ 10.0, -20.0],
7-
[ 10.0, -10.0],
8-
[ 20.0, -10.0],
9-
[ 20.0, 10.0],
10-
[ 10.0, 10.0],
11-
[ 10.0, 20.0],
12-
[-10.0, 20.0],
13-
[-10.0, 10.0],
14-
[-20.0, 10.0],
15-
[-20.0, -10.0],
16-
[-10.0, -10.0]
5+
[0.0, 0.0],
6+
[1.0, 0.0],
7+
[1.0, 1.0],
8+
[0.0, 1.0]
9+
],
10+
[
11+
[1.0, 2.0],
12+
[1.0, 3.0],
13+
[0.0, 3.0],
14+
[0.0, 2.0]
15+
],
16+
[
17+
[1.0, 4.0],
18+
[1.0, 5.0],
19+
[0.0, 5.0],
20+
[0.0, 4.0]
21+
],
22+
[
23+
[3.0, 0.0],
24+
[3.0, 1.0],
25+
[2.0, 1.0],
26+
[2.0, 0.0]
27+
],
28+
[
29+
[3.0, 2.0],
30+
[3.0, 3.0],
31+
[2.0, 3.0],
32+
[2.0, 2.0]
33+
],
34+
[
35+
[3.0, 4.0],
36+
[3.0, 5.0],
37+
[2.0, 5.0],
38+
[2.0, 4.0]
39+
],
40+
[
41+
[5.0, 0.0],
42+
[5.0, 1.0],
43+
[4.0, 1.0],
44+
[4.0, 0.0]
45+
],
46+
[
47+
[5.0, 2.0],
48+
[5.0, 3.0],
49+
[4.0, 3.0],
50+
[4.0, 2.0]
51+
],
52+
[
53+
[5.0, 4.0],
54+
[5.0, 5.0],
55+
[4.0, 5.0],
56+
[4.0, 4.0]
1757
]
1858
]
1959
}

examples/tests/outline/test_4.json

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,35 @@
22
"scale": 1000.0,
33
"outline": [
44
[
5-
[2.0, 1.0],
6-
[4.0, 1.0],
7-
[5.0, 2.0],
8-
[13.0, 2.0],
9-
[13.0, 3.0],
10-
[12.0, 3.0],
11-
[12.0, 4.0],
12-
[11.0, 4.0],
13-
[11.0, 3.0],
14-
[10.0, 3.0],
15-
[9.0, 4.0],
16-
[8.0, 4.0],
17-
[8.0, 3.0],
18-
[5.0, 3.0],
19-
[5.0, 4.0],
20-
[4.0, 5.0],
21-
[2.0, 5.0],
22-
[1.0, 4.0],
23-
[1.0, 2.0]
5+
[ 0.0, 0.0],
6+
[25.0, 0.0],
7+
[25.0, 25.0],
8+
[ 0.0, 25.0]
249
],
2510
[
26-
[2.0, 4.0],
27-
[4.0, 4.0],
28-
[4.0, 2.0],
29-
[2.0, 2.0]
11+
[ 5.0, 10.0],
12+
[10.0, 10.0],
13+
[10.0, 5.0],
14+
[ 5.0, 5.0]
15+
],
16+
[
17+
[ 5.0, 20.0],
18+
[10.0, 20.0],
19+
[10.0, 15.0],
20+
[ 5.0, 15.0]
21+
22+
],
23+
[
24+
[15.0, 10.0],
25+
[20.0, 10.0],
26+
[20.0, 5.0],
27+
[15.0, 5.0]
28+
],
29+
[
30+
[15.0, 20.0],
31+
[20.0, 20.0],
32+
[20.0, 15.0],
33+
[15.0, 15.0]
3034
]
3135
]
3236
}

examples/tests/outline/test_5.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"scale": 1000.0,
3+
"outline": [
4+
[
5+
[-10.0, -20.0],
6+
[ 10.0, -20.0],
7+
[ 10.0, -10.0],
8+
[ 20.0, -10.0],
9+
[ 20.0, 10.0],
10+
[ 10.0, 10.0],
11+
[ 10.0, 20.0],
12+
[-10.0, 20.0],
13+
[-10.0, 10.0],
14+
[-20.0, 10.0],
15+
[-20.0, -10.0],
16+
[-10.0, -10.0]
17+
]
18+
]
19+
}

examples/tests/outline/test_6.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"scale": 1000.0,
3+
"outline": [
4+
[
5+
[-10.0, -20.0],
6+
[ 10.0, -20.0],
7+
[ 10.0, -10.0],
8+
[ 20.0, -10.0],
9+
[ 20.0, 10.0],
10+
[ 10.0, 10.0],
11+
[ 10.0, 20.0],
12+
[-10.0, 20.0],
13+
[-10.0, 10.0],
14+
[-20.0, 10.0],
15+
[-20.0, -10.0],
16+
[-10.0, -10.0]
17+
],
18+
[
19+
[ -5.0, -5.0],
20+
[-10.0, -5.0],
21+
[-10.0, 5.0],
22+
[ -5.0, 5.0],
23+
[ -5.0, 10.0],
24+
[ 5.0, 10.0],
25+
[ 5.0, 5.0],
26+
[ 10.0, 5.0],
27+
[ 10.0, -5.0],
28+
[ 5.0, -5.0],
29+
[ 5.0, -10.0],
30+
[ -5.0, -10.0]
31+
]
32+
]
33+
}

examples/tests/outline/test_7.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"scale": 1000.0,
3+
"outline": [
4+
[
5+
[2.0, 1.0],
6+
[4.0, 1.0],
7+
[5.0, 2.0],
8+
[13.0, 2.0],
9+
[13.0, 3.0],
10+
[12.0, 3.0],
11+
[12.0, 4.0],
12+
[11.0, 4.0],
13+
[11.0, 3.0],
14+
[10.0, 3.0],
15+
[9.0, 4.0],
16+
[8.0, 4.0],
17+
[8.0, 3.0],
18+
[5.0, 3.0],
19+
[5.0, 4.0],
20+
[4.0, 5.0],
21+
[2.0, 5.0],
22+
[1.0, 4.0],
23+
[1.0, 2.0]
24+
],
25+
[
26+
[2.0, 4.0],
27+
[4.0, 4.0],
28+
[4.0, 2.0],
29+
[2.0, 2.0]
30+
]
31+
]
32+
}

iOverlay/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "i_overlay"
3-
version = "4.4.1"
3+
version = "4.5.0"
44
authors = ["Nail Sharipov <nailxsharipov@gmail.com>"]
55
edition = "2024"
66
description = "Boolean Operations for 2D Polygons: Supports intersection, union, difference, xor, and self-intersections for all polygon varieties."
@@ -12,7 +12,7 @@ categories = ["algorithms", "graphics", "science::geo", "mathematics", "no-std"]
1212

1313
[dependencies]
1414
i_float = { version = "~1.16.0" }
15-
i_shape = { version = "~1.16.0" }
15+
i_shape = { version = "~1.18.0" }
1616
i_tree = { version = "^0.18.0" }
1717
i_key_sort = { version = "^0.10.1" }
1818

@@ -38,4 +38,4 @@ rand = { version = "~0.10", features = ["alloc"] }
3838
#i_float = { path = "../../iFloat", features = ["serde"] }
3939
#i_shape = { path = "../../iShape", features = ["serde"] }
4040
i_float = { version = "~1.16.0", features = ["serde"] }
41-
i_shape = { version = "~1.16.0", features = ["serde"] }
41+
i_shape = { version = "~1.18.0", features = ["serde"] }

iOverlay/src/build/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
pub(crate) mod boolean;
22
pub(crate) mod builder;
33
mod graph;
4-
pub(crate) mod offset;
54
pub(crate) mod string;
65
pub(crate) mod sweep;
76
mod util;

0 commit comments

Comments
 (0)