EgtGeomKernel 2.3l1 :

- in IntersTriaTria aggiunto riconoscimento triangoli coincidenti
- in IntersTriaTria aggiunta distinzione tra intersezione sovrapposta equiversa e controversa.
This commit is contained in:
DarioS
2021-12-06 16:47:36 +01:00
parent 6cdfdf6db8
commit ca83aaa249
4 changed files with 44 additions and 9 deletions
+12 -6
View File
@@ -1339,9 +1339,12 @@ SurfTriMesh::IntersectTriMeshTriangle( SurfTriMesh& Other)
Point3d ptTempA, ptTempB ;
int nIntTypeAB = IntersTriaTria( trTriaA, trTriaB, ptTempA, ptTempB, vTriaAB) ;
if ( nIntTypeAB == ITTT_OVERLAPS) {
bool bInvertB = trTriaA.GetN() * trTriaB.GetN() < 0. ;
m_vTria[nTA].nTempPart = ( bInvertB ? -2 : 2) ;
SurfB.m_vTria[vNearTria[nTB]].nTempPart = ( bInvertB ? - 2 : 2) ;
m_vTria[nTA].nTempPart = 2 ;
SurfB.m_vTria[vNearTria[nTB]].nTempPart = 2 ;
}
else if ( nIntTypeAB == ITTT_COUNTER_OVERLAPS) {
m_vTria[nTA].nTempPart = -2 ;
SurfB.m_vTria[vNearTria[nTB]].nTempPart = -2 ;
}
}
}
@@ -3663,9 +3666,12 @@ SurfTriMesh::IntersectTriMeshFacets( SurfTriMesh& Other)
}
// Se l'intersezeione è corretta e i triangoli sono sovrapposti aggiorno gli indici.
if ( nIntTypeAB == ITTT_OVERLAPS && bSuccesfullInters) {
bool bInvertB = trTriaA.GetN() * trTriaB.GetN() < 0. ;
m_vTria[nTA].nTempPart = ( bInvertB ? -2 : 2) ;
SurfB.m_vTria[vNearTria[nTB]].nTempPart = ( bInvertB ? - 2 : 2) ;
m_vTria[nTA].nTempPart = 2 ;
SurfB.m_vTria[vNearTria[nTB]].nTempPart = 2 ;
}
else if ( nIntTypeAB == ITTT_COUNTER_OVERLAPS && bSuccesfullInters) {
m_vTria[nTA].nTempPart = - 2 ;
SurfB.m_vTria[vNearTria[nTB]].nTempPart = - 2 ;
}
}
}