- in BeamLib e correlate modificata AddPhaseWithRawParts per funzionare con overlap dei pezzi per nesting obliquo

This commit is contained in:
luca.mazzoleni
2026-05-19 12:47:21 +02:00
parent 608f8da033
commit 3ba456f72f
3 changed files with 32 additions and 19 deletions
+17 -4
View File
@@ -161,17 +161,30 @@ function BeamLib.GetPartSplittingPoints( Part)
end
-------------------------------------------------------------------------------------------------------------
function BeamLib.AddPhaseWithRawParts( idRaw, OriXR, PosXR, dDeltaSucc)
function BeamLib.AddPhaseWithRawParts( PARTS, nPartIndex, OriXR, PosXR, dDeltaSucc)
local Part = PARTS[nPartIndex]
local nPhase = EgtAddPhase()
-- si aprono i limiti tavola per permettere rotazioni di pezzi più larghi della tavola
EgtSetTableAreaOffset( 2000, 2000, 2000, 2000)
local dRawMove = 0
local dRawMove = dDeltaSucc
local bFirstRaw = true
local idRaw = Part.idRaw
while idRaw do
local dPosX = 0
for i = 1, #PARTS do
local CurrentPart = PARTS[i]
if CurrentPart.idRaw == idRaw then
dPosX = CurrentPart.dPosX
end
end
if bFirstRaw then
bFirstRaw = false
else
dRawMove = dDeltaSucc + dPosX
end
EgtKeepRawPart( idRaw)
EgtMoveToCornerRawPart( idRaw, OriXR, PosXR)
EgtMoveRawPart( idRaw, Vector3d( - dRawMove, 0, 0))
if dRawMove == 0 then dRawMove = dRawMove + dDeltaSucc end
dRawMove = dRawMove + EgtGetRawPartBBox( idRaw):getDimX()
idRaw = EgtGetNextRawPart( idRaw)
end
-- salvo info nuova fase aggiunta