mirror of
https://github.com/hannobraun/Fornjot
synced 2025-07-25 11:26:07 +00:00
Simplify return value of ConnectExt::connect
This commit is contained in:
parent
fe597c4fd4
commit
460084d11c
@ -22,11 +22,11 @@ pub trait ConnectExt {
|
|||||||
///
|
///
|
||||||
/// It should be seen as more of a placeholder for a real implementation of
|
/// It should be seen as more of a placeholder for a real implementation of
|
||||||
/// this operation.
|
/// this operation.
|
||||||
fn connect(self, other: Self) -> Handle<Solid>;
|
fn connect(self, other: Self) -> Solid;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ConnectExt for Handle<Face> {
|
impl ConnectExt for Handle<Face> {
|
||||||
fn connect(self, other: Self) -> Handle<Solid> {
|
fn connect(self, other: Self) -> Solid {
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
self.output().vertices().count(),
|
self.output().vertices().count(),
|
||||||
other.output().vertices().count(),
|
other.output().vertices().count(),
|
||||||
@ -49,7 +49,6 @@ impl ConnectExt for Handle<Face> {
|
|||||||
})
|
})
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
|
|
||||||
let output = Solid::new([self, other].into_iter().chain(side_faces));
|
Solid::new([self, other].into_iter().chain(side_faces))
|
||||||
Handle::new(output)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ impl SweepExt for Handle<Face> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub struct Sweep {
|
pub struct Sweep {
|
||||||
pub output: Handle<Solid>,
|
pub output: Solid,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Operation for Sweep {
|
impl Operation for Sweep {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user