mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-06 02:48:27 +00:00
Remove color
field from FaceApprox
This commit is contained in:
parent
5fad335620
commit
157724d569
@ -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,
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user