Prepare to show connect operation in tree

This commit is contained in:
Hanno Braun 2025-02-06 21:01:58 +01:00
parent 9510d0f72e
commit 4147c3012d

View File

@ -5,7 +5,11 @@ use crate::{
math::Vector, math::Vector,
}; };
use super::{connect::ConnectExt, face::Face, solid::Solid}; use super::{
connect::{Connect, ConnectExt},
face::Face,
solid::Solid,
};
pub trait SweepExt { pub trait SweepExt {
/// # Sweep a face along a path, creating a solid /// # Sweep a face along a path, creating a solid
@ -28,21 +32,19 @@ impl SweepExt for Handle<Face> {
let top = Handle::new(bottom.flip().translate(path)); let top = Handle::new(bottom.flip().translate(path));
let output = top.connect(bottom); let output = top.connect(bottom);
Sweep { Sweep { output }
output: output.output,
}
} }
} }
pub struct Sweep { pub struct Sweep {
output: Solid, output: Connect,
} }
impl Operation for Sweep { impl Operation for Sweep {
type Output = Solid; type Output = Solid;
fn output(&self) -> &Self::Output { fn output(&self) -> &Self::Output {
&self.output self.output.output()
} }
fn display(&self, f: &mut fmt::Formatter) -> fmt::Result { fn display(&self, f: &mut fmt::Formatter) -> fmt::Result {