diff --git a/EgtGeomKernel.rc b/EgtGeomKernel.rc index 440eb32..6360474 100644 Binary files a/EgtGeomKernel.rc and b/EgtGeomKernel.rc differ diff --git a/EgtGeomKernel.vcxproj b/EgtGeomKernel.vcxproj index fb96beb..cabd15e 100644 --- a/EgtGeomKernel.vcxproj +++ b/EgtGeomKernel.vcxproj @@ -87,12 +87,12 @@ C:\;$(IncludePath) - false $(ProjectName)R$(PlatformArchitecture) $(SolutionDir)$(Configuration)$(PlatformArchitecture)\ $(Configuration)$(PlatformArchitecture)\ C:\;$(IncludePath) false + false false @@ -190,18 +190,17 @@ copy $(TargetPath) \EgtProg\DllD64 true true - true + false Windows false - true - true C:\EgtDev\Extern\OxySec\Lib\x32\xnodus32.obj;%(AdditionalDependencies) false - UseLinkTimeCodeGeneration + Default + true false @@ -235,17 +234,16 @@ copy $(TargetPath) \EgtProg\Dll32 Precise true true - true + false Windows false - true - true C:\EgtDev\Extern\OxySec\Lib\x64\xnodus.obj;%(AdditionalDependencies) - UseLinkTimeCodeGeneration + Default + true false diff --git a/VolZmapGraphics.cpp b/VolZmapGraphics.cpp index 3b5c6ae..2aad28a 100644 --- a/VolZmapGraphics.cpp +++ b/VolZmapGraphics.cpp @@ -1972,7 +1972,7 @@ VolZmap::ExtMarchingCubes( int nBlock, VoxelContainer& vVox) const vtNlm.Normalize() ; double dDotl = vtNlm * CompoVert[nComp][l].vtVec ; double dDotm = vtNlm * CompoVert[nComp][m].vtVec; - if ( dDotl < - 0.8 || dDotm < - 0.8) { + if ( dDotl < - 0.85 || dDotm < - 0.85) { bOverTurning = true ; break ; } @@ -1986,10 +1986,10 @@ VolZmap::ExtMarchingCubes( int nBlock, VoxelContainer& vVox) const ( ( k + 1) * N_DEXVOXRATIO + 0.5) * m_dStep) ; double dNewU1, dNewU2 ; if ( IntersLineBox( ptSol, vtNullSpace, ptMinDiag, ptMaxDiag, dNewU1, dNewU2)) { - if ( dNewU1 < dNewU2) { + if ( dNewU1 > 0.) { ptSol += ( dNewU1 + EPS_SMALL * ( dNewU2 - dNewU1)) * vtNullSpace ; } - else { + else if ( dNewU2 < 0.) { ptSol += ( dNewU2 + EPS_SMALL * ( dNewU1 - dNewU2)) * vtNullSpace ; } } @@ -2224,6 +2224,8 @@ VolZmap::RegulateFeaturesChain( vector& vVecVox) const for ( int nComp = 0 ; nComp < CurVox.nNumComp ; ++ nComp) { // Vertice fuori dal suo voxel if ( ! CurVox.Compo[nComp].bInside) { + if ( IsPointInsideVoxelApprox( CurVox.i, CurVox.j, CurVox.k, CurVox.Compo[nComp].ptVert, 1.5 * EPS_SMALL)) + continue ; // Caso corner if ( CurVox.Compo[nComp].bCorner) { // Cerco i primi vicini @@ -2397,6 +2399,8 @@ VolZmap::RegulateFeaturesChain( vector& vVecVox) const for ( int nComp = 0 ; nComp < CurVox.nNumComp ; ++ nComp) { // Vertice fuori dal suo voxel if ( ! CurVox.Compo[nComp].bInside) { + if ( IsPointInsideVoxelApprox( CurVox.i, CurVox.j, CurVox.k, CurVox.Compo[nComp].ptVert, 1.5 * EPS_SMALL)) + continue ; // Caso feature if ( ! CurVox.Compo[nComp].bCorner) { INTVECTOR vNearInn, vNearBord ; diff --git a/VolZmapVolume.cpp b/VolZmapVolume.cpp index a4357bd..224534b 100644 --- a/VolZmapVolume.cpp +++ b/VolZmapVolume.cpp @@ -118,6 +118,16 @@ VolZmap::SubtractIntervals( int nGrid, int nI, int nJ, if ( ! bModified) return true ; + // Elimino residui di intervalli inutili + for ( int i = 0 ; i < int( vDexel.size()) ; ++ i) { + if ( abs( vDexel[i].dMax - vDexel[i].dMin) < 2 * EPS_SMALL) { + if ( int( abs( vDexel[i].dMax - 0.5 * m_dStep) / m_dStep) == int( abs( vDexel[i].dMin - 0.5 * m_dStep) / m_dStep)) { + vDexel.erase( vDexel.begin() + i) ; + -- i ; + } + } + } + // Imposto ricalcolo della grafica m_OGrMgr.Reset() ; // Imposto forma generica