mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-06 10:58:28 +00:00
Avoid direct use of CircleApproxParams
This commit is contained in:
parent
5eef38324f
commit
492643e6ff
@ -1,8 +1,6 @@
|
|||||||
use fj_math::{Circle, Point};
|
use fj_math::{Circle, Point};
|
||||||
|
|
||||||
use crate::geometry::{
|
use crate::geometry::{traits::GenPolyline, CurveBoundary, Tolerance};
|
||||||
curves::circle::CircleApproxParams, CurveBoundary, Tolerance,
|
|
||||||
};
|
|
||||||
|
|
||||||
/// # Approximate a circle
|
/// # Approximate a circle
|
||||||
///
|
///
|
||||||
@ -47,10 +45,9 @@ pub fn approx_circle<const D: usize>(
|
|||||||
let boundary = boundary.into();
|
let boundary = boundary.into();
|
||||||
let tolerance = tolerance.into();
|
let tolerance = tolerance.into();
|
||||||
|
|
||||||
let params = CircleApproxParams::new(circle, tolerance);
|
|
||||||
let mut points = Vec::new();
|
let mut points = Vec::new();
|
||||||
|
|
||||||
for point_curve in params.approx_circle(boundary) {
|
for point_curve in circle.generate_polyline(boundary, tolerance) {
|
||||||
let point_global = circle.point_from_circle_coords(point_curve);
|
let point_global = circle.point_from_circle_coords(point_curve);
|
||||||
points.push((point_curve, point_global));
|
points.push((point_curve, point_global));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user