|
|
|
@@ -32,6 +32,7 @@ local function GetLayerParamsForPathCalc()
|
|
|
|
|
LayerParams.bPrintInvert = ( EgtGetInfo( s_nPartId, KEY_PRINT_DIRECTION, 'i') == PRINT_DIRECTION.CW)
|
|
|
|
|
-- parametri costolature
|
|
|
|
|
LayerParams.bRibsInvertOrder = EgtGetInfo( s_nPartId, KEY_RIBS_INVERT_ORDER, 'b')
|
|
|
|
|
LayerParams.bRibsDoLinkFirst = EgtGetInfo( s_nPartId, KEY_RIBS_DO_LINK_FIRST, 'b') or false
|
|
|
|
|
-- parametri regioni con diverse passate
|
|
|
|
|
LayerParams.dShellNbrCoasting = EgtGetInfo( s_nPartId, KEY_SHELL_NBR_COASTING, 'd')
|
|
|
|
|
LayerParams.dShellNbrWipe = EgtGetInfo( s_nPartId, KEY_SHELL_NBR_WIPE, 'd')
|
|
|
|
@@ -54,17 +55,20 @@ local function CopyInfo( nSouId, nDestId, sInfo, sType)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
----------------------------------------------------------------------
|
|
|
|
|
local function ComputeSurfOffset( nSrf, nGrpId, dOffs)
|
|
|
|
|
|
|
|
|
|
local nCopySrf = EgtCopy( nSrf, nGrpId) or GDB_ID.NULL
|
|
|
|
|
local function ComputeSurfOffset( nSrf, nGrpId, dOffs, vtSlicing)
|
|
|
|
|
-- gruppo temporaneo locale
|
|
|
|
|
local nGrpTmp = EgtGroup( nGrpId, Frame3d( ORIG(), vtSlicing, GDB_RT.GLOB))
|
|
|
|
|
local nCopySrf = EgtCopyGlob( nSrf, nGrpTmp) or GDB_ID.NULL
|
|
|
|
|
local bOk = EgtSurfFrOffset( nCopySrf, dOffs)
|
|
|
|
|
local bExists = EgtSurfFrChunkCount( nCopySrf) > 0
|
|
|
|
|
if not bOk or not bExists then
|
|
|
|
|
EgtErase( nCopySrf)
|
|
|
|
|
nCopySrf = EgtCopyGlob( nSrf, nGrpId) or GDB_ID.NULL
|
|
|
|
|
nCopySrf = EgtCopyGlob( nSrf, nGrpTmp) or GDB_ID.NULL
|
|
|
|
|
bOk = EgtSurfFrOffset( nCopySrf, dOffs + 0.05)
|
|
|
|
|
bExists = EgtSurfFrChunkCount( nCopySrf) > 0
|
|
|
|
|
end
|
|
|
|
|
EgtRelocateGlob( nCopySrf, nGrpId)
|
|
|
|
|
EgtErase( nGrpTmp)
|
|
|
|
|
return bOk, bExists, nCopySrf
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
@@ -212,7 +216,7 @@ local function VerifyPath( nCrvId, dStrand, vtSlicing, nGrp)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
-------------------------------------------------------------------
|
|
|
|
|
local function ComputeTrimSurfWithOverlaps( vIds, nSrfBase, sKeyOverlap, dStrand, nGrp)
|
|
|
|
|
local function ComputeTrimSurfWithOverlaps( vIds, nSrfBase, sKeyOverlap, dStrand, nGrp, vtSlicing)
|
|
|
|
|
|
|
|
|
|
-- per ogni overlap creo le superfici con cui fare i trim
|
|
|
|
|
local vSurfOffs = {}
|
|
|
|
@@ -220,7 +224,7 @@ local function ComputeTrimSurfWithOverlaps( vIds, nSrfBase, sKeyOverlap, dStrand
|
|
|
|
|
local nOverlap = EgtGetInfo( vIds[i], sKeyOverlap, 'i')
|
|
|
|
|
if not vSurfOffs[nOverlap] then
|
|
|
|
|
local dNewOffs = nOverlap / 100 * dStrand
|
|
|
|
|
local bOk, bExists, nSrfOffs = ComputeSurfOffset( nSrfBase, nGrp, dNewOffs)
|
|
|
|
|
local bOk, bExists, nSrfOffs = ComputeSurfOffset( nSrfBase, nGrp, dNewOffs, vtSlicing)
|
|
|
|
|
if bOk then
|
|
|
|
|
vSurfOffs[nOverlap] = nSrfOffs
|
|
|
|
|
end
|
|
|
|
@@ -326,7 +330,7 @@ local function ComputeOffsetInfill( nSrf, dStrand, vtSlicing, sName, nType, vPtS
|
|
|
|
|
-- estraggo i contorni della superficie
|
|
|
|
|
local vOldIds = GetPathsFromSurf( nSrf, sName, nType, nGrp, vPtStart)
|
|
|
|
|
local dOffs = - dStrand
|
|
|
|
|
local bOk, bExists, nSrfOffs = ComputeSurfOffset( nSrf, nGrp, dOffs)
|
|
|
|
|
local bOk, bExists, nSrfOffs = ComputeSurfOffset( nSrf, nGrp, dOffs, vtSlicing)
|
|
|
|
|
while bOk and bExists do
|
|
|
|
|
-- estraggo i contorni
|
|
|
|
|
local vNewIds = GetPathsFromSurf( nSrfOffs, sName, nType, nGrp, vPtStart)
|
|
|
|
@@ -349,7 +353,7 @@ local function ComputeOffsetInfill( nSrf, dStrand, vtSlicing, sName, nType, vPtS
|
|
|
|
|
EgtErase( nSrfOffs)
|
|
|
|
|
-- offset successivo
|
|
|
|
|
dOffs = dOffs - dStrand
|
|
|
|
|
bOk, bExists, nSrfOffs = ComputeSurfOffset( nSrf, nGrp, dOffs)
|
|
|
|
|
bOk, bExists, nSrfOffs = ComputeSurfOffset( nSrf, nGrp, dOffs, vtSlicing)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
@@ -426,7 +430,7 @@ end
|
|
|
|
|
-------------------------------------------------------------------
|
|
|
|
|
--------------------------- RIBS -----------------------------------
|
|
|
|
|
--------------------------------------------------------------------
|
|
|
|
|
local function ComputeTrimSurfWithOverlapsForRibs( vIds, nSrfBase, nSrfExt, dOffs, dStrand, nGrp)
|
|
|
|
|
local function ComputeTrimSurfWithOverlapsForRibs( vIds, nSrfBase, nSrfExt, dOffs, dStrand, nGrp, vtSlicing)
|
|
|
|
|
|
|
|
|
|
-- per ogni tipologia e overlap creo le superfici con cui fare i trim
|
|
|
|
|
local tSurfOffs = {{}, {}, {}}
|
|
|
|
@@ -437,7 +441,7 @@ local function ComputeTrimSurfWithOverlapsForRibs( vIds, nSrfBase, nSrfExt, dOff
|
|
|
|
|
if nType == RIB_TYPE.INTERNAL then
|
|
|
|
|
if nSrfBase then
|
|
|
|
|
local dNewOffs = nOverlap / 100 * dStrand
|
|
|
|
|
local bOk, bExists, nSrfOffs = ComputeSurfOffset( nSrfBase, nGrp, dNewOffs)
|
|
|
|
|
local bOk, bExists, nSrfOffs = ComputeSurfOffset( nSrfBase, nGrp, dNewOffs, vtSlicing)
|
|
|
|
|
if bOk then
|
|
|
|
|
tSurfOffs[nType][nOverlap] = nSrfOffs
|
|
|
|
|
end
|
|
|
|
@@ -445,7 +449,7 @@ local function ComputeTrimSurfWithOverlapsForRibs( vIds, nSrfBase, nSrfExt, dOff
|
|
|
|
|
elseif nType == RIB_TYPE.EXTERNAL then
|
|
|
|
|
if nSrfExt then
|
|
|
|
|
local dNewOffs = dOffs + ( 0.5 - nOverlap / 100) * dStrand
|
|
|
|
|
local bOk, bExists, nSrfOffs = ComputeSurfOffset( nSrfExt, nGrp, dNewOffs)
|
|
|
|
|
local bOk, bExists, nSrfOffs = ComputeSurfOffset( nSrfExt, nGrp, dNewOffs, vtSlicing)
|
|
|
|
|
if bOk then
|
|
|
|
|
tSurfOffs[nType][nOverlap] = nSrfOffs
|
|
|
|
|
EgtSetName( nSrfOffs, TOT_SHELL_TRIM_SURF)
|
|
|
|
@@ -590,14 +594,14 @@ local function HandleRibsIntersections( nRibsGrp, LayerParams, nOffsGrp, nRibsPa
|
|
|
|
|
local bOk, bExists
|
|
|
|
|
local nSrf1 = EgtGetFirstNameInGroup( nCrvGrp, TOT_SHELL_TRIM_SURF)
|
|
|
|
|
if nSrf1 then
|
|
|
|
|
bOk, bExists, nSrfOffs1 = ComputeSurfOffset( nSrf1, nCrvGrp, 2 * LayerParams.dStrand)
|
|
|
|
|
bOk, bExists, nSrfOffs1 = ComputeSurfOffset( nSrf1, nCrvGrp, 2 * LayerParams.dStrand, LayerParams.vtSlicing)
|
|
|
|
|
if not bOk or not bExists then
|
|
|
|
|
nSrfOffs1 = EgtCopyGlob( nSrf1, nCrvGrp)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
local nSrf2 = EgtGetFirstNameInGroup( nCrvGrp, LAYER_SRF)
|
|
|
|
|
if nSrf2 then
|
|
|
|
|
bOk, bExists, nSrfOffs2 = ComputeSurfOffset( nSrf2, nCrvGrp, - 2 * LayerParams.dStrand)
|
|
|
|
|
bOk, bExists, nSrfOffs2 = ComputeSurfOffset( nSrf2, nCrvGrp, - 2 * LayerParams.dStrand, LayerParams.vtSlicing)
|
|
|
|
|
if not bOk or not bExists then
|
|
|
|
|
nSrfOffs2 = EgtCopyGlob( nSrf2, nCrvGrp)
|
|
|
|
|
end
|
|
|
|
@@ -668,7 +672,8 @@ local function HandleRibsIntersections( nRibsGrp, LayerParams, nOffsGrp, nRibsPa
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
EgtErase( nSrfOffs)
|
|
|
|
|
EgtErase( nSrfOffs1)
|
|
|
|
|
EgtErase( nSrfOffs2)
|
|
|
|
|
EgtErase( nGrpTmp)
|
|
|
|
|
|
|
|
|
|
return bInters
|
|
|
|
@@ -706,7 +711,7 @@ end
|
|
|
|
|
|
|
|
|
|
---------------------------------------------------------------------
|
|
|
|
|
-- Funzione che riordina le costolature nel caso generico
|
|
|
|
|
local function ReorderRibs( nGrp, bInvertOrder, dStrand, nMaxNbr)
|
|
|
|
|
local function ReorderRibs( nGrp, bInvertOrder, bDoLinkFirst, dStrand, nMaxNbr)
|
|
|
|
|
|
|
|
|
|
-- raggruppo per tipologia
|
|
|
|
|
local tRibs = {{}, {}, {}}
|
|
|
|
@@ -721,8 +726,8 @@ local function ReorderRibs( nGrp, bInvertOrder, dStrand, nMaxNbr)
|
|
|
|
|
local vSplitRibs = {}
|
|
|
|
|
for i = 1, 3 do
|
|
|
|
|
local tSplitOrder = {}
|
|
|
|
|
local nMax = 0
|
|
|
|
|
-- suddivido i ribs in base allo SplitOrder
|
|
|
|
|
local nMax = -1
|
|
|
|
|
-- raggruppo i ribs
|
|
|
|
|
for j = 1, #tRibs[i] do
|
|
|
|
|
local nInfoSplit = EgtGetInfo( tRibs[i][j], KEY_SPLIT_RIB, 'i')
|
|
|
|
|
local nShells = EgtGetInfo( tRibs[i][j], KEY_RIBS_SHELLS_NBR, 'i')
|
|
|
|
@@ -730,20 +735,31 @@ local function ReorderRibs( nGrp, bInvertOrder, dStrand, nMaxNbr)
|
|
|
|
|
-- se è ottenuto dalla divisione di una costolatura
|
|
|
|
|
table.insert( vSplitRibs, tRibs[i][j])
|
|
|
|
|
else
|
|
|
|
|
-- classifico in base all'ordine di split
|
|
|
|
|
-- classifico in base all'ordine di split e al link
|
|
|
|
|
local nSplitOrder = EgtGetInfo( tRibs[i][j], KEY_SPLIT_ORDER, 'i') or 0
|
|
|
|
|
local bLink = EgtGetInfo( tRibs[i][j], KEY_RIBS_LINK, 'b') or false
|
|
|
|
|
if nSplitOrder > nMax then nMax = nSplitOrder end
|
|
|
|
|
if tSplitOrder[nSplitOrder] then
|
|
|
|
|
table.insert( tSplitOrder[nSplitOrder], tRibs[i][j])
|
|
|
|
|
if not tSplitOrder[nSplitOrder] then
|
|
|
|
|
tSplitOrder[nSplitOrder]= {{}, {}}
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if bLink then
|
|
|
|
|
table.insert( tSplitOrder[nSplitOrder][2], tRibs[i][j])
|
|
|
|
|
else
|
|
|
|
|
tSplitOrder[nSplitOrder] = {tRibs[i][j]}
|
|
|
|
|
table.insert( tSplitOrder[nSplitOrder][1], tRibs[i][j])
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
local bLinkFirst = bDoLinkFirst
|
|
|
|
|
-- riordino ogni ordine di split
|
|
|
|
|
for i = 0, nMax do
|
|
|
|
|
ShortestPathForRibs( tSplitOrder[i], nGrp, bInvertOrder)
|
|
|
|
|
for k = 0, nMax do
|
|
|
|
|
ShortestPathForRibs( EgtIf( bLinkFirst, tSplitOrder[k][2], tSplitOrder[k][1]), nGrp, bInvertOrder)
|
|
|
|
|
ShortestPathForRibs( EgtIf( bLinkFirst, tSplitOrder[k][1], tSplitOrder[k][2]), nGrp, bInvertOrder)
|
|
|
|
|
-- eventuale aggiornamento di bLinkFirst per l'ordine successivo
|
|
|
|
|
if not ( ( not bLinkFirst and #tSplitOrder[k][2] == 0) or ( bLinkFirst and #tSplitOrder[k][1] == 0)) then
|
|
|
|
|
bLinkFirst = not bLinkFirst
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
@@ -791,7 +807,7 @@ end
|
|
|
|
|
--------------------------------------------------------------------------------------------
|
|
|
|
|
local function ReassignInfo( nCrv, nCnt, vOrig)
|
|
|
|
|
|
|
|
|
|
for nId = nCrv, nCrv + nCnt - 1 do
|
|
|
|
|
for nId = nCrv, nCrv + nCnt - 1 do
|
|
|
|
|
local ptS = EgtSP( nId)
|
|
|
|
|
local ptE = EgtEP( nId)
|
|
|
|
|
|
|
|
|
@@ -968,7 +984,7 @@ local function ReorderRibsInters2Shells( nOffsGrp, dStrand)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
-------------------------------------------------------------------
|
|
|
|
|
local function UpdateRibSplitInfo( nGrp, tIds)
|
|
|
|
|
local function UpdateRibSplitInfo( nGrp, tIds, tRemoved)
|
|
|
|
|
|
|
|
|
|
local vIds = EgtGetNameInGroup( nGrp, RIBS_CRV .. '*')
|
|
|
|
|
if not vIds then return end
|
|
|
|
@@ -978,6 +994,11 @@ local function UpdateRibSplitInfo( nGrp, tIds)
|
|
|
|
|
-- info SplitRib
|
|
|
|
|
local nInfo = EgtGetInfo( vIds[i], KEY_SPLIT_RIB, 'i')
|
|
|
|
|
if nInfo then
|
|
|
|
|
-- verifico se va aggiornata ereditandola da rib che sono stati eliminati per vincolo sulla lunghezza
|
|
|
|
|
while tRemoved[nInfo] do
|
|
|
|
|
nInfo = tRemoved[nInfo]
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if tIds[nInfo] and #tIds[nInfo] > 0 then
|
|
|
|
|
-- aggiorno info con nuovo id della costolatura da cui deriva
|
|
|
|
|
local nLast = #tIds[nInfo]
|
|
|
|
@@ -1039,7 +1060,7 @@ local function CalcRibsPaths( nSliceGrp, nRibsGrp, LayerParams, nIdx)
|
|
|
|
|
-- creo le superfici con cui fare i trim
|
|
|
|
|
local nSrfBase = EgtGetFirstNameInGroup( nCrvGrp, TOT_SHELL_TRIM_SURF)
|
|
|
|
|
local nSrfExt = EgtGetFirstNameInGroup( nCrvGrp, LAYER_SRF)
|
|
|
|
|
local tSurfOffs = ComputeTrimSurfWithOverlapsForRibs( vRibs, nSrfBase, nSrfExt, LayerParams.dOffs, LayerParams.dStrand, nRibsPathGrp)
|
|
|
|
|
local tSurfOffs = ComputeTrimSurfWithOverlapsForRibs( vRibs, nSrfBase, nSrfExt, LayerParams.dOffs, LayerParams.dStrand, nRibsPathGrp, LayerParams.vtSlicing)
|
|
|
|
|
|
|
|
|
|
-- gestisco eventuali intersezioni fra costolature
|
|
|
|
|
local bInters = HandleRibsIntersections( nRibsGrp, LayerParams, nOffsGrp, nRibsPathGrp, bAllTwoStrands)
|
|
|
|
@@ -1048,6 +1069,7 @@ local function CalcRibsPaths( nSliceGrp, nRibsGrp, LayerParams, nIdx)
|
|
|
|
|
|
|
|
|
|
-- eseguo il trim delle costole con la regione offsettata
|
|
|
|
|
local tOldNewIds = {}
|
|
|
|
|
local tRemoved = {}
|
|
|
|
|
local vOrderedRibs = EgtGetNameInGroup( nRibsPathGrp, RIBS_CRV ..'*')
|
|
|
|
|
for i = 1, #vOrderedRibs do
|
|
|
|
|
-- trim con superficie opportuna
|
|
|
|
@@ -1073,6 +1095,12 @@ local function CalcRibsPaths( nSliceGrp, nRibsGrp, LayerParams, nIdx)
|
|
|
|
|
for nInd = 0, nCnt - 1 do
|
|
|
|
|
local dLen = EgtCurveLength( nCrv + nInd)
|
|
|
|
|
if dLen < MIN_RIBS_LEN then
|
|
|
|
|
-- conservo eventuale info di split
|
|
|
|
|
local nSplitRib = EgtGetInfo( nCrv + nInd, KEY_SPLIT_RIB, 'i')
|
|
|
|
|
if nSplitRib then
|
|
|
|
|
tRemoved[vOrderedRibs[i]] = nSplitRib
|
|
|
|
|
end
|
|
|
|
|
-- cancello la curva
|
|
|
|
|
EgtErase( nCrv + nInd)
|
|
|
|
|
else
|
|
|
|
|
table.insert( tOldNewIds[ vOrderedRibs[i]], nCrv + nInd)
|
|
|
|
@@ -1102,14 +1130,14 @@ local function CalcRibsPaths( nSliceGrp, nRibsGrp, LayerParams, nIdx)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
-- aggiorno le info di split con i nuovi id
|
|
|
|
|
UpdateRibSplitInfo( nRibsPathGrp, tOldNewIds)
|
|
|
|
|
UpdateRibSplitInfo( nRibsPathGrp, tOldNewIds, tRemoved)
|
|
|
|
|
|
|
|
|
|
-- riordino le costolature
|
|
|
|
|
if bAllTwoStrands and bInters then
|
|
|
|
|
-- gestione caso speciale di intersezione e 2 passate
|
|
|
|
|
ReorderRibsInters2Shells( nRibsPathGrp, LayerParams.dStrand)
|
|
|
|
|
else
|
|
|
|
|
ReorderRibs( nRibsPathGrp, LayerParams.bRibsInvertOrder, LayerParams.dStrand, nMaxNbr)
|
|
|
|
|
ReorderRibs( nRibsPathGrp, LayerParams.bRibsInvertOrder, LayerParams.bRibsDoLinkFirst, LayerParams.dStrand, nMaxNbr)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if not EgtGetFirstNameInGroup( nRibsPathGrp, RIBS_CRV .. '*') then
|
|
|
|
@@ -1458,10 +1486,10 @@ end
|
|
|
|
|
--------------------------------------------------------------------
|
|
|
|
|
------------------ AUX SOLIDS -------------------------------------
|
|
|
|
|
--------------------------------------------------------------------
|
|
|
|
|
local function UpdateTrimSurfWithAuxSolidsOffset( nSrfSolid, nSrfBase, dStrand, nCrvGrp)
|
|
|
|
|
local function UpdateTrimSurfWithAuxSolidsOffset( nSrfSolid, nSrfBase, dStrand, nCrvGrp, vtSlicing)
|
|
|
|
|
|
|
|
|
|
-- offset della superifice del solido
|
|
|
|
|
local bOk, bExists, nSrfOffs = ComputeSurfOffset( nSrfSolid, nCrvGrp, dStrand)
|
|
|
|
|
local bOk, bExists, nSrfOffs = ComputeSurfOffset( nSrfSolid, nCrvGrp, dStrand, vtSlicing)
|
|
|
|
|
if nSrfOffs then
|
|
|
|
|
EgtSurfFrSubtract( nSrfBase, nSrfOffs)
|
|
|
|
|
EgtErase( nSrfOffs)
|
|
|
|
@@ -1591,7 +1619,7 @@ local function CalcAuxSolidsPaths( nSliceGrp, nSolidGrp, LayerParams, vPtStart)
|
|
|
|
|
if not nSrfBase then
|
|
|
|
|
EgtOutLog( 'Warning : AuxSolids not possible (layer '..tostring( nIdx)..') - CalcPaths')
|
|
|
|
|
else
|
|
|
|
|
local vSurfOffs = ComputeTrimSurfWithOverlaps( vSolidIds, nSrfBase, KEY_AUX_SOLIDS_OVERLAP, LayerParams.dStrand, nSolidPathGrp)
|
|
|
|
|
local vSurfOffs = ComputeTrimSurfWithOverlaps( vSolidIds, nSrfBase, KEY_AUX_SOLIDS_OVERLAP, LayerParams.dStrand, nSolidPathGrp, LayerParams.vtSlicing)
|
|
|
|
|
|
|
|
|
|
for i = 1, #vSolidIds do
|
|
|
|
|
-- creo la flat region corrispondente al solido ausiliario
|
|
|
|
@@ -1609,7 +1637,7 @@ local function CalcAuxSolidsPaths( nSliceGrp, nSolidGrp, LayerParams, vPtStart)
|
|
|
|
|
if nInfillType == INFILL_TYPE.OFFSET then
|
|
|
|
|
ComputeOffsetInfill( nFirst + j, LayerParams.dStrand, LayerParams.vtSlicing, sNewName, TYPE.AUX_SOLID, vPtStart, nSolidPathGrp)
|
|
|
|
|
-- aggiorno la trim surf
|
|
|
|
|
UpdateTrimSurfWithAuxSolidsOffset( nFirst + j, nSrfBase, LayerParams.dStrand, nSolidPathGrp)
|
|
|
|
|
UpdateTrimSurfWithAuxSolidsOffset( nFirst + j, nSrfBase, LayerParams.dStrand, nSolidPathGrp, LayerParams.vtSlicing)
|
|
|
|
|
else
|
|
|
|
|
ComputeZigZagInfill( nFirst + j, LayerParams.dStrand, LayerParams.vtSlicing, sNewName, TYPE.AUX_SOLID, vPtStart, nSolidPathGrp)
|
|
|
|
|
-- aggiungo eventuale passata extra
|
|
|
|
@@ -1689,7 +1717,7 @@ function CalcPaths.Exec( nPartId)
|
|
|
|
|
local dOffs = - LayerParams.dOffs - 0.5 * LayerParams.dStrand
|
|
|
|
|
if nMaxShellNbrDiff < LayerParams.nShellsNbr then
|
|
|
|
|
dOffs = dOffs + LayerParams.dStrand
|
|
|
|
|
local bOk, bExists, nSrfId = ComputeSurfOffset( nSrf, nCrvGrpId, - dOffs)
|
|
|
|
|
local bOk, bExists, nSrfId = ComputeSurfOffset( nSrf, nCrvGrpId, - dOffs, LayerParams.vtSlicing)
|
|
|
|
|
if not bOk then
|
|
|
|
|
EgtOutLog( 'Error on ExtOffset (layer '..tostring( nIdx)..') - CalcPaths')
|
|
|
|
|
elseif not bExists then
|
|
|
|
@@ -1712,7 +1740,7 @@ function CalcPaths.Exec( nPartId)
|
|
|
|
|
for nInd = 1, LayerParams.nShellsNbr - 1 - nMaxShellNbrDiff do
|
|
|
|
|
-- offset della superficie originale
|
|
|
|
|
dOffs = dOffs + LayerParams.dStrand * ( 1 - LayerParams.nStrandOverlap / 100)
|
|
|
|
|
local bOk, bExists, nSrfId = ComputeSurfOffset( nSrf, nCrvGrpId, - dOffs)
|
|
|
|
|
local bOk, bExists, nSrfId = ComputeSurfOffset( nSrf, nCrvGrpId, - dOffs, LayerParams.vtSlicing)
|
|
|
|
|
if not bOk then
|
|
|
|
|
EgtOutLog( 'Error on IntOffset (layer '..tostring( nIdx)..') - CalcPaths')
|
|
|
|
|
elseif not bExists then
|
|
|
|
@@ -1730,7 +1758,7 @@ function CalcPaths.Exec( nPartId)
|
|
|
|
|
-- se hai extra shell tieni conto anche dell'overlap ammesso
|
|
|
|
|
dSurfTrimOffs = dOffs + ( 1 - LayerParams.nStrandOverlap / 100) * LayerParams.dStrand - s_dOffsCorr
|
|
|
|
|
end
|
|
|
|
|
local bOkTrim, bExistsTrim, nSrfTrim = ComputeSurfOffset( nSrf, nCrvGrpId, - dSurfTrimOffs)
|
|
|
|
|
local bOkTrim, bExistsTrim, nSrfTrim = ComputeSurfOffset( nSrf, nCrvGrpId, - dSurfTrimOffs, LayerParams.vtSlicing)
|
|
|
|
|
if not bOkTrim then
|
|
|
|
|
EgtOutLog( 'Error on IntOffset (layer '..tostring( nIdx)..') - CalcPaths')
|
|
|
|
|
elseif bExistsTrim then
|
|
|
|
|