3dPrinting :
- aggiunta la possibilità di collegare solo alcuni setti ( prima versione) - correzioni varie.
This commit is contained in:
@@ -41,8 +41,6 @@ local function GetLayerParamsForToolPathCalc()
|
||||
LayerParams.dWipeDir = EgtGetInfo( s_nPartId, KEY_WIPE_DIR, 'd') or 0.0
|
||||
LayerParams.vtSlicing = EgtGetInfo( s_nPartId, KEY_SLICING_DIR, 'v')
|
||||
LayerParams.dTDiam = EgtGetInfo( s_nPartId, KEY_TOOL_DIAM, 'd')
|
||||
-- Parametri costolature
|
||||
LayerParams.bRibsLink = EgtGetInfo( s_nPartId, KEY_RIBS_LINK, 'b')
|
||||
|
||||
return LayerParams
|
||||
end
|
||||
@@ -180,7 +178,7 @@ local function AddLeadOut( nCrvId, LayerParams, nGrpId)
|
||||
|
||||
local nLeadOutCrv
|
||||
if LayerParams.nLeadOutType == LEAD_TYPE.LINEAR then
|
||||
nLeadOutCrv = EgtCurveCompoFromPoints( nGrpId, {ptS, ptE}, GDB_RT.GLOB)
|
||||
nLeadOutCrv = EgtCurveCompoFromPoints( nGrpId, {ptS, ptE}, GDB_RT.GLOB)
|
||||
elseif LayerParams.nLeadOutType == LEAD_TYPE.ARC then
|
||||
nLeadOutCrv = EgtArc2PV( nGrpId, ptS, ptE, vtTang, GDB_RT.GLOB)
|
||||
end
|
||||
@@ -775,20 +773,26 @@ local function CalcRibsToolPath( nCrvGrp, nTpathGrpId, LayerParams, dCorrZ)
|
||||
for i = 1, #tabRibs do
|
||||
local nInfo = EgtGetInfo( tabRibs[i][1], KEY_SPLIT_RIB, 'i')
|
||||
local nShellsNbr = EgtGetInfo( tabRibs[i][1], KEY_RIBS_SHELLS_NBR, 'i')
|
||||
-- se link aggiorno bInvert per il gruppo di costolature corrente in modo da essere coerente con il collegamento
|
||||
if LayerParams.bRibsLink then
|
||||
if i > 1 then
|
||||
|
||||
if i > 1 then
|
||||
-- verifico se link
|
||||
local bPrevLink = EgtGetInfo( tabRibs[i-1][1], KEY_RIBS_LINK, 'b')
|
||||
local bCurrLink = EgtGetInfo( tabRibs[i][1], KEY_RIBS_LINK, 'b')
|
||||
if bPrevLink and bCurrLink then
|
||||
nPrevType = EgtGetInfo( tabRibs[i-1][1], KEY_RIBS_TYPE, 'i')
|
||||
nCurrType = EgtGetInfo( tabRibs[i][1], KEY_RIBS_TYPE, 'i')
|
||||
-- se cambio tipologia di setto, l'orientamento della curva è già corretto
|
||||
if nPrevType ~= nCurrType then
|
||||
bInvert = false
|
||||
elseif not nInfo then
|
||||
-- aggiorno bInvert per il gruppo di costolature corrente in modo da essere coerente con il collegamento
|
||||
local nPrevShellsNbr = EgtGetInfo( tabRibs[i-1][1], KEY_RIBS_SHELLS_NBR, 'i')
|
||||
if nPrevShellsNbr % 2 == 1 then
|
||||
bInvert = not bInvert
|
||||
end
|
||||
end
|
||||
else
|
||||
bInvert = false
|
||||
end
|
||||
end
|
||||
|
||||
@@ -798,7 +802,7 @@ local function CalcRibsToolPath( nCrvGrp, nTpathGrpId, LayerParams, dCorrZ)
|
||||
EgtRelocateGlob( tabRibs[i][1], tabRibs[i-1][1], GDB_IN.BEFORE)
|
||||
end
|
||||
|
||||
-- oriento tutte le passate relative ad una stessa costolatura
|
||||
-- oriento tutte le passate relative ad una stessa costolatura
|
||||
for j = 1, #tabRibs[i] do
|
||||
if ( bInvert and j % 2 == 1) or ( not bInvert and j % 2 == 0) then
|
||||
EgtInvertCurve( tabRibs[i][j])
|
||||
@@ -835,9 +839,12 @@ local function CalcRibsToolPath( nCrvGrp, nTpathGrpId, LayerParams, dCorrZ)
|
||||
EgtErase( nFakeLink)
|
||||
end
|
||||
end
|
||||
|
||||
-- se necessario collego le diverse costolature
|
||||
if LayerParams.bRibsLink then
|
||||
for i = 1, #tabRibs - 1 do
|
||||
for i = 1, #tabRibs - 1 do
|
||||
local bLink1 = EgtGetInfo( tabRibs[i][1], KEY_RIBS_LINK, 'b')
|
||||
local bLink2 = EgtGetInfo( tabRibs[i + 1][1], KEY_RIBS_LINK, 'b')
|
||||
if bLink1 and bLink2 then
|
||||
local nCnt = #tabRibs[i]
|
||||
CalcRibsLink( tabRibs[i][nCnt], tabRibs[i + 1][1], nLoopGrp, LayerParams.dStrand, false, LayerParams.vtSlicing, nGrpTmp)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user