3dPrinting 2.6d1 :

- sistemati fillet per setti anche nel caso di ribs-merged shells
- correzioni varie.
This commit is contained in:
SaraP
2024-04-16 09:58:54 +02:00
parent cfe7de8123
commit baaf137cb4
3 changed files with 118 additions and 11 deletions
+13 -7
View File
@@ -390,7 +390,7 @@ local function AddRetraction( nCrvId, vtSlicing, dCoastingLen, dWipeLen, dWipeDi
-- curva ausiliaria per generare correttamente wipe
local nCopyId = EgtCopyGlob( nCrvId, nCrvId, GDB_IN.AFTER)
if not EgtCurveIsClosed( nCopyId) then
if not EgtCurveIsClosed( nCopyId) and EgtCurveIsFlat( nCopyId) then
local ptNewStart = EgtEP( nCopyId, GDB_ID.ROOT)
-- mi posiziono in un frame locale per fare i conti
local nGrp = EgtGroup( EgtGetParent( nCrvId), Frame3d( ORIG(), vtSlicing), GDB_RT.GLOB)
@@ -400,10 +400,12 @@ local function AddRetraction( nCrvId, vtSlicing, dCoastingLen, dWipeLen, dWipeDi
if nInters > 0 then
-- caso con sovrapposizione
nCopyId, nCrvCnt = EgtSplitCurveAtSelfInters( nCopyId)
for nIdx = 1, nCrvCnt - 2 do
EgtAddCurveCompoCurve( nCopyId, nCopyId + nIdx)
if nCrvCnt > 1 then
for nIdx = 1, nCrvCnt - 2 do
EgtAddCurveCompoCurve( nCopyId, nCopyId + nIdx)
end
EgtErase( nCopyId + nCrvCnt - 1)
end
EgtErase( nCopyId + nCrvCnt - 1)
end
EgtCloseCurveCompo( nCopyId)
EgtChangeClosedCurveStartPoint( nCopyId, ptNewStart, GDB_RT.GLOB)
@@ -1064,6 +1066,10 @@ end
--------------------------------------------------------------------
local function AddFillet( nCrv1, nCrv2, dFillet, vtSlicing)
if dFillet < GEO.EPS_SMALL then
return
end
local nRefPosId = EgtGetPrev( nCrv1)
local nRefGrpId = EgtGetParent( nCrv1)
local vsInfo1 = EgtGetAllInfo( nCrv1)
@@ -1091,7 +1097,7 @@ local function AddFillet( nCrv1, nCrv2, dFillet, vtSlicing)
EgtAddCurveCompoArcTg( nCrv1, EgtEP( nNewFillet, GDB_ID.ROOT), true, GDB_RT.GLOB)
EgtErase( nNewFillet)
else
-- nCrv1 viene sostutuita completamente dal fillet
-- nCrv1 viene sostituita completamente dal fillet
local nNewCrv = EgtCurveCompo( nRefGrpId, {nNewFillet})
-- riposiziono dopo il precedente di nCrv1 ( se esiste) oppure in testa al gruppo
if nRefPosId ~= GDB_ID.NULL then
@@ -1113,7 +1119,7 @@ local function AddFillet( nCrv1, nCrv2, dFillet, vtSlicing)
EgtAddCurveCompoArcTg( nCrv2, EgtSP( nNewFillet + 1, GDB_ID.ROOT), false, GDB_RT.GLOB)
EgtErase( nNewFillet + 1)
else
-- nCrv2 viene sostutuita completamente dal fillet
-- nCrv2 viene sostituita completamente dal fillet
local nNewCrv = EgtCurveCompo( nRefGrpId, {nNewFillet + 1})
EgtRelocateGlob( nNewCrv, nCrv1, GDB_IN.AFTER)
EgtChangeId( nNewCrv, nCrv2)
@@ -1977,7 +1983,7 @@ end
--------------------------------------------------------------------
local function AddSpiralVaseLeadOut( nOldId, LayerParams)
if LayerParams.nLeadOutType ~= LEAD_TYPE.NONE then
if LayerParams.nLeadOutType ~= LEAD_TYPE.NONE then
EgtTrimCurveEndAtLen( nOldId, EgtCurveLength( nOldId) - LayerParams.dOffsetLP)
local nLeadOut = AddLeadOut( nOldId, LayerParams, EgtGetParent( nOldId))
if nLeadOut then