From e4eaecee2c219701783d05d70fb7ffa3607bc6a3 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Tue, 21 Nov 2023 18:37:13 -0800 Subject: [PATCH] parity depends on face only --- src/model_physics.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/model_physics.rs b/src/model_physics.rs index 8c57f5c..8a30951 100644 --- a/src/model_physics.rs +++ b/src/model_physics.rs @@ -560,7 +560,7 @@ impl MeshQuery for MinkowskiM } best_edge.map_or( MinkowskiFace::VertFace(v0,edge_face_id1), - |directed_edge_id0|MinkowskiFace::EdgeEdge(directed_edge_id0.as_undirected(),e1,directed_edge_id0.parity()^face_parity) + |directed_edge_id0|MinkowskiFace::EdgeEdge(directed_edge_id0.as_undirected(),e1,face_parity) ) })) }, @@ -569,7 +569,7 @@ impl MeshQuery for MinkowskiM let mut i=0; let v1e=self.mesh1.vert_edges(v1); Cow::Owned(self.mesh0.edge_faces(e0).map(|edge_face_id0|{ - let face_parity=i==0; + let face_parity=i==0;//always two edge faces i+=1; let mut best_edge=None; let mut best_d=Planar64::ZERO; @@ -584,7 +584,7 @@ impl MeshQuery for MinkowskiM } best_edge.map_or( MinkowskiFace::FaceVert(edge_face_id0,v1), - |directed_edge_id1|MinkowskiFace::EdgeEdge(e0,directed_edge_id1.as_undirected(),directed_edge_id1.parity()^face_parity) + |directed_edge_id1|MinkowskiFace::EdgeEdge(e0,directed_edge_id1.as_undirected(),face_parity) ) })) },