From 2d1c4968da86cbb1a431b7dc88fdb11bad3fa080 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Wed, 18 Nov 2020 18:36:06 +0000 Subject: [PATCH] DataWall : - corretta funzione GetFaceElevation - corretto calcolo step ed elevazione da usare in fresature SideGroove. --- LuaLibs/WProcessLapJoint.lua | 6 +++--- LuaLibs/WallLib.lua | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/LuaLibs/WProcessLapJoint.lua b/LuaLibs/WProcessLapJoint.lua index da02f91..a5d5a76 100644 --- a/LuaLibs/WProcessLapJoint.lua +++ b/LuaLibs/WProcessLapJoint.lua @@ -347,9 +347,9 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw) if dStep < GEO.EPS_SMALL then dStep = dMaxMat end local nStep = ceil( ( dThick - dMaxMat) / dStep) dStep = ( dThick - dMaxMat) / nStep - local dMaxElev = ( nStep + 1) * dStep + local dMaxElev = ( nStep + 1) * dStep - GEO.EPS_SMALL EgtSetMachiningParam( MCH_MP.STEP, dStep) - EgtSetMachiningParam( MCH_MP.USERNOTES, 'MaxElev=' .. EgtNumToString( dMaxElev, 1) .. ';') + EgtSetMachiningParam( MCH_MP.USERNOTES, 'MaxElev=' .. EgtNumToString( dMaxElev, 3) .. ';') -- eseguo if not EgtApplyMachining( true, false) then local _, sErr = EgtGetLastMachMgrError() @@ -576,7 +576,7 @@ local function MakeMoreFaces( Proc, nRawId, b3Raw) -- se di fianco if Proc.Fct >= 3 and vtN:getZ() < WD.NZ_MINA then -- fresatura - if dV > 30 then + if dElev < 200 then return MakeSideGrooveByMill( Proc, nFacInd, nRawId, b3Raw) -- altrimenti sega a catena else diff --git a/LuaLibs/WallLib.lua b/LuaLibs/WallLib.lua index 6cd1c5d..0d6cdd8 100644 --- a/LuaLibs/WallLib.lua +++ b/LuaLibs/WallLib.lua @@ -75,7 +75,7 @@ function WallLib.GetFaceElevation( nSurfId, nFac, nRawId) if not ptC or not vtN then return 0 end local frOCS = Frame3d( ptC, vtN) ; local b3Box = EgtGetBBoxRef( nSurfId, GDB_BB.STANDARD, frOCS) - local dElev = b3Box:getDimZ() + local dElev = b3Box:getMax():getZ() if nPartId then local _, dCenElev = WallLib.GetPointDirDepth( nRawId, ptC, vtN) if dCenElev and dCenElev > dElev then