Skip to content

Commit

Permalink
Sort code by order of relevance
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Feb 5, 2025
1 parent 03cc2e8 commit ce25482
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions experiments/2024-12-09/src/topology/sweep.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,6 @@ use crate::{

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 {
/// Sweep a face along a path, creating a solid
///
Expand Down Expand Up @@ -70,3 +46,27 @@ impl SweepExt for Handle<Face> {
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()
}
}

0 comments on commit ce25482

Please sign in to comment.