From e4b5e4c0a97c7144f0cd2ba2c21ed12740f61180 Mon Sep 17 00:00:00 2001 From: LorenzoM Date: Wed, 12 Jan 2022 17:26:54 +0100 Subject: [PATCH] Correzioni vmill --- VolZmap.cpp | 2 ++ VolZmapVolume.cpp | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/VolZmap.cpp b/VolZmap.cpp index 2a0abff..03a10c2 100644 --- a/VolZmap.cpp +++ b/VolZmap.cpp @@ -2075,6 +2075,8 @@ VolZmap::ResetAllTools( void) bool VolZmap::ResetTool( void) { + if ( m_vTool.empty()) + return true ; bool bOk = m_vTool.back().Clear() ; m_vTool.erase( m_vTool.begin() + int( m_vTool.size()) - 1) ; return bOk ; diff --git a/VolZmapVolume.cpp b/VolZmapVolume.cpp index 2a0379c..b21a60b 100644 --- a/VolZmapVolume.cpp +++ b/VolZmapVolume.cpp @@ -7844,7 +7844,7 @@ VolZmap::AddingMotion( int nGrid, const Point3d& ptS, const Point3d& ptE, const else { Frame3d CylFrame, PolyFrame ; CylFrame.Set( ptS - dHei * vtAx, vtAx) ; - PolyFrame.Set( ptS - dHei * vtAx, vtV1, vtAx ^ vtV1, vtAx) ; + PolyFrame.Set( ptS - ( dHei + EPS_SMALL) * vtAx, vtV1, vtAx ^ vtV1, vtAx) ; for ( int i = nStartI ; i <= nEndI ; ++ i) { for ( int j = nStartJ ; j <= nEndJ ; ++ j) { @@ -7863,7 +7863,7 @@ VolZmap::AddingMotion( int nGrid, const Point3d& ptS, const Point3d& ptE, const AddIntervals( nGrid, i, j, ptInt1.z + dLen1 * vtV1.z, ptInt2.z + dLen1 * vtV1.z, - vtN1, - vtN2) ; } - if ( IntersLineMyPolyhedron( ptC, Z_AX, PolyFrame, dLen1, 2 * dRad, dHei, 0, + if ( IntersLineMyPolyhedron( ptC, Z_AX, PolyFrame, dLen1, 2 * ( dRad + EPS_SMALL), dHei + 2 * EPS_SMALL, 0, ptInt1, vtN1, ptInt2, vtN2)) { AddIntervals( nGrid, i, j, ptInt1.z, ptInt2.z, - vtN1, - vtN2) ; }