Store the original face in FaceApprox

This enables code dealing with `FaceApprox` to load data about the face
from layers, which means `FaceApprox` can now be simplified by removing
the color.
This commit is contained in:
Hanno Braun 2024-03-27 11:33:13 +01:00
parent c6c4a6ce32
commit 5fad335620

View File

@ -104,6 +104,7 @@ impl Approx for Handle<Face> {
let color = self.region().get_color(core);
let coord_handedness = self.coord_handedness(&core.layers.geometry);
FaceApprox {
face: self,
exterior,
interiors,
color,
@ -115,6 +116,9 @@ impl Approx for Handle<Face> {
/// An approximation of a [`Face`]
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd)]
pub struct FaceApprox {
/// The [`Face`], that this approximates
pub face: Handle<Face>,
/// Approximation of the exterior cycle
pub exterior: CycleApprox,