From 20b11b968147370c95f06fc3f1e3ad375e31ca00 Mon Sep 17 00:00:00 2001 From: SaraP Date: Wed, 29 Jul 2026 14:46:24 +0200 Subject: [PATCH] Window : - correzioni sui frame ferramenta. --- Designing/WinLib/WinCalculate.lua | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/Designing/WinLib/WinCalculate.lua b/Designing/WinLib/WinCalculate.lua index f05ace8..c781bcd 100644 --- a/Designing/WinLib/WinCalculate.lua +++ b/Designing/WinLib/WinCalculate.lua @@ -8587,14 +8587,14 @@ local function SearchSash( nAreaId, SashList) local nOutlineId = EgtGetFirstInGroup( nOutlineLayerId) while nOutlineId do local nSashProfileId = GetOutlineProfileId( nOutlineId) + local b3Profile = GetProfileLocalBox( nSashProfileId) local dGapDelta = EgtGetInfo( nSashProfileId, WIN_GAPDELTA, 'd') local nOutlineCopyId = EgtCopy( nOutlineId, nOutlineOffsetLayerId) - EgtOffsetCurve( nOutlineCopyId, - dGapDelta) + EgtOffsetCurve( nOutlineCopyId, b3Profile:getMax():getX() - dGapDelta) table.insert( vOutlineCopy, nOutlineCopyId) -- setto info ausiliarie sulla curva EgtSetInfo( nOutlineCopyId, 'ORIG', nOutlineId) CopyInfo( nOutlineCopyId, nSashProfileId, WIN_GAPDELTAZ) - local b3Profile = GetProfileLocalBox( nSashProfileId) EgtSetInfo( nOutlineCopyId, WIN_GAPDELTAZ .. 2, b3Profile:getDimY()) nOutlineId = EgtGetNext( nOutlineId) end @@ -8625,22 +8625,24 @@ local function SearchSash( nAreaId, SashList) local nSouId = EgtGetInfo( vOutlineCopy[i], WIN_SOU_OUTLINE, 'i') -- ricavo aria lato telaio local nFrameProfileId = GetOutlineProfileId( abs( nSouId)) + local b3FrameProfile = GetProfileLocalBox( nFrameProfileId) + local dOffs local dGapDeltaOut = EgtGetInfo( nFrameProfileId, WIN_GAPDELTA, 'd') - if not dGapDeltaOut then + if dGapDeltaOut then + dOffs = b3FrameProfile:getMin():getX() + dGapDeltaOut + else -- recupero informazione dal lato corretto ( split orizzontale) if nSouId > 0 then dGapDeltaOut = EgtGetInfo( nFrameProfileId, WIN_GAPDELTA .. '2', 'd') + dOffs = b3FrameProfile:getMin():getX() + dGapDeltaOut else dGapDeltaOut = EgtGetInfo( nFrameProfileId, WIN_GAPDELTA .. '1', 'd') + dOffs = b3FrameProfile:getMax():getX() - dGapDeltaOut end end - -- verifico il segno dell'offset - if nSouId < 0 then - dGapDeltaOut = - dGapDeltaOut - end local nOutlineOutId = EgtCopy( abs( nSouId), nOutlineOffsetLayerId) - EgtOffsetCurve( nOutlineOutId, - dGapDeltaOut) + EgtOffsetCurve( nOutlineOutId, dOffs) -- recupero origine come proiezione sul telaio dell'origine dell'anta local _, ptOrigFr = EgtPointCurveDist( ptOrig, nOutlineOutId) if bSlide then @@ -8656,7 +8658,7 @@ local function SearchSash( nAreaId, SashList) local nFT2Id = EgtFrame( nHdwFrameLayerId, Frame3d( ptOrigFr - dFrameGapDeltaZ * Z_AX(), - vtDir, vtDir ^ vtFrameIn, vtFrameIn)) EgtSetName( nFT2Id, sOrigName .. '.FT2') table.insert( tFrame, nFT2Id) - local b3FrameProfile = GetProfileLocalBox( nFrameProfileId) + local dGapDeltaZ2 = b3FrameProfile:getDimY() local nFT3Id = EgtFrame( nHdwFrameLayerId, Frame3d( ptOrigFr - dGapDeltaZ2 * Z_AX(), - vtDir, vtDir ^ -Z_AX(), -Z_AX())) EgtSetName( nFT3Id, sOrigName .. '.FT3')