swap edge faces in VertEdge case
This commit is contained in:
parent
72d8186ba4
commit
f4db20c206
@ -472,11 +472,9 @@ impl MeshQuery<MinkowskiFace,MinkowskiDirectedEdge,MinkowskiVert> for MinkowskiM
|
|||||||
fn edge_faces(&self,edge_id:MinkowskiEdge)->Cow<[MinkowskiFace;2]>{
|
fn edge_faces(&self,edge_id:MinkowskiEdge)->Cow<[MinkowskiFace;2]>{
|
||||||
match edge_id{
|
match edge_id{
|
||||||
MinkowskiEdge::VertEdge(v0,e1)=>{
|
MinkowskiEdge::VertEdge(v0,e1)=>{
|
||||||
//tracking index with an external variable because .enumerate() is not available
|
//faces are listed backwards from the minkowski mesh
|
||||||
let mut i=0;
|
let e1f=self.mesh1.edge_faces(e1);
|
||||||
Cow::Owned(self.mesh1.edge_faces(e1).map(|edge_face_id1|{
|
Cow::Owned([(e1f[1],true),(e1f[0],false)].map(|(edge_face_id1,face_parity)|{
|
||||||
let face_parity=i==0;
|
|
||||||
i+=1;
|
|
||||||
let mut best_edge=None;
|
let mut best_edge=None;
|
||||||
let mut best_d=Planar64::ZERO;
|
let mut best_d=Planar64::ZERO;
|
||||||
let edge_face1_n=self.mesh1.face_nd(edge_face_id1).0;
|
let edge_face1_n=self.mesh1.face_nd(edge_face_id1).0;
|
||||||
@ -495,6 +493,7 @@ impl MeshQuery<MinkowskiFace,MinkowskiDirectedEdge,MinkowskiVert> for MinkowskiM
|
|||||||
}))
|
}))
|
||||||
},
|
},
|
||||||
MinkowskiEdge::EdgeVert(e0,v1)=>{
|
MinkowskiEdge::EdgeVert(e0,v1)=>{
|
||||||
|
//tracking index with an external variable because .enumerate() is not available
|
||||||
let mut i=0;
|
let mut i=0;
|
||||||
Cow::Owned(self.mesh0.edge_faces(e0).map(|edge_face_id0|{
|
Cow::Owned(self.mesh0.edge_faces(e0).map(|edge_face_id0|{
|
||||||
let face_parity=i==0;
|
let face_parity=i==0;
|
||||||
|
Loading…
Reference in New Issue
Block a user