Update name of EdgeCache

This commit is contained in:
Hanno Braun 2023-02-22 13:39:24 +01:00
parent 073531e5f3
commit 5f2156cfa7
6 changed files with 14 additions and 14 deletions

View File

@ -7,13 +7,13 @@ use fj_math::Segment;
use crate::objects::{Cycle, Surface};
use super::{
edge::{CurveCache, HalfEdgeApprox},
edge::{EdgeCache, HalfEdgeApprox},
Approx, ApproxPoint, Tolerance,
};
impl Approx for (&Cycle, &Surface) {
type Approximation = CycleApprox;
type Cache = CurveCache;
type Cache = EdgeCache;
fn approx_with_cache(
self,

View File

@ -17,7 +17,7 @@ use super::{path::RangeOnPath, Approx, ApproxPoint, Tolerance};
impl Approx for (&Handle<HalfEdge>, &Surface) {
type Approximation = HalfEdgeApprox;
type Cache = CurveCache;
type Cache = EdgeCache;
fn approx_with_cache(
self,
@ -176,11 +176,11 @@ fn approx_edge(
/// A cache for results of an approximation
#[derive(Default)]
pub struct CurveCache {
pub struct EdgeCache {
inner: BTreeMap<(ObjectId, RangeOnPath), GlobalEdgeApprox>,
}
impl CurveCache {
impl EdgeCache {
/// Create an empty cache
pub fn new() -> Self {
Self::default()

View File

@ -12,12 +12,12 @@ use crate::{
};
use super::{
cycle::CycleApprox, edge::CurveCache, Approx, ApproxPoint, Tolerance,
cycle::CycleApprox, edge::EdgeCache, Approx, ApproxPoint, Tolerance,
};
impl Approx for &FaceSet {
type Approximation = BTreeSet<FaceApprox>;
type Cache = CurveCache;
type Cache = EdgeCache;
fn approx_with_cache(
self,
@ -65,7 +65,7 @@ impl Approx for &FaceSet {
impl Approx for &Face {
type Approximation = FaceApprox;
type Cache = CurveCache;
type Cache = EdgeCache;
fn approx_with_cache(
self,

View File

@ -4,11 +4,11 @@ use std::collections::BTreeSet;
use crate::objects::Shell;
use super::{edge::CurveCache, face::FaceApprox, Approx, Tolerance};
use super::{edge::EdgeCache, face::FaceApprox, Approx, Tolerance};
impl Approx for &Shell {
type Approximation = BTreeSet<FaceApprox>;
type Cache = CurveCache;
type Cache = EdgeCache;
fn approx_with_cache(
self,

View File

@ -4,11 +4,11 @@ use std::collections::BTreeSet;
use crate::objects::Sketch;
use super::{edge::CurveCache, face::FaceApprox, Approx, Tolerance};
use super::{edge::EdgeCache, face::FaceApprox, Approx, Tolerance};
impl Approx for &Sketch {
type Approximation = BTreeSet<FaceApprox>;
type Cache = CurveCache;
type Cache = EdgeCache;
fn approx_with_cache(
self,

View File

@ -4,11 +4,11 @@ use std::collections::BTreeSet;
use crate::objects::Solid;
use super::{edge::CurveCache, face::FaceApprox, Approx, Tolerance};
use super::{edge::EdgeCache, face::FaceApprox, Approx, Tolerance};
impl Approx for &Solid {
type Approximation = BTreeSet<FaceApprox>;
type Cache = CurveCache;
type Cache = EdgeCache;
fn approx_with_cache(
self,