mirror of
https://github.com/hannobraun/Fornjot
synced 2025-07-04 09:06:09 +00:00
Simplify
This commit is contained in:
parent
654d837c24
commit
5fa10def8b
@ -2,10 +2,7 @@ use crate::{
|
||||
handle::Handle,
|
||||
math::Plane,
|
||||
topology::{
|
||||
curve::Curve,
|
||||
face::{Face, HalfEdgeWithEndVertex},
|
||||
half_edge::HalfEdge,
|
||||
solid::Solid,
|
||||
curve::Curve, face::Face, half_edge::HalfEdge, solid::Solid,
|
||||
surface::Surface,
|
||||
},
|
||||
};
|
||||
@ -57,18 +54,10 @@ fn build_connecting_faces(bottom: &Face, top: &Face) -> Vec<Handle<Face>> {
|
||||
bottom
|
||||
.half_edges_with_end_vertex()
|
||||
.zip(top.half_edges_with_end_vertex())
|
||||
.map(
|
||||
|(
|
||||
bottom,
|
||||
HalfEdgeWithEndVertex {
|
||||
half_edge: top_half_edge,
|
||||
end_vertex: top_half_edge_end,
|
||||
},
|
||||
)| {
|
||||
let is_internal = match [
|
||||
bottom.half_edge.is_internal,
|
||||
top_half_edge.is_internal,
|
||||
] {
|
||||
.map(|(bottom, top)| {
|
||||
let is_internal =
|
||||
match [bottom.half_edge.is_internal, top.half_edge.is_internal]
|
||||
{
|
||||
[true, true] => true,
|
||||
[false, false] => false,
|
||||
_ => {
|
||||
@ -81,8 +70,8 @@ fn build_connecting_faces(bottom: &Face, top: &Face) -> Vec<Handle<Face>> {
|
||||
|
||||
let a = &bottom.half_edge.start;
|
||||
let b = bottom.end_vertex;
|
||||
let c = top_half_edge_end;
|
||||
let d = &top_half_edge.start;
|
||||
let c = top.end_vertex;
|
||||
let d = &top.half_edge.start;
|
||||
|
||||
let surface = Handle::new(Surface {
|
||||
geometry: Box::new(Plane::from_points(
|
||||
@ -101,7 +90,6 @@ fn build_connecting_faces(bottom: &Face, top: &Face) -> Vec<Handle<Face>> {
|
||||
is_internal,
|
||||
);
|
||||
Handle::new(face)
|
||||
},
|
||||
)
|
||||
})
|
||||
.collect::<Vec<_>>()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user