mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-06 10:58:28 +00:00
Circumvent redundant code in circle approximation
This commit is contained in:
parent
d6c17fe3f4
commit
fdb92762ab
@ -10,7 +10,7 @@ use crate::{
|
|||||||
topology::{Curve, Surface},
|
topology::{Curve, Surface},
|
||||||
};
|
};
|
||||||
|
|
||||||
use super::{Approx, ApproxPoint, Tolerance};
|
use super::{path::approx_circle, Approx, ApproxPoint, Tolerance};
|
||||||
|
|
||||||
impl Approx for (&Handle<Curve>, &Handle<Surface>, CurveBoundary<Point<1>>) {
|
impl Approx for (&Handle<Curve>, &Handle<Surface>, CurveBoundary<Point<1>>) {
|
||||||
type Approximation = CurveApprox;
|
type Approximation = CurveApprox;
|
||||||
@ -65,9 +65,8 @@ fn approx_curve(
|
|||||||
"Approximating a circle on a curved surface not supported yet."
|
"Approximating a circle on a curved surface not supported yet."
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
(SurfacePath::Circle(_), GlobalPath::Line(_)) => {
|
(SurfacePath::Circle(circle), GlobalPath::Line(_)) => {
|
||||||
(path, boundary)
|
approx_circle(circle, boundary, tolerance)
|
||||||
.approx_with_cache(tolerance, &mut (), geometry)
|
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|(point_curve, point_surface)| {
|
.map(|(point_curve, point_surface)| {
|
||||||
// We're throwing away `point_surface` here, which is a
|
// We're throwing away `point_surface` here, which is a
|
||||||
|
Loading…
Reference in New Issue
Block a user