mirror of
https://github.com/hannobraun/Fornjot
synced 2025-02-12 10:15:51 +00:00
Avoid using Curve::global_form
This commit is contained in:
parent
1fe5b4b62e
commit
599008b865
@ -218,6 +218,7 @@ mod tests {
|
|||||||
builder::{CurveBuilder, SurfaceBuilder},
|
builder::{CurveBuilder, SurfaceBuilder},
|
||||||
geometry::path::GlobalPath,
|
geometry::path::GlobalPath,
|
||||||
insert::Insert,
|
insert::Insert,
|
||||||
|
objects::GlobalCurve,
|
||||||
partial::{PartialCurve, PartialObject, PartialSurface},
|
partial::{PartialCurve, PartialObject, PartialSurface},
|
||||||
services::Services,
|
services::Services,
|
||||||
};
|
};
|
||||||
@ -234,11 +235,10 @@ mod tests {
|
|||||||
let curve = curve
|
let curve = curve
|
||||||
.build(&mut services.objects)
|
.build(&mut services.objects)
|
||||||
.insert(&mut services.objects);
|
.insert(&mut services.objects);
|
||||||
|
let global_curve = GlobalCurve.insert(&mut services.objects);
|
||||||
let range = RangeOnPath::from([[0.], [1.]]);
|
let range = RangeOnPath::from([[0.], [1.]]);
|
||||||
|
|
||||||
let approx =
|
let approx = (&curve, surface.deref(), global_curve, range).approx(1.);
|
||||||
(&curve, surface.deref(), curve.global_form().clone(), range)
|
|
||||||
.approx(1.);
|
|
||||||
|
|
||||||
assert_eq!(approx, CurveApprox::empty());
|
assert_eq!(approx, CurveApprox::empty());
|
||||||
}
|
}
|
||||||
@ -258,11 +258,10 @@ mod tests {
|
|||||||
let curve = curve
|
let curve = curve
|
||||||
.build(&mut services.objects)
|
.build(&mut services.objects)
|
||||||
.insert(&mut services.objects);
|
.insert(&mut services.objects);
|
||||||
|
let global_curve = GlobalCurve.insert(&mut services.objects);
|
||||||
let range = RangeOnPath::from([[0.], [1.]]);
|
let range = RangeOnPath::from([[0.], [1.]]);
|
||||||
|
|
||||||
let approx =
|
let approx = (&curve, surface.deref(), global_curve, range).approx(1.);
|
||||||
(&curve, surface.deref(), curve.global_form().clone(), range)
|
|
||||||
.approx(1.);
|
|
||||||
|
|
||||||
assert_eq!(approx, CurveApprox::empty());
|
assert_eq!(approx, CurveApprox::empty());
|
||||||
}
|
}
|
||||||
@ -280,13 +279,13 @@ mod tests {
|
|||||||
let curve = curve
|
let curve = curve
|
||||||
.build(&mut services.objects)
|
.build(&mut services.objects)
|
||||||
.insert(&mut services.objects);
|
.insert(&mut services.objects);
|
||||||
|
let global_curve = GlobalCurve.insert(&mut services.objects);
|
||||||
|
|
||||||
let range = RangeOnPath::from([[0.], [TAU]]);
|
let range = RangeOnPath::from([[0.], [TAU]]);
|
||||||
let tolerance = 1.;
|
let tolerance = 1.;
|
||||||
|
|
||||||
let approx =
|
let approx =
|
||||||
(&curve, surface.deref(), curve.global_form().clone(), range)
|
(&curve, surface.deref(), global_curve, range).approx(tolerance);
|
||||||
.approx(tolerance);
|
|
||||||
|
|
||||||
let expected_approx = (path, range)
|
let expected_approx = (path, range)
|
||||||
.approx(tolerance)
|
.approx(tolerance)
|
||||||
@ -312,12 +311,12 @@ mod tests {
|
|||||||
let curve = curve
|
let curve = curve
|
||||||
.build(&mut services.objects)
|
.build(&mut services.objects)
|
||||||
.insert(&mut services.objects);
|
.insert(&mut services.objects);
|
||||||
|
let global_curve = GlobalCurve.insert(&mut services.objects);
|
||||||
|
|
||||||
let range = RangeOnPath::from([[0.], [TAU]]);
|
let range = RangeOnPath::from([[0.], [TAU]]);
|
||||||
let tolerance = 1.;
|
let tolerance = 1.;
|
||||||
let approx =
|
let approx =
|
||||||
(&curve, surface.deref(), curve.global_form().clone(), range)
|
(&curve, surface.deref(), global_curve, range).approx(tolerance);
|
||||||
.approx(tolerance);
|
|
||||||
|
|
||||||
let expected_approx = (curve.path(), range)
|
let expected_approx = (curve.path(), range)
|
||||||
.approx(tolerance)
|
.approx(tolerance)
|
||||||
|
Loading…
Reference in New Issue
Block a user