3dPrinting :

- aggiunta approssimazione delle curve dopo slicing ( per evitare caso di fallimento offset)
- migliorata segnalazione errori.
This commit is contained in:
SaraP
2023-06-06 17:11:09 +02:00
parent fcd61efd53
commit 4225985a61
2 changed files with 17 additions and 16 deletions
+12 -12
View File
@@ -2257,7 +2257,7 @@ local function CreateShellNbrSurfaces( nGrp, nShellsNbr)
end
else
EgtOutLog( 'Error: ReducedShellNumber is not closed (layer '.. EgtNumToString( s_nCurrIdx) ..') - CalcPaths')
table.insert( s_vErr, EgtNumToString( s_nCurrIdx) .. ' : ReducedShellNumber is not closed')
table.insert( s_vErr, 'layer ' .. EgtNumToString( s_nCurrIdx) .. ' : ReducedShellNumber is not closed')
end
nCrvId = EgtGetNextName( nCrvId, SHELL_NBR_CRV .. '*')
@@ -2295,7 +2295,7 @@ local function CreateShellNbrSurfaces( nGrp, nShellsNbr)
end
if not bOk then
EgtOutLog( 'Error: ReducedShellNumber is not considered (layer '.. EgtNumToString( s_nCurrIdx) ..') - CalcPaths')
table.insert( s_vErr, EgtNumToString( s_nCurrIdx) .. ' : ReducedShellNumber is not considered')
table.insert( s_vErr, 'layer ' .. EgtNumToString( s_nCurrIdx) .. ' : ReducedShellNumber is not considered')
end
end
EgtSetName( nSrfId, SHELL_NBR_SURF .. EgtNumToString( nDiff))
@@ -2618,11 +2618,11 @@ local function UpdateTrimSurfWithAuxSolidsOffset( nSrfSolid, nSrfBase, dStrand,
local bOk, bExists, nSrfOffs = ComputeSurfOffset( nSrfSolid, nCrvGrp, dStrand, vtSlicing)
if not bOk then
EgtOutLog( 'Error : creation of AuxSolid region for TotTrimSurfRegion failed (layer '.. EgtNumToString( s_nCurrIdx) ..') - CalcPaths')
table.insert( s_vErr, EgtNumToString( s_nCurrIdx) .. ' : error in computing region for internal elements')
table.insert( s_vErr, 'layer ' .. EgtNumToString( s_nCurrIdx) .. ' : error in computing region for internal elements')
elseif nSrfOffs then
if not EgtSurfFrSubtract( nSrfBase, nSrfOffs) then
EgtOutLog( 'Error : EgtSurfFrSubtract with AuxSolid for TotTrimSurfRegion failed (layer '.. EgtNumToString( s_nCurrIdx) ..') - CalcPaths')
table.insert( s_vErr, EgtNumToString( s_nCurrIdx) .. ' : error in computing region for internal elements')
table.insert( s_vErr, 'layer ' .. EgtNumToString( s_nCurrIdx) .. ' : error in computing region for internal elements')
end
EgtErase( nSrfOffs)
end
@@ -2694,7 +2694,7 @@ local function UpdateTrimSurfWithAuxSolidsZigZag( nAuxSolidsGrp, sName, nSrfBase
-- aggiorno la TotShellSurfForTrim
if not EgtSurfFrSubtract( nSrfBase, nSrfZigZag) then
EgtOutLog( 'Error : EgtSurfFrSubtract with AuxSolid for TotTrimSurfRegion failed (layer '.. EgtNumToString( s_nCurrIdx) ..') - CalcPaths')
table.insert( s_vErr, EgtNumToString( s_nCurrIdx) .. ' : error in computing region for internal elements')
table.insert( s_vErr, 'layer ' .. EgtNumToString( s_nCurrIdx) .. ' : error in computing region for internal elements')
end
end
EgtErase( nGrpTmp)
@@ -2852,7 +2852,7 @@ local function CalcAuxSolidsPaths( nSliceGrp, nSolidGrp, LayerParams, vPtStart)
end
else
EgtOutLog( 'Error : creation of AuxSolid region failed (layer '.. EgtNumToString( s_nCurrIdx) ..') - CalcPaths')
table.insert( s_vErr, EgtNumToString( s_nCurrIdx) .. ' : creation of AuxSolid region failed')
table.insert( s_vErr, 'layer ' .. EgtNumToString( s_nCurrIdx) .. ' : creation of AuxSolid region failed')
end
end
end
@@ -2931,7 +2931,7 @@ function CalcPaths.Exec( nPartId)
local bOk, bExists, nSrfId = ComputeSurfOffset( nSrf, nCrvGrpId, - dOffs, LayerParams.vtSlicing)
if not bOk then
EgtOutLog( 'Error : ExtOffset failed (layer '.. EgtNumToString( nIdx) ..') - CalcPaths')
table.insert( s_vErr, EgtNumToString( nIdx) .. ' : creation of OuterShell failed')
table.insert( s_vErr, 'layer ' .. EgtNumToString( nIdx) .. ' : creation of OuterShell failed')
elseif not bExists then
EgtOutLog( 'Warning : ExtOffset not possible (layer '.. EgtNumToString( nIdx) ..') - CalcPaths')
else
@@ -2956,7 +2956,7 @@ function CalcPaths.Exec( nPartId)
local bOk, bExists, nSrfId = ComputeSurfOffset( nSrf, nCrvGrpId, - dOffs, LayerParams.vtSlicing)
if not bOk then
EgtOutLog( 'Error : IntOffset failed (layer '.. EgtNumToString( nIdx) ..') - CalcPaths')
table.insert( s_vErr, EgtNumToString( nIdx) .. ' : creation of InnerShell failed')
table.insert( s_vErr, 'layer ' .. EgtNumToString( nIdx) .. ' : creation of InnerShell failed')
elseif not bExists then
EgtOutLog( 'Warning : IntOffset ' .. EgtNumToString( nInd) .. ' not possible (layer '.. EgtNumToString( nIdx) ..') - CalcPaths')
else
@@ -2969,7 +2969,7 @@ function CalcPaths.Exec( nPartId)
if not bPrevExists then
local sElement = EgtIf( nInd > 1, 'IntOffset ' .. EgtNumToString( nInd - 1), 'ExtOffset')
EgtOutLog( 'Error :' .. sElement .. ' failed (layer '.. EgtNumToString( nIdx) ..') - CalcPaths')
table.insert( s_vErr, EgtNumToString( nIdx) .. ' : creation of ' .. EgtIf( nInd > 1, 'InnerShell', 'OuterShell') .. ' failed')
table.insert( s_vErr, 'layer ' .. EgtNumToString( nIdx) .. ' : creation of ' .. EgtIf( nInd > 1, 'InnerShell', 'OuterShell') .. ' failed')
end
end
@@ -2986,7 +2986,7 @@ function CalcPaths.Exec( nPartId)
local bOkTrim, bExistsTrim, nSrfTrim = ComputeSurfOffset( nSrf, nCrvGrpId, - dSurfTrimOffs, LayerParams.vtSlicing)
if not bOkTrim then
EgtOutLog( 'Error : IntOffset for TotTrimSurfRegion failed (layer '.. EgtNumToString( nIdx) ..') - CalcPaths')
table.insert( s_vErr, EgtNumToString( nIdx) .. ' : error in computing region for internal elements')
table.insert( s_vErr, 'layer ' .. EgtNumToString( nIdx) .. ' : error in computing region for internal elements')
elseif bExistsTrim then
EgtSetName( nSrfTrim, TOT_SHELL_TRIM_SURF)
EgtSetStatus( nSrfTrim, GDB_ST.OFF)
@@ -2994,7 +2994,7 @@ function CalcPaths.Exec( nPartId)
-- se questo offset esiste ma il precedente no, allora il precedente è un errore da segnalare
if not bPrevExists then
EgtOutLog( 'Error : IntOffset' .. EgtNumToString( LayerParams.nShellsNbr - 1 - nMaxShellNbrDiff) .. ' failed (layer '.. EgtNumToString( nIdx) ..') - CalcPaths')
table.insert( s_vErr, EgtNumToString( nIdx) .. ' : creation of InnerShell failed')
table.insert( s_vErr, 'layer ' .. EgtNumToString( nIdx) .. ' : creation of InnerShell failed')
end
end
@@ -3039,7 +3039,7 @@ function CalcPaths.Exec( nPartId)
end
if #s_vErr > 0 then
EgtOutBox( 'CalcPath Error on layers :\n' .. table.concat( s_vErr, '\n'), 'Calculating Paths')
EgtOutBox( 'CalcPath Error on :\n' .. table.concat( s_vErr, '\n'), 'Calculating Paths')
end
return true