mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-10 21:08:27 +00:00
Track internal faces
This commit is contained in:
parent
a0d5716687
commit
fdd0338da5
@ -47,7 +47,7 @@ impl Sketch {
|
||||
},
|
||||
);
|
||||
|
||||
Face::new(surface, half_edges)
|
||||
Face::new(surface, half_edges, false)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -57,6 +57,7 @@ impl ConnectExt for Handle<Face> {
|
||||
is_internal: false,
|
||||
})
|
||||
}),
|
||||
q.is_internal,
|
||||
);
|
||||
Handle::new(face)
|
||||
})
|
||||
|
@ -6,6 +6,10 @@ pub trait FlipExt {
|
||||
|
||||
impl FlipExt for &Face {
|
||||
fn flip(self) -> Face {
|
||||
Face::new(self.surface.flip(), self.half_edges.clone())
|
||||
Face::new(
|
||||
self.surface.flip(),
|
||||
self.half_edges.clone(),
|
||||
self.is_internal,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -17,6 +17,7 @@ impl TranslateExt for Face {
|
||||
self.half_edges
|
||||
.iter()
|
||||
.map(|half_edge| Handle::new(half_edge.translate(offset))),
|
||||
self.is_internal,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -15,16 +15,19 @@ use super::{half_edge::HalfEdge, vertex::Vertex};
|
||||
pub struct Face {
|
||||
pub surface: Plane,
|
||||
pub half_edges: Vec<Handle<HalfEdge>>,
|
||||
pub is_internal: bool,
|
||||
}
|
||||
|
||||
impl Face {
|
||||
pub fn new(
|
||||
surface: Plane,
|
||||
half_edges: impl IntoIterator<Item = Handle<HalfEdge>>,
|
||||
is_internal: bool,
|
||||
) -> Self {
|
||||
Self {
|
||||
surface,
|
||||
half_edges: half_edges.into_iter().collect(),
|
||||
is_internal,
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user