mirror of
https://github.com/hannobraun/Fornjot
synced 2025-07-29 13:26:11 +00:00
Merge pull request #2355 from hannobraun/geometry
Define curve geometry for new face when sweeping sketch
This commit is contained in:
commit
8df4a27a53
@ -38,7 +38,7 @@ impl SweepSketch for Sketch {
|
||||
let mut shells = Vec::new();
|
||||
for region in self.regions() {
|
||||
let region = {
|
||||
// The following code assumes that the sketch is winded counter-
|
||||
// The following code assumes that the sketch is wound counter-
|
||||
// clockwise. Let's check that real quick.
|
||||
assert!(region
|
||||
.exterior()
|
||||
@ -67,6 +67,24 @@ impl SweepSketch for Sketch {
|
||||
}
|
||||
};
|
||||
|
||||
for cycle in region.all_cycles() {
|
||||
for half_edge in cycle.half_edges() {
|
||||
let curve_geom = core
|
||||
.layers
|
||||
.geometry
|
||||
.of_curve(half_edge.curve())
|
||||
.unwrap()
|
||||
.local_on(self.surface())
|
||||
.unwrap();
|
||||
|
||||
core.layers.geometry.define_curve(
|
||||
half_edge.curve().clone(),
|
||||
surface.clone(),
|
||||
curve_geom.clone(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
let face = Face::new(surface.clone(), region.clone()).insert(core);
|
||||
let shell = face.sweep_face(path, &mut cache, core).insert(core);
|
||||
shells.push(shell);
|
||||
|
Loading…
x
Reference in New Issue
Block a user