Skip to content

Commit 3caafba

Browse files
committed
vendor spade 2.10
1 parent dde70a2 commit 3caafba

29 files changed

+11891
-2
lines changed

Cargo.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,25 @@ async = []
1919
no-default-baking = []
2020
detailed-layers = []
2121
serde = ["glam/serde", "bvh2d/serde", "dep:serde"]
22+
public-spade = ["dep:spade"]
2223

2324
[dependencies]
25+
spade = { version = "2.10", optional = true }
2426
tracing = { version = "0.1", optional = true }
2527
hashbrown = { version = "0.15" }
2628
glam = { version = "0.29", features = ["approx"] }
2729
smallvec = { version = "1.13", features = ["union", "const_generics"] }
2830
bvh2d = { version = "0.6", git = "https://github.com/mockersf/bvh2d" }
2931
serde = { version = "1.0", features = ["derive"], optional = true }
30-
spade = "=2.10"
3132
geo = "0.29.0"
3233
log = "0.4"
3334
thiserror = "1"
3435

36+
# additional dependencies for vendored spade
37+
robust = "1.1.0"
38+
num-traits = "0.2"
39+
40+
3541
[dev-dependencies]
3642
criterion = "0.5"
3743
tracing-tracy = "0.11"

src/input/triangulation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ use inflate::Inflate;
44
#[cfg(feature = "tracing")]
55
use tracing::instrument;
66

7+
use crate::spade::{ConstrainedDelaunayTriangulation, Point2, Triangulation as SpadeTriangulation};
78
pub use geo::LineString;
89
use geo::{Contains, Coord, Polygon as GeoPolygon, SimplifyVwPreserve};
910
use glam::{vec2, Vec2};
10-
use spade::{ConstrainedDelaunayTriangulation, Point2, Triangulation as SpadeTriangulation};
1111

1212
use crate::{Layer, Mesh, Polygon, Vertex};
1313

src/lib.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ mod mesh_cleanup;
4545
mod primitives;
4646
mod stitching;
4747

48+
#[cfg(not(feature = "public-spade"))]
49+
mod vendored_spade;
50+
#[cfg(feature = "public-spade")]
51+
use spade;
52+
#[cfg(not(feature = "public-spade"))]
53+
use vendored_spade as spade;
54+
4855
#[cfg(feature = "async")]
4956
pub use async_helpers::FuturePath;
5057
pub use input::polyanya_file::PolyanyaFile;

0 commit comments

Comments
 (0)