mirror of
https://github.com/hannobraun/Fornjot
synced 2025-07-26 20:06:06 +00:00
Avoid use of BuildHalfEdge::circle
This commit is contained in:
parent
a88b054754
commit
02c96f76c6
@ -4,15 +4,15 @@ use fj_math::{Point, Scalar, Vector};
|
|||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
storage::Handle,
|
storage::Handle,
|
||||||
topology::{Cycle, Face, HalfEdge, Region, Shell},
|
topology::{Cycle, Face, Region, Shell},
|
||||||
Core,
|
Core,
|
||||||
};
|
};
|
||||||
|
|
||||||
use super::{
|
use super::{
|
||||||
build::{BuildCycle, BuildHalfEdge, BuildRegion},
|
build::{BuildCycle, BuildRegion},
|
||||||
join::JoinCycle,
|
join::JoinCycle,
|
||||||
sweep::{SweepCache, SweepRegion},
|
sweep::{SweepCache, SweepRegion},
|
||||||
update::{UpdateCycle, UpdateFace, UpdateRegion, UpdateShell},
|
update::{UpdateFace, UpdateRegion, UpdateShell},
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Add a hole to a [`Shell`]
|
/// Add a hole to a [`Shell`]
|
||||||
@ -82,7 +82,7 @@ impl AddHole for Shell {
|
|||||||
) -> Self {
|
) -> Self {
|
||||||
let radius = radius.into();
|
let radius = radius.into();
|
||||||
|
|
||||||
let entry = HalfEdge::circle(
|
let entry = Cycle::circle(
|
||||||
entry_location.position,
|
entry_location.position,
|
||||||
radius,
|
radius,
|
||||||
entry_location.face.surface().clone(),
|
entry_location.face.surface().clone(),
|
||||||
@ -104,10 +104,7 @@ impl AddHole for Shell {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let swept_region = Region::empty(core)
|
let swept_region = Region::empty(core)
|
||||||
.update_exterior(
|
.update_exterior(|_, _| entry.clone(), core)
|
||||||
|_, core| Cycle::empty().add_half_edges([entry.clone()], core),
|
|
||||||
core,
|
|
||||||
)
|
|
||||||
.sweep_region(
|
.sweep_region(
|
||||||
entry_location.face.surface().clone(),
|
entry_location.face.surface().clone(),
|
||||||
None,
|
None,
|
||||||
@ -129,19 +126,7 @@ impl AddHole for Shell {
|
|||||||
entry_location.face,
|
entry_location.face,
|
||||||
|face, core| {
|
|face, core| {
|
||||||
[face.update_region(
|
[face.update_region(
|
||||||
|region, core| {
|
|region, core| region.add_interiors([entry], core),
|
||||||
region.add_interiors(
|
|
||||||
[Cycle::empty().add_joined_edges(
|
|
||||||
[(
|
|
||||||
entry.clone(),
|
|
||||||
*core.layers.geometry.of_half_edge(&entry),
|
|
||||||
)],
|
|
||||||
entry_location.face.surface().clone(),
|
|
||||||
core,
|
|
||||||
)],
|
|
||||||
core,
|
|
||||||
)
|
|
||||||
},
|
|
||||||
core,
|
core,
|
||||||
)]
|
)]
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user