Skip to content

Commit 2ca54ec

Browse files
committed
Prepare for follow-on change
1 parent 6d1a262 commit 2ca54ec

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

crates/fj-core/src/operations/sweep/sketch.rs

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use fj_math::{Scalar, Vector};
22

33
use crate::{
4-
geometry::GlobalPath,
4+
geometry::{GlobalPath, SurfaceGeom},
55
operations::{derive::DeriveFrom, insert::Insert, reverse::Reverse},
66
storage::Handle,
77
topology::{Face, Sketch, Solid, Surface},
@@ -45,17 +45,19 @@ impl SweepSketch for Sketch {
4545
.winding(&core.layers.geometry, self.surface())
4646
.is_ccw());
4747

48+
let SurfaceGeom { u, v } =
49+
core.layers.geometry.of_surface(&surface);
50+
4851
let is_negative_sweep = {
49-
let u = match core.layers.geometry.of_surface(&surface).u {
52+
let u = match u {
5053
GlobalPath::Circle(_) => todo!(
5154
"Sweeping sketch from a rounded surfaces is not \
5255
supported"
5356
),
5457
GlobalPath::Line(line) => line.direction(),
5558
};
56-
let v = core.layers.geometry.of_surface(&surface).v;
5759

58-
let normal = u.cross(&v);
60+
let normal = u.cross(v);
5961

6062
normal.dot(&path) < Scalar::ZERO
6163
};

0 commit comments

Comments
 (0)