diff --git a/LuaLibs/ProcessRidgeLap.lua b/LuaLibs/ProcessRidgeLap.lua index b1f4c67..27b1f8e 100644 --- a/LuaLibs/ProcessRidgeLap.lua +++ b/LuaLibs/ProcessRidgeLap.lua @@ -209,7 +209,12 @@ function ProcessRidgeLap.Make( Proc, nPhase, nRawId, nPartId, dOvmHead) local b3Fac1 = EgtSurfTmGetFacetBBoxGlob( Proc.Id, vFaceOrd[1] - 1, GDB_BB.STANDARD) if b3Fac1 then dHCI = b3Raw:getMax():getX() - dOvmHead - b3Fac1:getMin():getX() end else - dHCI = b3Raw:getMax():getX() - dOvmHead - Proc.Box:getMin():getX() + -- se feature inclinata, si va oltre ingombro del box. Si considera metà dell'ingombro della faccia inclinata + if vtN[vFaceOrd[2]] and vtN[vFaceOrd[2]]:getZ() > 0 then + dHCI = b3Raw:getMax():getX() - dOvmHead - Proc.Box:getMin():getX() - ( vtN[vFaceOrd[2]]:getZ() * b3Raw:getDimZ()) + else + dHCI = b3Raw:getMax():getX() - dOvmHead - Proc.Box:getMin():getX() + end end BL.UpdateHCING( nRawId, dHCI) elseif Proc.Tail then @@ -218,7 +223,12 @@ function ProcessRidgeLap.Make( Proc, nPhase, nRawId, nPartId, dOvmHead) local b3Fac1 = EgtSurfTmGetFacetBBoxGlob( Proc.Id, vFaceOrd[1] - 1, GDB_BB.STANDARD) if b3Fac1 then dTCI = b3Fac1:getMax():getX() - b3Solid:getMin():getX() end else - dTCI = Proc.Box:getMax():getX() - b3Solid:getMin():getX() + -- se feature inclinata, si va oltre ingombro del box. Si considera metà dell'ingombro della faccia inclinata + if vtN[vFaceOrd[2]] and vtN[vFaceOrd[2]]:getZ() > 0 then + dTCI = Proc.Box:getMax():getX() - b3Solid:getMin():getX() - ( vtN[vFaceOrd[2]]:getZ() * b3Raw:getDimZ()) + else + dTCI = Proc.Box:getMax():getX() - b3Solid:getMin():getX() + end end BL.UpdateTCING( nRawId, dTCI) end