Refactor to prepare for follow-on change

This commit is contained in:
Hanno Braun 2024-03-26 11:53:45 +01:00
parent c3cf4a8901
commit f95dc9cc0e

View File

@ -2,7 +2,6 @@ use fj_interop::Color;
use fj_math::Vector; use fj_math::Vector;
use crate::{ use crate::{
geometry::SurfaceGeometry,
operations::{ operations::{
insert::Insert, reverse::Reverse, transform::TransformObject, insert::Insert, reverse::Reverse, transform::TransformObject,
}, },
@ -55,7 +54,7 @@ impl SweepRegion for Region {
let top_exterior = sweep_cycle( let top_exterior = sweep_cycle(
self.exterior(), self.exterior(),
&core.layers.geometry.of_surface(&surface), surface.clone(),
color, color,
&mut faces, &mut faces,
path, path,
@ -69,7 +68,7 @@ impl SweepRegion for Region {
.map(|bottom_cycle| { .map(|bottom_cycle| {
sweep_cycle( sweep_cycle(
bottom_cycle, bottom_cycle,
&core.layers.geometry.of_surface(&surface), surface.clone(),
color, color,
&mut faces, &mut faces,
path, path,
@ -96,7 +95,7 @@ impl SweepRegion for Region {
fn sweep_cycle( fn sweep_cycle(
bottom_cycle: &Cycle, bottom_cycle: &Cycle,
bottom_surface: &SurfaceGeometry, bottom_surface: Handle<Surface>,
color: Option<Color>, color: Option<Color>,
faces: &mut Vec<Face>, faces: &mut Vec<Face>,
path: Vector<3>, path: Vector<3>,
@ -104,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(
bottom_surface, &core.layers.geometry.of_surface(&bottom_surface),
color, color,
path, path,
cache, cache,