diff --git a/LuaLibs/WProcessFreeContour.lua b/LuaLibs/WProcessFreeContour.lua index ceb9901..681fead 100644 --- a/LuaLibs/WProcessFreeContour.lua +++ b/LuaLibs/WProcessFreeContour.lua @@ -768,7 +768,10 @@ local function GetEdgeToMachineFromVector( nSurfId, nFacet, vtOrtho) local nEdgeIndMax = 0 local dMaxComp = - GEO.INFINITO for i = 1, #EdgesEgt do - local vtN = -EdgesEgt[i].Norm + local vtN = EdgesEgt[i].Norm + if EdgesEgt[i].Open then + vtN = -vtN + end local dComp = vtN * vtOrtho if dComp > dMaxComp then nEdgeIndMax = i -1