mirror of
https://github.com/hannobraun/Fornjot
synced 2025-07-20 08:56:22 +00:00
Implement Operation
for Connect
This commit is contained in:
parent
1c7a6e1c16
commit
9510d0f72e
@ -1,4 +1,9 @@
|
||||
use crate::{geometry::Handle, math::Plane};
|
||||
use std::fmt;
|
||||
|
||||
use crate::{
|
||||
geometry::{AnyOp, Handle, Operation, TriMesh},
|
||||
math::Plane,
|
||||
};
|
||||
|
||||
use super::{face::Face, solid::Solid};
|
||||
|
||||
@ -53,3 +58,23 @@ impl ConnectExt for Handle<Face> {
|
||||
pub struct Connect {
|
||||
pub output: Solid,
|
||||
}
|
||||
|
||||
impl Operation for Connect {
|
||||
type Output = Solid;
|
||||
|
||||
fn output(&self) -> &Self::Output {
|
||||
&self.output
|
||||
}
|
||||
|
||||
fn display(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "Connect")
|
||||
}
|
||||
|
||||
fn tri_mesh(&self) -> TriMesh {
|
||||
self.output.tri_mesh()
|
||||
}
|
||||
|
||||
fn children(&self) -> Vec<AnyOp> {
|
||||
self.output.children()
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user