This commit is contained in:
Quaternions 2025-02-25 12:01:54 -08:00
parent 4b22fed3b3
commit 1de624e284

@ -118,12 +118,10 @@ fn planes_to_faces(face_list:std::collections::HashSet<Face>)->Result<Faces,Plan
if core::ptr::eq(face2,new_face){
continue;
}
if let Some(new_intersection)=solve3(new_face,face1,face2){
// face0 does not occlude (or intersect) the new intersection
if (face0.dot.fix_2()/Planar64::ONE).lt_ratio(face0.normal.dot(new_intersection.num)/new_intersection.den){
// abort! reject face0 entirely
continue 'face;
}
// new_face occludes intersection meaning intersection is not on convex solid and face0 is degenrate
if (new_face.dot.fix_2()/Planar64::ONE).lt_ratio(new_face.normal.dot(intersection.num)/intersection.den){
// abort! reject face0 entirely
continue 'face;
}
}