mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-05 10:28:27 +00:00
Simplify through hole operation
This commit is contained in:
parent
02c96f76c6
commit
8ba0f875c8
@ -10,7 +10,6 @@ use crate::{
|
|||||||
|
|
||||||
use super::{
|
use super::{
|
||||||
build::{BuildCycle, BuildRegion},
|
build::{BuildCycle, BuildRegion},
|
||||||
join::JoinCycle,
|
|
||||||
sweep::{SweepCache, SweepRegion},
|
sweep::{SweepCache, SweepRegion},
|
||||||
update::{UpdateFace, UpdateRegion, UpdateShell},
|
update::{UpdateFace, UpdateRegion, UpdateShell},
|
||||||
};
|
};
|
||||||
@ -115,12 +114,7 @@ impl AddHole for Shell {
|
|||||||
|
|
||||||
let hole = swept_region.side_faces.into_iter().collect::<Vec<_>>();
|
let hole = swept_region.side_faces.into_iter().collect::<Vec<_>>();
|
||||||
|
|
||||||
let exit = swept_region
|
let exit = swept_region.top_face.region().exterior();
|
||||||
.top_face
|
|
||||||
.region()
|
|
||||||
.exterior()
|
|
||||||
.half_edges()
|
|
||||||
.only();
|
|
||||||
|
|
||||||
self.update_face(
|
self.update_face(
|
||||||
entry_location.face,
|
entry_location.face,
|
||||||
@ -136,19 +130,7 @@ impl AddHole for Shell {
|
|||||||
exit_location.face,
|
exit_location.face,
|
||||||
|face, core| {
|
|face, core| {
|
||||||
[face.update_region(
|
[face.update_region(
|
||||||
|region, core| {
|
|region, core| region.add_interiors([exit.clone()], core),
|
||||||
region.add_interiors(
|
|
||||||
[Cycle::empty().add_joined_edges(
|
|
||||||
[(
|
|
||||||
exit.clone(),
|
|
||||||
*core.layers.geometry.of_half_edge(exit),
|
|
||||||
)],
|
|
||||||
exit_location.face.surface().clone(),
|
|
||||||
core,
|
|
||||||
)],
|
|
||||||
core,
|
|
||||||
)
|
|
||||||
},
|
|
||||||
core,
|
core,
|
||||||
)]
|
)]
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user