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

View File

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