Check precondition in Solid::connect_faces

This commit is contained in:
Hanno Braun 2025-01-31 20:34:52 +01:00
parent 3cacc25120
commit b2c48533b7

View File

@ -35,6 +35,12 @@ impl Solid {
faces: &mut Store<Face>,
surfaces: &mut Store<Plane>,
) -> Self {
assert_eq!(
a.vertices().count(),
b.vertices().count(),
"Can only connect faces that have the same number of vertices.",
);
let side_faces = a
.half_edges()
.zip(b.half_edges())