DataWindow :
- prima correzione ferramenta nel caso di vasistas.
This commit is contained in:
@@ -4078,11 +4078,11 @@ end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
-- funzione che disegna la maniglia
|
||||
local function DrawHandle( nPartId, nOutlineId, sHandleSide, dHandleH, nSolidLayerId)
|
||||
local function DrawHandle( nPartId, nOutlineId, sHandleSide, dHandleH, nSolidLayerId, bVasistas)
|
||||
|
||||
-- dati della maniglia
|
||||
local dRad1 = 40
|
||||
local dRad2 = 19
|
||||
local dBase1 = EgtIf( bVasistas, 20, 40)
|
||||
local dBase2 = EgtIf( bVasistas, 20, 19)
|
||||
local dH = 9
|
||||
local dLen1 = 53
|
||||
local dLen2 = 115
|
||||
@@ -4107,7 +4107,7 @@ local function DrawHandle( nPartId, nOutlineId, sHandleSide, dHandleH, nSolidLay
|
||||
-- punto su cui centrare la maniglia
|
||||
local ptC = ptRef + ( dHandleH + dGapHardware) * vtRef + dDeltaIn * vtDirIn
|
||||
|
||||
local nCrv1 = EgtRectangle2P( nSolidLayerId, ptC - dRad1 * Y_AX() - dRad2 * X_AX(), ptC + dRad1 * Y_AX() + dRad2 * X_AX())
|
||||
local nCrv1 = EgtRectangle2P( nSolidLayerId, ptC - dBase1 * Y_AX() - dBase2 * X_AX(), ptC + dBase1 * Y_AX() + dBase2 * X_AX())
|
||||
local nStm1 = EgtSurfTmByRegionExtrusion( nSolidLayerId, {nCrv1}, dH * Z_AX())
|
||||
|
||||
local nCrv2 = EgtLinePVL( nSolidLayerId, ORIG(), X_AX(), dLen1 - dFillet)
|
||||
@@ -4129,12 +4129,20 @@ end
|
||||
-- funzione che disegna la ferramenta
|
||||
local function DrawSashHardware( nAreaId, nRefAreaId, nSolidLayerId)
|
||||
|
||||
local nOpeningType = EgtGetInfo( nAreaId, WIN_OPENING_TYPE, 'i')
|
||||
local bVasistas = ( nOpeningType == WIN_OPENING_TYPES.TILTONLY_TOP)
|
||||
|
||||
-- recupero pezzi interessati dalla ferramenta
|
||||
local nOutlineLayId = EgtGetFirstNameInGroup( nAreaId, WIN_OUTLINE)
|
||||
local nLeftId = EgtGetFirstNameInGroup( nOutlineLayId, WIN_LEFT)
|
||||
local nLeftPartId = EgtGetInfo( nLeftId, WIN_REF_PART, 'i')
|
||||
local nRightId = EgtGetFirstNameInGroup( nOutlineLayId, WIN_RIGHT)
|
||||
if bVasistas then
|
||||
nLeftId = EgtGetFirstNameInGroup( nOutlineLayId, WIN_BOTTOM)
|
||||
nRightId = EgtGetFirstNameInGroup( nOutlineLayId, WIN_TOP)
|
||||
end
|
||||
local nLeftPartId = EgtGetInfo( nLeftId, WIN_REF_PART, 'i')
|
||||
local nRightPartId = EgtGetInfo( nRightId, WIN_REF_PART, 'i')
|
||||
|
||||
|
||||
local nSashType = EgtGetInfo( nAreaId, WIN_SASHTYPE, 'i')
|
||||
-- se anta ricevente solo cerniere
|
||||
@@ -4153,22 +4161,26 @@ local function DrawSashHardware( nAreaId, nRefAreaId, nSolidLayerId)
|
||||
-- recupero i dati della maniglia
|
||||
local sHandleSide = EgtGetInfo( nRefAreaId, WIN_HDW_HANDLE) or 'Sx'
|
||||
local dHandleH = 500
|
||||
local vOptions = EgtGetInfo( nRefAreaId, WIN_HDW_OPTIONS, 'vs') or {}
|
||||
for i = 1, #vOptions do
|
||||
local vString = EgtSplitString( vOptions[i], '=')
|
||||
if #vString == 2 and vString[1] == WIN_HDW_HANDLE_HEIGHT then
|
||||
dHandleH = tonumber( vString[2])
|
||||
break
|
||||
if bVasistas then
|
||||
dHandleH = 0.5 * EgtCurveLength( nLeftId)
|
||||
else
|
||||
local vOptions = EgtGetInfo( nRefAreaId, WIN_HDW_OPTIONS, 'vs') or {}
|
||||
for i = 1, #vOptions do
|
||||
local vString = EgtSplitString( vOptions[i], '=')
|
||||
if #vString == 2 and vString[1] == WIN_HDW_HANDLE_HEIGHT then
|
||||
dHandleH = tonumber( vString[2])
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if sHandleSide == 'Sx' then
|
||||
-- maniglia su right e cerniere su left
|
||||
DrawHandle( nRightPartId, nRightId, sHandleSide, dHandleH, nSolidLayerId)
|
||||
DrawHandle( nRightPartId, nRightId, sHandleSide, dHandleH, nSolidLayerId, bVasistas)
|
||||
DrawHinges( nLeftId, nSolidLayerId)
|
||||
else
|
||||
-- maniglia su left e cerniere su right
|
||||
DrawHandle( nLeftPartId, nLeftId, sHandleSide, dHandleH, nSolidLayerId)
|
||||
DrawHandle( nLeftPartId, nLeftId, sHandleSide, dHandleH, nSolidLayerId, bVasistas)
|
||||
DrawHinges( nRightId, nSolidLayerId)
|
||||
end
|
||||
end
|
||||
@@ -4268,11 +4280,21 @@ local function SearchSash( nAreaId, SashList)
|
||||
local nProfileId = EgtGetFirstNameInGroup( GDB_ID.ROOT, WIN_PROFILE, 'i')
|
||||
local nFrameProfileId = EgtGetFirstNameInGroup( nProfileId, WIN_FRAME, 'i')
|
||||
local nFrameProfileTypeId = EgtGetFirstNameInGroup( nFrameProfileId, sProfileType, 'i')
|
||||
local dGapDeltaOut = EgtGetInfo( nFrameProfileTypeId, WIN_GAPDELTAOUT, 'd')
|
||||
local dFrameGapDeltaZ = EgtGetInfo( nFrameProfileTypeId, WIN_GAPDELTAZ, 'd')
|
||||
local dGapDeltaOut = EgtGetInfo( nFrameProfileTypeId, WIN_GAPDELTAOUT, 'd')
|
||||
-- se deriva da split verifico il lato
|
||||
if EgtGetName( nSouId) == WIN_SPLIT then
|
||||
-- se dervia da split verifico il lato
|
||||
if not AreSameVectorApprox( EgtSV( nSouId), EgtSV( nBaseOutlineId)) then
|
||||
local bSameDir = AreSameVectorApprox( EgtSV( nSouId), EgtSV( nBaseOutlineId))
|
||||
if not dGapDeltaOut then
|
||||
-- recupero informazione dal lato corretto ( split orizzontale)
|
||||
if bSameDir then
|
||||
dGapDeltaOut = EgtGetInfo( nFrameProfileTypeId, WIN_GAPDELTAOUT .. '2', 'd')
|
||||
else
|
||||
dGapDeltaOut = EgtGetInfo( nFrameProfileTypeId, WIN_GAPDELTAOUT .. '1', 'd')
|
||||
end
|
||||
end
|
||||
-- verifico il segno dell'offset
|
||||
if not bSameDir then
|
||||
dGapDeltaOut = - dGapDeltaOut
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user