mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-07 03:18:30 +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 std::{collections::BTreeSet, ops::Deref};
|
||||||
|
|
||||||
use fj_interop::Color;
|
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
operations::presentation::GetColor,
|
|
||||||
storage::Handle,
|
storage::Handle,
|
||||||
topology::{Face, Handedness, ObjectSet},
|
topology::{Face, Handedness, ObjectSet},
|
||||||
validation::ValidationConfig,
|
validation::ValidationConfig,
|
||||||
@ -101,13 +98,11 @@ impl Approx for Handle<Face> {
|
|||||||
interiors.insert(cycle);
|
interiors.insert(cycle);
|
||||||
}
|
}
|
||||||
|
|
||||||
let color = self.region().get_color(core);
|
|
||||||
let coord_handedness = self.coord_handedness(&core.layers.geometry);
|
let coord_handedness = self.coord_handedness(&core.layers.geometry);
|
||||||
FaceApprox {
|
FaceApprox {
|
||||||
face: self,
|
face: self,
|
||||||
exterior,
|
exterior,
|
||||||
interiors,
|
interiors,
|
||||||
color,
|
|
||||||
coord_handedness,
|
coord_handedness,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -125,9 +120,6 @@ pub struct FaceApprox {
|
|||||||
/// Approximations of the interior cycles
|
/// Approximations of the interior cycles
|
||||||
pub interiors: BTreeSet<CycleApprox>,
|
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
|
/// The handedness of the approximated face's front-side coordinate system
|
||||||
pub coord_handedness: Handedness,
|
pub coord_handedness: Handedness,
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ mod polygon;
|
|||||||
use fj_interop::Mesh;
|
use fj_interop::Mesh;
|
||||||
use fj_math::Point;
|
use fj_math::Point;
|
||||||
|
|
||||||
use crate::Core;
|
use crate::{operations::presentation::GetColor, Core};
|
||||||
|
|
||||||
use self::polygon::Polygon;
|
use self::polygon::Polygon;
|
||||||
|
|
||||||
@ -69,7 +69,7 @@ impl Triangulate for FaceApprox {
|
|||||||
.contains_triangle(triangle.map(|point| point.point_surface))
|
.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 {
|
for triangle in triangles {
|
||||||
let points = triangle.map(|point| point.point_global);
|
let points = triangle.map(|point| point.point_global);
|
||||||
|
Loading…
Reference in New Issue
Block a user