mirror of
https://github.com/hannobraun/Fornjot
synced 2025-02-12 02:05:53 +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 crate::objects::{Cycle, Surface};
|
||||||
|
|
||||||
use super::{
|
use super::{
|
||||||
edge::{CurveCache, HalfEdgeApprox},
|
edge::{EdgeCache, HalfEdgeApprox},
|
||||||
Approx, ApproxPoint, Tolerance,
|
Approx, ApproxPoint, Tolerance,
|
||||||
};
|
};
|
||||||
|
|
||||||
impl Approx for (&Cycle, &Surface) {
|
impl Approx for (&Cycle, &Surface) {
|
||||||
type Approximation = CycleApprox;
|
type Approximation = CycleApprox;
|
||||||
type Cache = CurveCache;
|
type Cache = EdgeCache;
|
||||||
|
|
||||||
fn approx_with_cache(
|
fn approx_with_cache(
|
||||||
self,
|
self,
|
||||||
|
@ -17,7 +17,7 @@ use super::{path::RangeOnPath, Approx, ApproxPoint, Tolerance};
|
|||||||
|
|
||||||
impl Approx for (&Handle<HalfEdge>, &Surface) {
|
impl Approx for (&Handle<HalfEdge>, &Surface) {
|
||||||
type Approximation = HalfEdgeApprox;
|
type Approximation = HalfEdgeApprox;
|
||||||
type Cache = CurveCache;
|
type Cache = EdgeCache;
|
||||||
|
|
||||||
fn approx_with_cache(
|
fn approx_with_cache(
|
||||||
self,
|
self,
|
||||||
@ -176,11 +176,11 @@ fn approx_edge(
|
|||||||
|
|
||||||
/// A cache for results of an approximation
|
/// A cache for results of an approximation
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct CurveCache {
|
pub struct EdgeCache {
|
||||||
inner: BTreeMap<(ObjectId, RangeOnPath), GlobalEdgeApprox>,
|
inner: BTreeMap<(ObjectId, RangeOnPath), GlobalEdgeApprox>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl CurveCache {
|
impl EdgeCache {
|
||||||
/// Create an empty cache
|
/// Create an empty cache
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
Self::default()
|
Self::default()
|
||||||
|
@ -12,12 +12,12 @@ use crate::{
|
|||||||
};
|
};
|
||||||
|
|
||||||
use super::{
|
use super::{
|
||||||
cycle::CycleApprox, edge::CurveCache, Approx, ApproxPoint, Tolerance,
|
cycle::CycleApprox, edge::EdgeCache, Approx, ApproxPoint, Tolerance,
|
||||||
};
|
};
|
||||||
|
|
||||||
impl Approx for &FaceSet {
|
impl Approx for &FaceSet {
|
||||||
type Approximation = BTreeSet<FaceApprox>;
|
type Approximation = BTreeSet<FaceApprox>;
|
||||||
type Cache = CurveCache;
|
type Cache = EdgeCache;
|
||||||
|
|
||||||
fn approx_with_cache(
|
fn approx_with_cache(
|
||||||
self,
|
self,
|
||||||
@ -65,7 +65,7 @@ impl Approx for &FaceSet {
|
|||||||
|
|
||||||
impl Approx for &Face {
|
impl Approx for &Face {
|
||||||
type Approximation = FaceApprox;
|
type Approximation = FaceApprox;
|
||||||
type Cache = CurveCache;
|
type Cache = EdgeCache;
|
||||||
|
|
||||||
fn approx_with_cache(
|
fn approx_with_cache(
|
||||||
self,
|
self,
|
||||||
|
@ -4,11 +4,11 @@ use std::collections::BTreeSet;
|
|||||||
|
|
||||||
use crate::objects::Shell;
|
use crate::objects::Shell;
|
||||||
|
|
||||||
use super::{edge::CurveCache, face::FaceApprox, Approx, Tolerance};
|
use super::{edge::EdgeCache, face::FaceApprox, Approx, Tolerance};
|
||||||
|
|
||||||
impl Approx for &Shell {
|
impl Approx for &Shell {
|
||||||
type Approximation = BTreeSet<FaceApprox>;
|
type Approximation = BTreeSet<FaceApprox>;
|
||||||
type Cache = CurveCache;
|
type Cache = EdgeCache;
|
||||||
|
|
||||||
fn approx_with_cache(
|
fn approx_with_cache(
|
||||||
self,
|
self,
|
||||||
|
@ -4,11 +4,11 @@ use std::collections::BTreeSet;
|
|||||||
|
|
||||||
use crate::objects::Sketch;
|
use crate::objects::Sketch;
|
||||||
|
|
||||||
use super::{edge::CurveCache, face::FaceApprox, Approx, Tolerance};
|
use super::{edge::EdgeCache, face::FaceApprox, Approx, Tolerance};
|
||||||
|
|
||||||
impl Approx for &Sketch {
|
impl Approx for &Sketch {
|
||||||
type Approximation = BTreeSet<FaceApprox>;
|
type Approximation = BTreeSet<FaceApprox>;
|
||||||
type Cache = CurveCache;
|
type Cache = EdgeCache;
|
||||||
|
|
||||||
fn approx_with_cache(
|
fn approx_with_cache(
|
||||||
self,
|
self,
|
||||||
|
@ -4,11 +4,11 @@ use std::collections::BTreeSet;
|
|||||||
|
|
||||||
use crate::objects::Solid;
|
use crate::objects::Solid;
|
||||||
|
|
||||||
use super::{edge::CurveCache, face::FaceApprox, Approx, Tolerance};
|
use super::{edge::EdgeCache, face::FaceApprox, Approx, Tolerance};
|
||||||
|
|
||||||
impl Approx for &Solid {
|
impl Approx for &Solid {
|
||||||
type Approximation = BTreeSet<FaceApprox>;
|
type Approximation = BTreeSet<FaceApprox>;
|
||||||
type Cache = CurveCache;
|
type Cache = EdgeCache;
|
||||||
|
|
||||||
fn approx_with_cache(
|
fn approx_with_cache(
|
||||||
self,
|
self,
|
||||||
|
Loading…
Reference in New Issue
Block a user