3dPrinting :
- correzione gestione percorsi con diverse passate.
This commit is contained in:
+6
-31
@@ -265,7 +265,7 @@ local function AdjustRibsOffsetForIntersection2Shells( nCrv1, nCrv2, LayerParams
|
||||
EgtErase( vCopy1[i])
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--------------------------------------------------------------------
|
||||
local function HandleRibsIntersections( nRibsGrp, LayerParams, nOffsGrp, nRibsPathGrp, bAllTwoStrands)
|
||||
|
||||
@@ -379,7 +379,6 @@ local function ReorderRibs( nGrp, bInvertOrder, dStrand, nMaxNbr)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------------------
|
||||
@@ -543,8 +542,6 @@ local function ReorderRibsInters2Shells( nOffsGrp, dStrand)
|
||||
ReassignInfo( nCrv, nCnt, vCopy)
|
||||
end
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------
|
||||
local function CalcRibsPaths( nSliceGrp, nRibsGrp, LayerParams, nIdx, nMaxStrandDiff)
|
||||
|
||||
@@ -781,7 +778,7 @@ local function UpdateTotalShellSurf( nSrf, nCrv, dStrand, nGrpId)
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
local function JoinAndReorderExtraShells( nPathGrp, dStrand, vPtStart)
|
||||
local function ReorderExtraShells( nPathGrp, dStrand, vPtStart)
|
||||
|
||||
local vIds = EgtGetNameInGroup( nPathGrp, EXTRA_SHELL_CRV .. '*')
|
||||
if not vIds then return end
|
||||
@@ -858,28 +855,6 @@ local function JoinAndReorderExtraShells( nPathGrp, dStrand, vPtStart)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- verifico se posso realizzare percorsi chiusi
|
||||
for i = 1, k do
|
||||
local vIds = EgtGetNameInGroup( nPathGrp, EXTRA_SHELL_CRV .. tostring(i))
|
||||
if #vIds == 2 then
|
||||
local ptS = EgtSP( vIds[1])
|
||||
local ptE = EgtEP( vIds[2])
|
||||
if dist( ptS, ptE) < 1.5 * dStrand then
|
||||
EgtAddCurveCompoLine( vIds[1], EgtSP( vIds[2]))
|
||||
EgtAddCurveCompoCurve( vIds[1], vIds[2])
|
||||
EgtCloseCurveCompo( vIds[1])
|
||||
-- modifico lo start point
|
||||
ModifyStartPoint( vIds[1], vPtStart)
|
||||
-- ripristino se necessario orientamento antiorario
|
||||
if EgtGetInfo( vIds[1], KEY_INVERTED_CURVE, 'b') then
|
||||
EgtInvertCurve( vIds[1])
|
||||
EgtSetInfo( vIds[1], KEY_INVERTED_CURVE, 0)
|
||||
end
|
||||
EgtSetInfo( vIds[1], KEY_CLOSED_EXTRA_SHELL, 1)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------
|
||||
@@ -917,7 +892,7 @@ local function VerifyExtraShellPath( nCrv, nGrpId, vtSlicing, dStrand)
|
||||
EgtRelocateGlob( nCrv, nGrpId, GDB_IN.LAST_SON)
|
||||
EgtErase( nGrpTmp)
|
||||
end
|
||||
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
@@ -977,7 +952,7 @@ local function CalcExtraShellsPath( nMaxShellNbrDiff, nShellNbrGrp, nCrvGrpId, d
|
||||
for j = nCrvT + 1, nTrimCrv + nTrimCnt - 1 do
|
||||
EgtErase( j)
|
||||
end
|
||||
JoinAndReorderExtraShells( nGrpId, LayerParams.dStrand, vPtStart)
|
||||
ReorderExtraShells( nGrpId, LayerParams.dStrand, vPtStart)
|
||||
return
|
||||
end
|
||||
else
|
||||
@@ -993,8 +968,8 @@ local function CalcExtraShellsPath( nMaxShellNbrDiff, nShellNbrGrp, nCrvGrpId, d
|
||||
end
|
||||
|
||||
-- riordino le curve appena create e se possibile creo percorsi chiusi
|
||||
JoinAndReorderExtraShells( nGrpId, LayerParams.dStrand, vPtStart)
|
||||
|
||||
ReorderExtraShells( nGrpId, LayerParams.dStrand, vPtStart)
|
||||
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user