diff --git a/EXE_GdbCreateSurf.cpp b/EXE_GdbCreateSurf.cpp index 8860e87..a2e351a 100644 --- a/EXE_GdbCreateSurf.cpp +++ b/EXE_GdbCreateSurf.cpp @@ -503,6 +503,11 @@ MyCreateSurfTmConvexHullInBBox( int nParentId, int nId, const BBox3d& b3Box, int vTria[1] = MyCreateSidePlaneHull( vVert, bNXp, b3Box, -3) ; vTria[2] = MyCreateSidePlaneHull( vVert, bNXp, b3Box, +2) ; vTria[3] = MyCreateSidePlaneHull( vVert, bNXp, b3Box, -2) ; + // invalido i triangoli con normale opposta alla direzione attesa + for ( int i = 0 ; i < 4 ; ++ i) { + if ( ( vTria[i].GetN().x > 0) != bNXp) + vTria[i].Set( vTria[i].GetP( 0), vTria[i].GetP( 1), vTria[i].GetP( 2)) ; + } // cerco uno o due piani validi int nPlane1 = -1 ; int nPlane2 = -1 ; diff --git a/EgtExecutor.rc b/EgtExecutor.rc index a83652d..7dbecaa 100644 Binary files a/EgtExecutor.rc and b/EgtExecutor.rc differ