Skip to content

Commit

Permalink
Merge pull request #2379 from hannobraun/geometry
Browse files Browse the repository at this point in the history
Set missing curve geometry in through hole operation
  • Loading branch information
hannobraun authored Jun 10, 2024
2 parents f8078a5 + cc8505e commit 23c0dcd
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
4 changes: 2 additions & 2 deletions crates/fj-core/src/geometry/curve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use crate::{storage::Handle, topology::Surface};
use super::SurfacePath;

/// The geometric definition of a curve
#[derive(Clone, Default)]
#[derive(Clone, Debug, Default)]
pub struct CurveGeom {
/// # The redundant local definitions of the curve geometry
///
Expand Down Expand Up @@ -42,7 +42,7 @@ impl CurveGeom {
}

/// The geometric definition of a curve in 2D surface coordinates
#[derive(Clone)]
#[derive(Clone, Debug)]
pub struct LocalCurveGeom {
/// The path that defines the curve on its surface
pub path: SurfacePath,
Expand Down
18 changes: 17 additions & 1 deletion crates/fj-core/src/operations/holes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,23 @@ impl AddHole for Shell {
exit_location.face,
|face, core| {
[face.update_region(
|region, core| region.add_interiors([exit.clone()], core),
|region, core| {
for half_edge in exit.half_edges() {
let geometry = core
.layers
.geometry
.of_curve(half_edge.curve())
.unwrap()
.local_on(swept_region.top_face.surface())
.unwrap();
core.layers.geometry.define_curve(
half_edge.curve().clone(),
exit_location.face.surface().clone(),
geometry.clone(),
);
}
region.add_interiors([exit.clone()], core)
},
core,
)]
},
Expand Down

0 comments on commit 23c0dcd

Please sign in to comment.