3dPrinting :

- corretto errore reduced shell number di area nulla.
This commit is contained in:
SaraP
2023-06-08 10:34:42 +02:00
parent 4225985a61
commit bc3cf3b3a9
2 changed files with 47 additions and 17 deletions
+15 -3
View File
@@ -170,6 +170,10 @@ local function SliceStm( vIds, nLayId, vtSlicing, nType, sName, sNameGrp, tabPar
local dDeltaZ = EgtGetInfo( nLayId, KEY_SLICE_DELTAZ, 'd')
local nLayCnt = EgtGetInfo( nLayId, KEY_SLICE_NBR, 'i')
-- gruppo temporaneo per approx curve
local frloc = Frame3d( ORIG(), vtSlicing)
local nGrpTmp = EgtGroup( nLayId, frloc, GDB_RT.GLOB)
for i = 1, #vIds do
-- verifico che oggetto sia trimesh
local nTypeObj = EgtGetType( vIds[i])
@@ -211,7 +215,12 @@ local function SliceStm( vIds, nLayId, vtSlicing, nType, sName, sNameGrp, tabPar
for nId = nNewId + nPntCnt, nNewId + nPntCnt + nCrvCnt - 1 do
table.insert( vChain, nId)
end
local nChainId, nCnt = EgtCurveCompoByChain( nGrp, vChain, ORIG(), true, GDB_RT.LOC, BIG_TOLER)
local nChainId, nCnt = EgtCurveCompoByChain( nGrp, vChain, ORIG(), true, GDB_RT.LOC, TOLER)
if not nChainId then
-- se fallisce riprendo le curve originali
nChainId = nNewId + nPntCnt
nCnt = nCrvCnt
end
-- rinomino le curve, correggo di DeltaZ e assegno parametri
for nId = nChainId, nChainId + nCnt - 1 do
EgtSetName( nId, sName .. tostring( i))
@@ -222,8 +231,11 @@ local function SliceStm( vIds, nLayId, vtSlicing, nType, sName, sNameGrp, tabPar
EgtSetInfo( nId, sKey, sVal)
end
end
EgtModifyCurveExtrusion( nId, vtSlicing)
EgtModifyCurveExtrusion( nId, vtSlicing, GDB_RT.GLOB)
EgtRelocateGlob( nId, nGrpTmp)
EgtApproxCurve( nId, GDB_CA.ARCS, MID_TOLER)
EgtRelocateGlob( nId, nGrp)
-- se ho ancora curve aperte, segnalo errore
if nType ~= TYPE.RIB and nType ~= TYPE.INFILL and not EgtCurveIsClosed( nId) then
EgtOutLog( 'Error : hole in object (layer '.. EgtNumToString( nLayCnt) ..') - CalcSlices')
@@ -243,7 +255,7 @@ local function SliceStm( vIds, nLayId, vtSlicing, nType, sName, sNameGrp, tabPar
if not EgtGetFirstInGroup( nGrp) then
EgtErase( nGrp)
end
EgtErase( nGrpTmp)
end
--------------------------------------------------------------------