EgtGeomKernel :

- correzione verifica collisione tra SurfTrimesh chiusa e Zmap.
This commit is contained in:
Dario Sassi
2024-01-22 08:37:05 +01:00
parent d72f7b6299
commit d96660e6d1
+5 -2
View File
@@ -1930,9 +1930,12 @@ VolZmap::AvoidSurfTm( const ISurfTriMesh& tmSurf, double dSafeDist, bool bPrecis
}
// Intersezione della linea con triangolo eventualmente offsettato
Point3d ptInt, ptInt2 ;
if ( IntersLineTria( ptT, vtK, 1, trNewTria, ptInt, ptInt2, false) != IntLineTriaType::ILTT_NO) {
int nIntLnTr = IntersLineTria( ptT, vtK, 1, trNewTria, ptInt, ptInt2, false) ;
if ( nIntLnTr != ILTT_NO) {
double dZmin = ( ptInt - ptT) * vtK ;
double dZmax = ( ptInt2 - ptT) * vtK ;
double dZmax = dZmin ;
if ( nIntLnTr == ILTT_SEGM || nIntLnTr == ILTT_SEGM_ON_EDGE)
dZmax = ( ptInt2 - ptT) * vtK ;
for ( int nIndex = 0 ; nIndex < nSize ; nIndex += 1) {
if ( dZmax > m_Values[0][nPos][nIndex].dMin - EPS_SMALL &&
dZmin < m_Values[0][nPos][nIndex].dMax + EPS_SMALL)