diff --git a/crates/fj-core/src/algorithms/approx/face.rs b/crates/fj-core/src/algorithms/approx/face.rs index 534cca3a8..149800bc9 100644 --- a/crates/fj-core/src/algorithms/approx/face.rs +++ b/crates/fj-core/src/algorithms/approx/face.rs @@ -4,10 +4,7 @@ use std::{collections::BTreeSet, ops::Deref}; -use fj_interop::Color; - use crate::{ - operations::presentation::GetColor, storage::Handle, topology::{Face, Handedness, ObjectSet}, validation::ValidationConfig, @@ -101,13 +98,11 @@ impl Approx for Handle { interiors.insert(cycle); } - let color = self.region().get_color(core); let coord_handedness = self.coord_handedness(&core.layers.geometry); FaceApprox { face: self, exterior, interiors, - color, coord_handedness, } } @@ -125,9 +120,6 @@ pub struct FaceApprox { /// Approximations of the interior cycles pub interiors: BTreeSet, - /// The color of the approximated face - pub color: Option, - /// The handedness of the approximated face's front-side coordinate system pub coord_handedness: Handedness, } diff --git a/crates/fj-core/src/algorithms/triangulate/mod.rs b/crates/fj-core/src/algorithms/triangulate/mod.rs index 1f12e04d2..fbd3c9147 100644 --- a/crates/fj-core/src/algorithms/triangulate/mod.rs +++ b/crates/fj-core/src/algorithms/triangulate/mod.rs @@ -6,7 +6,7 @@ mod polygon; use fj_interop::Mesh; use fj_math::Point; -use crate::Core; +use crate::{operations::presentation::GetColor, Core}; use self::polygon::Polygon; @@ -69,7 +69,7 @@ impl Triangulate for FaceApprox { .contains_triangle(triangle.map(|point| point.point_surface)) }); - let color = self.color.unwrap_or_default(); + let color = self.face.region().get_color(_core).unwrap_or_default(); for triangle in triangles { let points = triangle.map(|point| point.point_global);