From a87ed40021b21f049ac8072fc5bc13ca672cdd8f Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Mon, 4 Sep 2023 10:06:47 +0200 Subject: [PATCH 01/16] Remove unnecessary `pub`s --- crates/fj-core/src/algorithms/approx/edge.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/fj-core/src/algorithms/approx/edge.rs b/crates/fj-core/src/algorithms/approx/edge.rs index d3df2f9a2..4ea87205d 100644 --- a/crates/fj-core/src/algorithms/approx/edge.rs +++ b/crates/fj-core/src/algorithms/approx/edge.rs @@ -116,10 +116,10 @@ impl Approx for (&Edge, &Surface) { #[derive(Debug, Eq, PartialEq, Hash, Ord, PartialOrd)] pub struct EdgeApprox { /// The point that approximates the first vertex of the edge - pub first: ApproxPoint<2>, + first: ApproxPoint<2>, /// The approximation of the edge - pub points: Vec>, + points: Vec>, } impl EdgeApprox { From 00f2701432880f220e35014e6f341791a62119ea Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Mon, 4 Sep 2023 10:07:07 +0200 Subject: [PATCH 02/16] Update doc comment --- crates/fj-core/src/algorithms/approx/edge.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/fj-core/src/algorithms/approx/edge.rs b/crates/fj-core/src/algorithms/approx/edge.rs index 4ea87205d..ec6430b8f 100644 --- a/crates/fj-core/src/algorithms/approx/edge.rs +++ b/crates/fj-core/src/algorithms/approx/edge.rs @@ -118,7 +118,7 @@ pub struct EdgeApprox { /// The point that approximates the first vertex of the edge first: ApproxPoint<2>, - /// The approximation of the edge + /// The approximation of the rest of the edge points: Vec>, } From e8aa50d0c67cedc4b32330ed2d890be731a5fda9 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Mon, 4 Sep 2023 10:07:48 +0200 Subject: [PATCH 03/16] Rename struct field to improve clarity --- crates/fj-core/src/algorithms/approx/edge.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/crates/fj-core/src/algorithms/approx/edge.rs b/crates/fj-core/src/algorithms/approx/edge.rs index ec6430b8f..a8e84b53f 100644 --- a/crates/fj-core/src/algorithms/approx/edge.rs +++ b/crates/fj-core/src/algorithms/approx/edge.rs @@ -41,7 +41,7 @@ impl Approx for (&Edge, &Surface) { let first = ApproxPoint::new(position_surface, position_global); - let points = { + let rest = { // We cache approximated `Edge`s using the `Curve`s they reference // and their boundary on that curve as the key. That bakes in the // undesirable assumption that all coincident `Edge`s are also @@ -108,7 +108,7 @@ impl Approx for (&Edge, &Surface) { .collect() }; - EdgeApprox { first, points } + EdgeApprox { first, rest } } } @@ -119,7 +119,7 @@ pub struct EdgeApprox { first: ApproxPoint<2>, /// The approximation of the rest of the edge - points: Vec>, + rest: Vec>, } impl EdgeApprox { @@ -128,7 +128,7 @@ impl EdgeApprox { let mut points = Vec::new(); points.push(self.first.clone()); - points.extend(self.points.iter().cloned()); + points.extend(self.rest.iter().cloned()); points } @@ -300,7 +300,7 @@ mod tests { let tolerance = 1.; let approx = (&edge, surface.deref()).approx(tolerance); - assert_eq!(approx.points, Vec::new()); + assert_eq!(approx.rest, Vec::new()); } #[test] @@ -317,7 +317,7 @@ mod tests { let tolerance = 1.; let approx = (&edge, &surface).approx(tolerance); - assert_eq!(approx.points, Vec::new()); + assert_eq!(approx.rest, Vec::new()); } #[test] @@ -351,7 +351,7 @@ mod tests { ApproxPoint::new(point_surface, point_global) }) .collect::>(); - assert_eq!(approx.points, expected_approx); + assert_eq!(approx.rest, expected_approx); } #[test] @@ -375,6 +375,6 @@ mod tests { ApproxPoint::new(point_surface, point_global) }) .collect::>(); - assert_eq!(approx.points, expected_approx); + assert_eq!(approx.rest, expected_approx); } } From edca88519ff08c9adadb4741b6cc23f6bb47ca43 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Mon, 4 Sep 2023 10:25:50 +0200 Subject: [PATCH 04/16] Update order of methods to improve clarity This is the order the methods are actually used in, in the code above. --- crates/fj-core/src/algorithms/approx/edge.rs | 28 ++++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/crates/fj-core/src/algorithms/approx/edge.rs b/crates/fj-core/src/algorithms/approx/edge.rs index a8e84b53f..1ac3595b3 100644 --- a/crates/fj-core/src/algorithms/approx/edge.rs +++ b/crates/fj-core/src/algorithms/approx/edge.rs @@ -226,6 +226,20 @@ impl EdgeCache { Self::default() } + fn get_position(&self, handle: &Handle) -> Option> { + self.vertex_approx.get(&handle.clone().into()).cloned() + } + + fn insert_position( + &mut self, + handle: &Handle, + position: Point<3>, + ) -> Point<3> { + self.vertex_approx + .insert(handle.clone().into(), position) + .unwrap_or(position) + } + /// Access the approximation for the given edge, if available fn get_edge( &self, @@ -259,20 +273,6 @@ impl EdgeCache { .insert((handle.into(), boundary), approx.clone()) .unwrap_or(approx) } - - fn get_position(&self, handle: &Handle) -> Option> { - self.vertex_approx.get(&handle.clone().into()).cloned() - } - - fn insert_position( - &mut self, - handle: &Handle, - position: Point<3>, - ) -> Point<3> { - self.vertex_approx - .insert(handle.clone().into(), position) - .unwrap_or(position) - } } #[cfg(test)] From 72d5c2a6b72f9709dd6f6c9ba8ad33b7c4cd49bd Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Mon, 4 Sep 2023 10:26:54 +0200 Subject: [PATCH 05/16] Rename variable to improve clarity --- crates/fj-core/src/algorithms/approx/edge.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/fj-core/src/algorithms/approx/edge.rs b/crates/fj-core/src/algorithms/approx/edge.rs index 1ac3595b3..dc09fc499 100644 --- a/crates/fj-core/src/algorithms/approx/edge.rs +++ b/crates/fj-core/src/algorithms/approx/edge.rs @@ -28,18 +28,18 @@ impl Approx for (&Edge, &Surface) { ) -> Self::Approximation { let (edge, surface) = self; - let position_surface = edge.start_position(); + let start_position_surface = edge.start_position(); let position_global = match cache.get_position(edge.start_vertex()) { Some(position) => position, None => { let position_global = surface .geometry() - .point_from_surface_coords(position_surface); + .point_from_surface_coords(start_position_surface); cache.insert_position(edge.start_vertex(), position_global) } }; - let first = ApproxPoint::new(position_surface, position_global); + let first = ApproxPoint::new(start_position_surface, position_global); let rest = { // We cache approximated `Edge`s using the `Curve`s they reference From 6444693af3575e277a60233d01efddb645756949 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Mon, 4 Sep 2023 10:27:30 +0200 Subject: [PATCH 06/16] Rename variable to improve clarity --- crates/fj-core/src/algorithms/approx/edge.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/fj-core/src/algorithms/approx/edge.rs b/crates/fj-core/src/algorithms/approx/edge.rs index dc09fc499..e40427d8d 100644 --- a/crates/fj-core/src/algorithms/approx/edge.rs +++ b/crates/fj-core/src/algorithms/approx/edge.rs @@ -29,7 +29,7 @@ impl Approx for (&Edge, &Surface) { let (edge, surface) = self; let start_position_surface = edge.start_position(); - let position_global = match cache.get_position(edge.start_vertex()) { + let start_position = match cache.get_position(edge.start_vertex()) { Some(position) => position, None => { let position_global = surface @@ -39,7 +39,7 @@ impl Approx for (&Edge, &Surface) { } }; - let first = ApproxPoint::new(start_position_surface, position_global); + let first = ApproxPoint::new(start_position_surface, start_position); let rest = { // We cache approximated `Edge`s using the `Curve`s they reference From 0457c1404bc83a3dc717b8e7f8819502a824c514 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Mon, 4 Sep 2023 10:28:05 +0200 Subject: [PATCH 07/16] Rename method to improve clarity --- crates/fj-core/src/algorithms/approx/edge.rs | 24 ++++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/crates/fj-core/src/algorithms/approx/edge.rs b/crates/fj-core/src/algorithms/approx/edge.rs index e40427d8d..3938a3523 100644 --- a/crates/fj-core/src/algorithms/approx/edge.rs +++ b/crates/fj-core/src/algorithms/approx/edge.rs @@ -29,15 +29,16 @@ impl Approx for (&Edge, &Surface) { let (edge, surface) = self; let start_position_surface = edge.start_position(); - let start_position = match cache.get_position(edge.start_vertex()) { - Some(position) => position, - None => { - let position_global = surface - .geometry() - .point_from_surface_coords(start_position_surface); - cache.insert_position(edge.start_vertex(), position_global) - } - }; + let start_position = + match cache.get_start_position_approx(edge.start_vertex()) { + Some(position) => position, + None => { + let position_global = surface + .geometry() + .point_from_surface_coords(start_position_surface); + cache.insert_position(edge.start_vertex(), position_global) + } + }; let first = ApproxPoint::new(start_position_surface, start_position); @@ -226,7 +227,10 @@ impl EdgeCache { Self::default() } - fn get_position(&self, handle: &Handle) -> Option> { + fn get_start_position_approx( + &self, + handle: &Handle, + ) -> Option> { self.vertex_approx.get(&handle.clone().into()).cloned() } From 5dd94e8feab65e3b27fe838150675aec16834f02 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Mon, 4 Sep 2023 10:28:24 +0200 Subject: [PATCH 08/16] Rename method to improve clarity --- crates/fj-core/src/algorithms/approx/edge.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/crates/fj-core/src/algorithms/approx/edge.rs b/crates/fj-core/src/algorithms/approx/edge.rs index 3938a3523..c49f7b9d2 100644 --- a/crates/fj-core/src/algorithms/approx/edge.rs +++ b/crates/fj-core/src/algorithms/approx/edge.rs @@ -36,7 +36,10 @@ impl Approx for (&Edge, &Surface) { let position_global = surface .geometry() .point_from_surface_coords(start_position_surface); - cache.insert_position(edge.start_vertex(), position_global) + cache.insert_start_position_approx( + edge.start_vertex(), + position_global, + ) } }; @@ -234,7 +237,7 @@ impl EdgeCache { self.vertex_approx.get(&handle.clone().into()).cloned() } - fn insert_position( + fn insert_start_position_approx( &mut self, handle: &Handle, position: Point<3>, From 65e8aebca73eb6cf5edf5f512d309e9488f70503 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Mon, 4 Sep 2023 10:29:41 +0200 Subject: [PATCH 09/16] Update order of struct field to improve clarity The new order matches the order of the methods that access the fields. --- crates/fj-core/src/algorithms/approx/edge.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/fj-core/src/algorithms/approx/edge.rs b/crates/fj-core/src/algorithms/approx/edge.rs index c49f7b9d2..93f448795 100644 --- a/crates/fj-core/src/algorithms/approx/edge.rs +++ b/crates/fj-core/src/algorithms/approx/edge.rs @@ -217,11 +217,11 @@ fn approx_edge( /// A cache for results of an approximation #[derive(Default)] pub struct EdgeCache { + vertex_approx: BTreeMap, Point<3>>, edge_approx: BTreeMap< (HandleWrapper, CurveBoundary>), CurveApproxSegment, >, - vertex_approx: BTreeMap, Point<3>>, } impl EdgeCache { From 1b4eb5d2297cb30dc59df389561b6dfa45ebb8d4 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Mon, 4 Sep 2023 10:30:15 +0200 Subject: [PATCH 10/16] Rename struct field to improve clarity --- crates/fj-core/src/algorithms/approx/edge.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/crates/fj-core/src/algorithms/approx/edge.rs b/crates/fj-core/src/algorithms/approx/edge.rs index 93f448795..4c77a4746 100644 --- a/crates/fj-core/src/algorithms/approx/edge.rs +++ b/crates/fj-core/src/algorithms/approx/edge.rs @@ -217,7 +217,7 @@ fn approx_edge( /// A cache for results of an approximation #[derive(Default)] pub struct EdgeCache { - vertex_approx: BTreeMap, Point<3>>, + start_position_approx: BTreeMap, Point<3>>, edge_approx: BTreeMap< (HandleWrapper, CurveBoundary>), CurveApproxSegment, @@ -234,7 +234,9 @@ impl EdgeCache { &self, handle: &Handle, ) -> Option> { - self.vertex_approx.get(&handle.clone().into()).cloned() + self.start_position_approx + .get(&handle.clone().into()) + .cloned() } fn insert_start_position_approx( @@ -242,7 +244,7 @@ impl EdgeCache { handle: &Handle, position: Point<3>, ) -> Point<3> { - self.vertex_approx + self.start_position_approx .insert(handle.clone().into(), position) .unwrap_or(position) } From d8a206967542ceca91027759f45a40459e90fc50 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Mon, 4 Sep 2023 10:31:14 +0200 Subject: [PATCH 11/16] Rename method to improve clarity --- crates/fj-core/src/algorithms/approx/edge.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/fj-core/src/algorithms/approx/edge.rs b/crates/fj-core/src/algorithms/approx/edge.rs index 4c77a4746..e14f1c1ec 100644 --- a/crates/fj-core/src/algorithms/approx/edge.rs +++ b/crates/fj-core/src/algorithms/approx/edge.rs @@ -82,7 +82,7 @@ impl Approx for (&Edge, &Surface) { // able to deliver partial results for a given boundary, then // generating (and caching) the rest of it on the fly. let cached_approx = - cache.get_edge(edge.curve().clone(), edge.boundary()); + cache.get_curve_approx(edge.curve().clone(), edge.boundary()); let approx = match cached_approx { Some(approx) => approx, None => { @@ -250,7 +250,7 @@ impl EdgeCache { } /// Access the approximation for the given edge, if available - fn get_edge( + fn get_curve_approx( &self, handle: Handle, boundary: CurveBoundary>, From f7103291172b9439eb1020b774cd3d2d113137cd Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Mon, 4 Sep 2023 10:35:53 +0200 Subject: [PATCH 12/16] Rename method to improve clarity --- crates/fj-core/src/algorithms/approx/edge.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/fj-core/src/algorithms/approx/edge.rs b/crates/fj-core/src/algorithms/approx/edge.rs index e14f1c1ec..3f6f45f71 100644 --- a/crates/fj-core/src/algorithms/approx/edge.rs +++ b/crates/fj-core/src/algorithms/approx/edge.rs @@ -92,7 +92,7 @@ impl Approx for (&Edge, &Surface) { edge.boundary(), tolerance, ); - cache.insert_edge( + cache.insert_curve_approx( edge.curve().clone(), edge.boundary(), approx, @@ -272,7 +272,7 @@ impl EdgeCache { } /// Insert the approximation of an edge - fn insert_edge( + fn insert_curve_approx( &mut self, handle: Handle, boundary: CurveBoundary>, From 5557d7f1b494be2c469baaff67c94ade91719301 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Mon, 4 Sep 2023 10:36:39 +0200 Subject: [PATCH 13/16] Update struct field name to improve clarity --- crates/fj-core/src/algorithms/approx/edge.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/fj-core/src/algorithms/approx/edge.rs b/crates/fj-core/src/algorithms/approx/edge.rs index 3f6f45f71..db1bd51d6 100644 --- a/crates/fj-core/src/algorithms/approx/edge.rs +++ b/crates/fj-core/src/algorithms/approx/edge.rs @@ -218,7 +218,7 @@ fn approx_edge( #[derive(Default)] pub struct EdgeCache { start_position_approx: BTreeMap, Point<3>>, - edge_approx: BTreeMap< + curve_approx: BTreeMap< (HandleWrapper, CurveBoundary>), CurveApproxSegment, >, @@ -256,12 +256,12 @@ impl EdgeCache { boundary: CurveBoundary>, ) -> Option { if let Some(approx) = - self.edge_approx.get(&(handle.clone().into(), boundary)) + self.curve_approx.get(&(handle.clone().into(), boundary)) { return Some(approx.clone()); } if let Some(approx) = - self.edge_approx.get(&(handle.into(), boundary.reverse())) + self.curve_approx.get(&(handle.into(), boundary.reverse())) { // If we have a cache entry for the reverse boundary, we need to use // that too! @@ -278,7 +278,7 @@ impl EdgeCache { boundary: CurveBoundary>, approx: CurveApproxSegment, ) -> CurveApproxSegment { - self.edge_approx + self.curve_approx .insert((handle.into(), boundary), approx.clone()) .unwrap_or(approx) } From 81f3a6dd0b4571438daffa17880cf80a667ed466 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Mon, 4 Sep 2023 10:37:32 +0200 Subject: [PATCH 14/16] Rename struct to improve clarity --- crates/fj-core/src/algorithms/approx/cycle.rs | 4 ++-- crates/fj-core/src/algorithms/approx/edge.rs | 6 +++--- crates/fj-core/src/algorithms/approx/face.rs | 6 +++--- crates/fj-core/src/algorithms/approx/shell.rs | 4 ++-- crates/fj-core/src/algorithms/approx/sketch.rs | 4 ++-- crates/fj-core/src/algorithms/approx/solid.rs | 4 ++-- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/crates/fj-core/src/algorithms/approx/cycle.rs b/crates/fj-core/src/algorithms/approx/cycle.rs index 04c3eadad..9ada80137 100644 --- a/crates/fj-core/src/algorithms/approx/cycle.rs +++ b/crates/fj-core/src/algorithms/approx/cycle.rs @@ -9,13 +9,13 @@ use fj_math::Segment; use crate::objects::{Cycle, Surface}; use super::{ - edge::{EdgeApprox, EdgeCache}, + edge::{EdgeApprox, EdgeApproxCache}, Approx, ApproxPoint, Tolerance, }; impl Approx for (&Cycle, &Surface) { type Approximation = CycleApprox; - type Cache = EdgeCache; + type Cache = EdgeApproxCache; fn approx_with_cache( self, diff --git a/crates/fj-core/src/algorithms/approx/edge.rs b/crates/fj-core/src/algorithms/approx/edge.rs index db1bd51d6..22cbda5d0 100644 --- a/crates/fj-core/src/algorithms/approx/edge.rs +++ b/crates/fj-core/src/algorithms/approx/edge.rs @@ -19,7 +19,7 @@ use super::{curve::CurveApproxSegment, Approx, ApproxPoint, Tolerance}; impl Approx for (&Edge, &Surface) { type Approximation = EdgeApprox; - type Cache = EdgeCache; + type Cache = EdgeApproxCache; fn approx_with_cache( self, @@ -216,7 +216,7 @@ fn approx_edge( /// A cache for results of an approximation #[derive(Default)] -pub struct EdgeCache { +pub struct EdgeApproxCache { start_position_approx: BTreeMap, Point<3>>, curve_approx: BTreeMap< (HandleWrapper, CurveBoundary>), @@ -224,7 +224,7 @@ pub struct EdgeCache { >, } -impl EdgeCache { +impl EdgeApproxCache { /// Create an empty cache pub fn new() -> Self { Self::default() diff --git a/crates/fj-core/src/algorithms/approx/face.rs b/crates/fj-core/src/algorithms/approx/face.rs index 261c0d7eb..40e70717f 100644 --- a/crates/fj-core/src/algorithms/approx/face.rs +++ b/crates/fj-core/src/algorithms/approx/face.rs @@ -12,12 +12,12 @@ use crate::{ }; use super::{ - cycle::CycleApprox, edge::EdgeCache, Approx, ApproxPoint, Tolerance, + cycle::CycleApprox, edge::EdgeApproxCache, Approx, ApproxPoint, Tolerance, }; impl Approx for &FaceSet { type Approximation = BTreeSet; - type Cache = EdgeCache; + type Cache = EdgeApproxCache; fn approx_with_cache( self, @@ -63,7 +63,7 @@ impl Approx for &FaceSet { impl Approx for &Face { type Approximation = FaceApprox; - type Cache = EdgeCache; + type Cache = EdgeApproxCache; fn approx_with_cache( self, diff --git a/crates/fj-core/src/algorithms/approx/shell.rs b/crates/fj-core/src/algorithms/approx/shell.rs index 0b9e3601d..1fbb21121 100644 --- a/crates/fj-core/src/algorithms/approx/shell.rs +++ b/crates/fj-core/src/algorithms/approx/shell.rs @@ -4,11 +4,11 @@ use std::collections::BTreeSet; use crate::objects::Shell; -use super::{edge::EdgeCache, face::FaceApprox, Approx, Tolerance}; +use super::{edge::EdgeApproxCache, face::FaceApprox, Approx, Tolerance}; impl Approx for &Shell { type Approximation = BTreeSet; - type Cache = EdgeCache; + type Cache = EdgeApproxCache; fn approx_with_cache( self, diff --git a/crates/fj-core/src/algorithms/approx/sketch.rs b/crates/fj-core/src/algorithms/approx/sketch.rs index 7748fb92a..2e935a9f6 100644 --- a/crates/fj-core/src/algorithms/approx/sketch.rs +++ b/crates/fj-core/src/algorithms/approx/sketch.rs @@ -4,11 +4,11 @@ use std::collections::BTreeSet; use crate::objects::Sketch; -use super::{edge::EdgeCache, face::FaceApprox, Approx, Tolerance}; +use super::{edge::EdgeApproxCache, face::FaceApprox, Approx, Tolerance}; impl Approx for &Sketch { type Approximation = BTreeSet; - type Cache = EdgeCache; + type Cache = EdgeApproxCache; fn approx_with_cache( self, diff --git a/crates/fj-core/src/algorithms/approx/solid.rs b/crates/fj-core/src/algorithms/approx/solid.rs index 4aff45ecb..8fae93993 100644 --- a/crates/fj-core/src/algorithms/approx/solid.rs +++ b/crates/fj-core/src/algorithms/approx/solid.rs @@ -4,11 +4,11 @@ use std::collections::BTreeSet; use crate::objects::Solid; -use super::{edge::EdgeCache, face::FaceApprox, Approx, Tolerance}; +use super::{edge::EdgeApproxCache, face::FaceApprox, Approx, Tolerance}; impl Approx for &Solid { type Approximation = BTreeSet; - type Cache = EdgeCache; + type Cache = EdgeApproxCache; fn approx_with_cache( self, From 80dfa4bbcbbda8ebc5358fcffdeecbcf4ced241e Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Mon, 4 Sep 2023 10:38:08 +0200 Subject: [PATCH 15/16] Remove outdated doc comments --- crates/fj-core/src/algorithms/approx/edge.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/crates/fj-core/src/algorithms/approx/edge.rs b/crates/fj-core/src/algorithms/approx/edge.rs index 22cbda5d0..db15452bd 100644 --- a/crates/fj-core/src/algorithms/approx/edge.rs +++ b/crates/fj-core/src/algorithms/approx/edge.rs @@ -249,7 +249,6 @@ impl EdgeApproxCache { .unwrap_or(position) } - /// Access the approximation for the given edge, if available fn get_curve_approx( &self, handle: Handle, @@ -271,7 +270,6 @@ impl EdgeApproxCache { None } - /// Insert the approximation of an edge fn insert_curve_approx( &mut self, handle: Handle, From 9510b8b91837dd5fe2965e3a9a59f690a710c8a3 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Mon, 4 Sep 2023 10:38:42 +0200 Subject: [PATCH 16/16] Update doc comment --- crates/fj-core/src/algorithms/approx/edge.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/fj-core/src/algorithms/approx/edge.rs b/crates/fj-core/src/algorithms/approx/edge.rs index db15452bd..aa7d6bc6d 100644 --- a/crates/fj-core/src/algorithms/approx/edge.rs +++ b/crates/fj-core/src/algorithms/approx/edge.rs @@ -214,7 +214,7 @@ fn approx_edge( CurveApproxSegment { boundary, points } } -/// A cache for results of an approximation +/// Cache for edge approximations #[derive(Default)] pub struct EdgeApproxCache { start_position_approx: BTreeMap, Point<3>>,