diff --git a/LuaLibs/ProcessLongDoubleCut.lua b/LuaLibs/ProcessLongDoubleCut.lua index 8abecf2..884c49f 100644 --- a/LuaLibs/ProcessLongDoubleCut.lua +++ b/LuaLibs/ProcessLongDoubleCut.lua @@ -1,4 +1,4 @@ --- ProcessLongDoubleCut.lua by Egaltech s.r.l. 2019/11/24 +-- ProcessLongDoubleCut.lua by Egaltech s.r.l. 2019/11/25 -- Gestione calcolo doppio taglio longitudinale per Travi -- Tabella per definizione modulo @@ -68,17 +68,18 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId) if bInt then bConvex = ( dAng >= 0) bOrtho = ( abs( dAng + 90) < 1) - ptM = ( ptC[1] + ptC[2]) / 2 + ptM = ( ptP1 + ptP2) / 2 else bConvex = true bOrtho = false ptM = ( ptC[1] + ptC[2]) / 2 end + local ptRef = ( ptC[1] + ptC[2]) / 2 -- analisi del taglio local vOrd = {} local vFaceUse = {} if nSide == 1 then - vOrd = EgtIf( ptC[1]:getY() < ptM:getY(), { 1, 2}, { 2, 1}) + vOrd = EgtIf( ptC[1]:getY() < ptRef:getY(), { 1, 2}, { 2, 1}) vFaceUse = { BL.GetNearestOrthoOpposite( ptC[1] - ptM), BL.GetNearestOrthoOpposite( ptC[2] - ptM)} elseif nSide == -1 then vOrd = EgtIf( ptC[1]:getY() < ptM:getY(), { 1, 2}, { 2, 1})