mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-08 20:08:30 +00:00
Sort code by order of relevance
This commit is contained in:
parent
03cc2e818b
commit
ce25482653
@ -8,30 +8,6 @@ use crate::{
|
|||||||
|
|
||||||
use super::{face::Face, solid::Solid, vertex::Vertex};
|
use super::{face::Face, solid::Solid, vertex::Vertex};
|
||||||
|
|
||||||
pub struct Sweep {
|
|
||||||
output: Solid,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Operation for Sweep {
|
|
||||||
type Output = Solid;
|
|
||||||
|
|
||||||
fn output(&self) -> &Self::Output {
|
|
||||||
&self.output
|
|
||||||
}
|
|
||||||
|
|
||||||
fn display(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
||||||
write!(f, "Sweep")
|
|
||||||
}
|
|
||||||
|
|
||||||
fn tri_mesh(&self) -> TriMesh {
|
|
||||||
self.output.tri_mesh()
|
|
||||||
}
|
|
||||||
|
|
||||||
fn children(&self) -> Vec<AnyOp> {
|
|
||||||
self.output.children()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub trait SweepExt {
|
pub trait SweepExt {
|
||||||
/// Sweep a face along a path, creating a solid
|
/// Sweep a face along a path, creating a solid
|
||||||
///
|
///
|
||||||
@ -70,3 +46,27 @@ impl SweepExt for Handle<Face> {
|
|||||||
Sweep { output: solid }
|
Sweep { output: solid }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub struct Sweep {
|
||||||
|
output: Solid,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Operation for Sweep {
|
||||||
|
type Output = Solid;
|
||||||
|
|
||||||
|
fn output(&self) -> &Self::Output {
|
||||||
|
&self.output
|
||||||
|
}
|
||||||
|
|
||||||
|
fn display(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
|
write!(f, "Sweep")
|
||||||
|
}
|
||||||
|
|
||||||
|
fn tri_mesh(&self) -> TriMesh {
|
||||||
|
self.output.tri_mesh()
|
||||||
|
}
|
||||||
|
|
||||||
|
fn children(&self) -> Vec<AnyOp> {
|
||||||
|
self.output.children()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user