Skip to content

Commit

Permalink
Prepare for follow-on change
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Jul 26, 2024
1 parent 6d1a262 commit 2ca54ec
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions crates/fj-core/src/operations/sweep/sketch.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use fj_math::{Scalar, Vector};

use crate::{
geometry::GlobalPath,
geometry::{GlobalPath, SurfaceGeom},
operations::{derive::DeriveFrom, insert::Insert, reverse::Reverse},
storage::Handle,
topology::{Face, Sketch, Solid, Surface},
Expand Down Expand Up @@ -45,17 +45,19 @@ impl SweepSketch for Sketch {
.winding(&core.layers.geometry, self.surface())
.is_ccw());

let SurfaceGeom { u, v } =
core.layers.geometry.of_surface(&surface);

let is_negative_sweep = {
let u = match core.layers.geometry.of_surface(&surface).u {
let u = match u {
GlobalPath::Circle(_) => todo!(
"Sweeping sketch from a rounded surfaces is not \
supported"
),
GlobalPath::Line(line) => line.direction(),
};
let v = core.layers.geometry.of_surface(&surface).v;

let normal = u.cross(&v);
let normal = u.cross(v);

normal.dot(&path) < Scalar::ZERO
};
Expand Down

0 comments on commit 2ca54ec

Please sign in to comment.