mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-14 06:48:26 +00:00
Prepare to show connect operation in tree
This commit is contained in:
parent
9510d0f72e
commit
4147c3012d
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user