Provide Handle<Surface> to SweepCycle

This commit is contained in:
Hanno Braun 2024-03-26 11:54:18 +01:00
parent f95dc9cc0e
commit 956c11322c
2 changed files with 6 additions and 6 deletions

View File

@ -2,11 +2,11 @@ use fj_interop::Color;
use fj_math::Vector;
use crate::{
geometry::SurfaceGeometry,
operations::{
build::BuildCycle, join::JoinCycle, sweep::half_edge::SweepHalfEdge,
},
topology::{Cycle, Face},
storage::Handle,
topology::{Cycle, Face, Surface},
Core,
};
@ -38,7 +38,7 @@ pub trait SweepCycle {
/// operation is called in, and therefore falls outside of its scope.
fn sweep_cycle(
&self,
surface: &SurfaceGeometry,
surface: Handle<Surface>,
color: Option<Color>,
path: impl Into<Vector<3>>,
cache: &mut SweepCache,
@ -49,7 +49,7 @@ pub trait SweepCycle {
impl SweepCycle for Cycle {
fn sweep_cycle(
&self,
surface: &SurfaceGeometry,
surface: Handle<Surface>,
color: Option<Color>,
path: impl Into<Vector<3>>,
cache: &mut SweepCache,
@ -66,7 +66,7 @@ impl SweepCycle for Cycle {
let (side_face, top_edge) = bottom_half_edge.sweep_half_edge(
bottom_half_edge_next.start_vertex().clone(),
surface,
&core.layers.geometry.of_surface(&surface),
color,
path,
cache,

View File

@ -103,7 +103,7 @@ fn sweep_cycle(
core: &mut Core,
) -> Handle<Cycle> {
let swept_cycle = bottom_cycle.reverse(core).sweep_cycle(
&core.layers.geometry.of_surface(&bottom_surface),
bottom_surface,
color,
path,
cache,