3dPrinting :

- in spiral vase corretto errore su punti di inizio non coincidenti tra layer consecutivi.
This commit is contained in:
SaraP
2025-04-29 11:54:32 +02:00
parent ad44ff7c5a
commit 29f1243c91
+9 -2
View File
@@ -2097,6 +2097,10 @@ local function SpiralVase( vLayIds, LayerParams)
end
else
local ptOld = EgtEP( nOldId, GDB_ID.ROOT)
if nRealLayer == 2 then
-- aggiusto la quota per confronto sensato
ptOld = ptOld - 0.5 * LayerParams.dLayHeight * LayerParams.vtSlicing
end
local ptNew = EgtSP( nNewEntId, GDB_ID.ROOT)
-- modifico la curva per avere una transizione più uniforme tra i due layers
if EgtCurveCompoRadius( nNewEntId, 0) == -1 and dist( ptOld, ptNew) / EgtCurveCompoLength( nNewEntId, 0) < s_dSpiralVaseTanTol then
@@ -2111,19 +2115,22 @@ local function SpiralVase( vLayIds, LayerParams)
-- la rendo coerente con il toolpath
EgtMove( nGuideId, vtMove + LayerParams.dLayHeight * LayerParams.vtSlicing, GDB_RT.GLOB)
if LayerParams.bInvert then
EgtInvertCurve( nGuideId)
EgtInvertCurve( nGuideId)
end
-- modifico i punti iniziali affinchè coincidano con il punto finale del percorso precedente
EgtChangeClosedCurveStartPoint( nGuideId, ptOld, GDB_RT.GLOB)
EgtChangeClosedCurveStartPoint( nNewEntId, ptOld, GDB_RT.GLOB)
EgtSpiralizeCurveAlongGuide( nNewEntId, nGuideId)
-- forzo il punto di inizio a coincidere con il layer precedente ( non è garantito dallo spiralize con il path a causa dell'approx
-- con gli archi che potrebbe modificare il punto finale del tpath rispetto a quello del path associato)
EgtModifyCurveStartPoint( nNewEntId, ptOld, GDB_RT.GLOB)
EgtErase( nGuideId)
end
end
-- approssimo
local ptS = EgtSP( nNewEntId, GDB_ID.ROOT)
EgtCopyGlob( nNewEntId, nPathGrpId)
EgtApproxCurve( nNewEntId, GDB_CA.ARCS, s_dApproxTol)
if EgtCurveIsClosed( nNewEntId) then
EgtChangeClosedCurveStartPoint( nNewEntId, ptS, GDB_RT.GLOB)