mirror of
https://github.com/hannobraun/Fornjot
synced 2025-02-11 17:56:00 +00:00
Update name of EdgeCache
This commit is contained in:
parent
073531e5f3
commit
5f2156cfa7
@ -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,
|
||||
|
@ -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()
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user