diff --git a/LuaLibs/CalcSlices.lua b/LuaLibs/CalcSlices.lua index 754c69d..e39075f 100644 --- a/LuaLibs/CalcSlices.lua +++ b/LuaLibs/CalcSlices.lua @@ -297,7 +297,7 @@ function CalcSlices.Exec( nPartId, nStmId, HMax) -- costanti local TOLER = 0.2 - local SMALL_TOLER = 0.5 + local SMALL_TOLER = 0.02 -- da portare a 0.5 local BIG_TOLER = 2.0 local MIN_LEN = 20.0 local MIN_AREA = 25.0 diff --git a/LuaLibs/CalcToolPath.lua b/LuaLibs/CalcToolPath.lua index 5293ba3..c26e0f8 100644 --- a/LuaLibs/CalcToolPath.lua +++ b/LuaLibs/CalcToolPath.lua @@ -1,4 +1,4 @@ --- CalcToolPath.lua by Egaltech s.r.l. 2022/08/29 +-- CalcToolPath.lua by Egaltech s.r.l. 2022/09/21 -- Calcolo percorsi di lavoro per Stampa 3d -- Tabella per definizione modulo @@ -313,7 +313,7 @@ local function VerifyRibsLink( nLinkId, nCurr, nNext, dStrand) end -------------------------------------------------------------------- -local function CalcRibsLink( nCurr, nNext, nLoopGrp, dStrand, bForceLink) +local function CalcRibsLink( nCurr, nNext, nLoopGrp, dStrand, bForceLink, vtSlicing) local ptS = EgtEP( nCurr) local ptE = EgtSP( nNext) @@ -383,6 +383,7 @@ local function CalcRibsLink( nCurr, nNext, nLoopGrp, dStrand, bForceLink) local bValid = VerifyRibsLink( nLinkId, nCurr, nNext, dStrand) if bValid then EgtSetInfo( nLinkId, KEY_TYPE, TYPE.RIB) + EgtModifyCurveExtrusion( nLinkId, vtSlicing, GDB_RT.GLOB) EgtRelocateGlob( nLinkId, nCurr, GDB_IN.AFTER) else EgtErase( nLinkId) @@ -763,15 +764,15 @@ local function CalcRibsToolPath( nCrvGrp, nTpathGrpId, LayerParams, dCorrZ) -- collego le passate di una stessa costolatura for i = 1, #tabRibs do for j = 1, #tabRibs[i] - 1 do - CalcRibsLink( tabRibs[i][j], tabRibs[i][j + 1], nLoopGrp, LayerParams.dStrand, true) + CalcRibsLink( tabRibs[i][j], tabRibs[i][j + 1], nLoopGrp, LayerParams.dStrand, true, LayerParams.vtSlicing) if not bSpecialCase then -- creo link fittizio per eliminare tratto corrispondente sulla curva di offset - local nFakeLink = CalcRibsLink( tabRibs[i][j + 1], tabRibs[i][j], nLoopGrp, LayerParams.dStrand, false) + local nFakeLink = CalcRibsLink( tabRibs[i][j + 1], tabRibs[i][j], nLoopGrp, LayerParams.dStrand, false, LayerParams.vtSlicing) EgtErase( nFakeLink) end end if bSpecialCase then - local nFakeLink = CalcRibsLink( tabRibs[i][#tabRibs[i]], tabRibs[i][1], nLoopGrp, LayerParams.dStrand, false) + local nFakeLink = CalcRibsLink( tabRibs[i][#tabRibs[i]], tabRibs[i][1], nLoopGrp, LayerParams.dStrand, false, LayerParams.vtSlicing) EgtErase( nFakeLink) end end @@ -779,7 +780,7 @@ local function CalcRibsToolPath( nCrvGrp, nTpathGrpId, LayerParams, dCorrZ) if LayerParams.bRibsLink then for i = 1, #tabRibs - 1 do local nCnt = #tabRibs[i] - CalcRibsLink( tabRibs[i][nCnt], tabRibs[i + 1][1], nLoopGrp, LayerParams.dStrand, false) + CalcRibsLink( tabRibs[i][nCnt], tabRibs[i + 1][1], nLoopGrp, LayerParams.dStrand, false, LayerParams.vtSlicing) end end