EgtGeomKernel 2.1g2 :
- modifiche a SurfTriMesh Cut e Faceting per gestione tolleranze.
This commit is contained in:
Binary file not shown.
+4
-2
@@ -3195,11 +3195,13 @@ SurfTriMesh::Cut( const Plane3d& plPlane, bool bSaveOnEq)
|
||||
return false ;
|
||||
|
||||
// classifico i vertici rispetto al piano
|
||||
double dTol = max( min( 0.5 * m_dLinTol, 10 * EPS_SMALL), EPS_SMALL) ;
|
||||
for ( int i = 0 ; i < GetVertexSize() ; ++ i) {
|
||||
double dDist = DistPointPlane( m_vVert[i].ptP, plPlane) ;
|
||||
if ( abs( dDist) < m_dLinTol) {
|
||||
if ( abs( dDist) < dTol) {
|
||||
m_vVert[i].nTemp = 0 ;
|
||||
m_vVert[i].ptP -= plPlane.GetVersN() * dDist ;
|
||||
if ( abs( dDist) > EPS_SMALL)
|
||||
m_vVert[i].ptP -= plPlane.GetVersN() * dDist ;
|
||||
}
|
||||
else if ( dDist > 0)
|
||||
m_vVert[i].nTemp = +1 ;
|
||||
|
||||
@@ -114,7 +114,8 @@ SurfTriMesh::UpdateTriaFaceting( int nRefT, int nFacet, const Plane3d& plPlane,
|
||||
}
|
||||
if ( nV == SVT_NULL)
|
||||
return false ;
|
||||
if ( ! PointInPlaneApprox( m_vVert[m_vTria[nT].nIdVert[nV]].ptP, plPlane))
|
||||
double dTol = max( min( m_dLinTol, 20 * EPS_SMALL), 2 * EPS_SMALL) ;
|
||||
if ( ! PointInPlaneEpsilon( m_vVert[m_vTria[nT].nIdVert[nV]].ptP, plPlane, dTol))
|
||||
return true ;
|
||||
// il triangolo fa parte della faccia
|
||||
m_vTria[nT].nIdFacet = nFacet ;
|
||||
|
||||
Reference in New Issue
Block a user