Remove color field from FaceApprox

This commit is contained in:
Hanno Braun 2024-03-27 11:37:46 +01:00
parent 5fad335620
commit 157724d569
2 changed files with 2 additions and 10 deletions

View File

@ -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<Face> {
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<CycleApprox>,
/// The color of the approximated face
pub color: Option<Color>,
/// The handedness of the approximated face's front-side coordinate system
pub coord_handedness: Handedness,
}

View File

@ -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);