mirror of
https://github.com/hannobraun/Fornjot
synced 2025-08-25 19:46:41 +00:00
Prepare for follow-on change
This commit is contained in:
parent
30917b6636
commit
e9f4b1f67c
@ -28,6 +28,8 @@ pub fn model() -> AnyOp {
|
|||||||
&mut stores.vertices,
|
&mut stores.vertices,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
let [bottom, top] = [bottom, top].map(|face| stores.faces.insert(face));
|
||||||
|
|
||||||
let side_faces = bottom
|
let side_faces = bottom
|
||||||
.half_edges()
|
.half_edges()
|
||||||
.zip(top.half_edges())
|
.zip(top.half_edges())
|
||||||
@ -35,16 +37,13 @@ pub fn model() -> AnyOp {
|
|||||||
let surface = stores.surfaces.insert(Plane::from_points(
|
let surface = stores.surfaces.insert(Plane::from_points(
|
||||||
[q, r, s].map(|vertex| vertex.point),
|
[q, r, s].map(|vertex| vertex.point),
|
||||||
));
|
));
|
||||||
Face::new(surface, [q, r, s, t].map(|vertex| vertex.clone()))
|
let face =
|
||||||
|
Face::new(surface, [q, r, s, t].map(|vertex| vertex.clone()));
|
||||||
|
stores.faces.insert(face)
|
||||||
})
|
})
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
|
|
||||||
let solid = Solid::new(
|
let solid = Solid::new([bottom, top].into_iter().chain(side_faces));
|
||||||
[bottom, top]
|
|
||||||
.into_iter()
|
|
||||||
.chain(side_faces)
|
|
||||||
.map(|face| stores.faces.insert(face)),
|
|
||||||
);
|
|
||||||
|
|
||||||
AnyOp::new(solid)
|
AnyOp::new(solid)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user