3dPrinting 2.5d4 :

- corretto errore nel calcolo del lead out per setti.
This commit is contained in:
SaraP
2023-04-20 12:03:45 +02:00
parent 3c839716f8
commit 02fe05d5e1
2 changed files with 18 additions and 13 deletions
+17 -12
View File
@@ -770,26 +770,31 @@ local function VerifyRibsLead( nId, nRibId, dStrand, bInVsOut, nGrpTmp)
-- recupero il lead in
local nPrev = EgtGetPrev( nRibId)
if nPrev and EgtGetName( nPrev) == LEAD_IN_CRV then
local nSrfTot = EgtSurfFrFatCurve( EgtGetParent( nLeadId), nPrev, 0.5 * dStrand, false)
if nSrfTot then
local nRes = EgtCurveWithRegionClassify( nLeadId, nSrfTot)
if nRes == GDB_CRC.IN or nRes == GDB_CRC.INTERS then
EgtErase( nSrfTot)
EgtErase( nLeadId)
return false
end
else
nSrfTot = EgtSurfFrFatCurve( EgtGetParent( nLeadId), nLeadId, 0.5 * dStrand, false)
-- il caso critico è quando hanno direzioni opposte
local vtSPrev = EgtSV( nPrev, GDB_ID.ROOT)
local vtSCurr = EgtSV( nLeadId, GDB_ID.ROOT)
if AreOppositeVectorApprox( vtSPrev, vtSCurr) then
local nSrfTot = EgtSurfFrFatCurve( EgtGetParent( nLeadId), nPrev, 0.5 * dStrand, false)
if nSrfTot then
local nRes = EgtCurveWithRegionClassify( nPrev, nSrfTot)
local nRes = EgtCurveWithRegionClassify( nLeadId, nSrfTot)
if nRes == GDB_CRC.IN or nRes == GDB_CRC.INTERS then
EgtErase( nSrfTot)
EgtErase( nLeadId)
return false
end
else
nSrfTot = EgtSurfFrFatCurve( EgtGetParent( nLeadId), nLeadId, 0.5 * dStrand, false)
if nSrfTot then
local nRes = EgtCurveWithRegionClassify( nPrev, nSrfTot)
if nRes == GDB_CRC.IN or nRes == GDB_CRC.INTERS then
EgtErase( nSrfTot)
EgtErase( nLeadId)
return false
end
end
end
EgtErase( nSrfTot)
end
EgtErase( nSrfTot)
end
end