mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-05 18:38:28 +00:00
Document PathApproxParams
This commit is contained in:
parent
6e747acd3a
commit
4d46e39eb2
@ -59,11 +59,13 @@ pub fn approx_circle<const D: usize>(
|
||||
points
|
||||
}
|
||||
|
||||
/// Path approximation parameters for a circle
|
||||
struct PathApproxParams {
|
||||
increment: Scalar,
|
||||
}
|
||||
|
||||
impl PathApproxParams {
|
||||
/// Compute path approximation parameters for the given circle and tolerance
|
||||
pub fn for_circle<const D: usize>(
|
||||
circle: &Circle<D>,
|
||||
tolerance: impl Into<Tolerance>,
|
||||
@ -82,10 +84,12 @@ impl PathApproxParams {
|
||||
Self { increment }
|
||||
}
|
||||
|
||||
/// Return the increment
|
||||
pub fn increment(&self) -> Scalar {
|
||||
self.increment
|
||||
}
|
||||
|
||||
/// Generate points to approximate the circle within the boundary
|
||||
pub fn points(
|
||||
&self,
|
||||
boundary: impl Into<CurveBoundary<Point<1>>>,
|
||||
|
Loading…
Reference in New Issue
Block a user