You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: node-graph/gcore/src/vector/algorithms/bezpath_algorithms.rs
+50-18Lines changed: 50 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,7 @@
1
1
usesuper::poisson_disk::poisson_disk_sample;
2
-
usecrate::vector::PointId;
3
-
use bezier_rs::Subpath;
4
-
use glam::{DAffine2,DVec2};
5
-
use kurbo::{BezPath,ParamCurve,ParamCurveDeriv,PathSeg,Point,Shape};
2
+
usecrate::vector::misc::dvec2_to_point;
3
+
use glam::DVec2;
4
+
use kurbo::{Affine,BezPath,Line,ParamCurve,ParamCurveDeriv,PathSeg,Point,Rect,Shape};
6
5
7
6
/// Accuracy to find the position on [kurbo::Bezpath].
8
7
constPOSITION_ACCURACY:f64 = 1e-5;
@@ -199,26 +198,29 @@ fn bezpath_t_value_to_parametric(bezpath: &kurbo::BezPath, t: BezPathTValue, pre
199
198
///
200
199
/// While the conceptual process described above asymptotically slows down and is never guaranteed to produce a maximal set in finite time,
201
200
/// this is implemented with an algorithm that produces a maximal set in O(n) time. The slowest part is actually checking if points are inside the subpath shape.
0 commit comments