04853e26fe
- correzione scelta profili per calcolo Delta - aggiunti posizionamenti dowel per bottom rail - correzione ricerca prev e next dell'outline per split - aggiunta verifica esistenza file su import profilo - aggiunto fix ordine outline su area - cambiate path da cartella Window a EgwWindowLua - aggiunto dialogo di scelta file su open
590 lines
27 KiB
Lua
590 lines
27 KiB
Lua
--
|
|
-- EEEEEEEEEE GGGGGG TTTTTTTTTTTTTT
|
|
-- EEEEEEEEEE GGGGGGGGGG TTTTTTTTTTTTTT
|
|
-- EEEE GGGG GGGG TTTT
|
|
-- EEEE GGGG TTTT
|
|
-- EEEEEEE GGGG GGGGGGG TTTT
|
|
-- EEEEEEE GGGG GGGGGGG TTTT
|
|
-- EEEE GGGG GGGG TTTT
|
|
-- EEEE GGGG GGGG TTTT
|
|
-- EEEEEEEEEE GGGGGGGGGG TTTT
|
|
-- EEEEEEEEEE GGGGGG TTTT
|
|
--
|
|
-- by Egalware s.r.l.
|
|
-- Window project software by Egalware s.r.l. 2023/05/02
|
|
|
|
require( 'EgtBase')
|
|
_ENV = EgtProtectGlobal()
|
|
EgtEnableDebug( true)
|
|
-- EgtEnableDebug( false)
|
|
|
|
-- Imposto direttorio per librerie
|
|
local sBaseDir = EgtGetSourceDir()
|
|
EgtOutLog("BaseDir=" .. sBaseDir)
|
|
EgtAddToPackagePath( sBaseDir .. '?.lua')
|
|
EgtAddToPackagePath( sBaseDir .. 'WinLib\\' .. '?.lua')
|
|
|
|
_G.package.loaded.WinConst = nil
|
|
require( 'WinConst')
|
|
_G.package.loaded.WinCreate = nil
|
|
local WinCreate = require( 'WinCreate')
|
|
_G.package.loaded.WinCalculate = nil
|
|
local WinCalculate = require( 'WinCalculate')
|
|
_G.package.loaded.WinManageProject = nil
|
|
local WinManageProject = require( 'WinManageProject')
|
|
|
|
------------------------------------------- PARAMETERS -------------------------------------------
|
|
local DebugCode = false
|
|
|
|
local HoleWidth = 1835
|
|
local HoleHeight = 1516
|
|
|
|
local WindowWidth = 1800
|
|
local WindowHeight = 1500
|
|
|
|
local WindowTree
|
|
|
|
local sProfilePath = 'c:\\EgtData\\EgwWindowLua\\Profiles\\Profilo78 - Offset.nge'
|
|
|
|
------------------------------------------- ************** -------------------------------------------
|
|
|
|
-- ciclo principale
|
|
|
|
EgtStartCounter()
|
|
|
|
EgtNewFile()
|
|
|
|
-- importo profilo prescelto
|
|
WinCreate.ImportProfile( sProfilePath)
|
|
|
|
local sFileName = ''
|
|
|
|
-- creo telaio rettangolare
|
|
sFileName = 'Rect_'
|
|
local FrameJointType = WIN_JNT.FULL_H
|
|
local nFrameId = WinCreate.CreateFrame( WindowWidth, WindowHeight, FrameJointType, FrameJointType, FrameJointType, FrameJointType)
|
|
|
|
-- -- creo telaio generico
|
|
-- sFileName = 'RoundArc_'
|
|
-- local nDrawFramePartId = EgtGroup( GDB_ID.ROOT)
|
|
-- EgtSetName( nDrawFramePartId, 'DrawFrame')
|
|
-- local nDrawFrameLayerId = EgtGroup( nDrawFramePartId)
|
|
-- local nFrameBottomId = EgtLine( nDrawFrameLayerId, Point3d( 0, 0, 0), Point3d( WindowWidth, 0, 0))
|
|
-- local nFrameRightId = EgtLine( nDrawFrameLayerId, Point3d( WindowWidth, 0, 0), Point3d( WindowWidth, WindowHeight, 0))
|
|
-- local nFrameTopId = EgtArc2PV( nDrawFrameLayerId, Point3d( WindowWidth, WindowHeight, 0), Point3d( 0, WindowHeight, 0), Vector3d( 0, 1, 0))
|
|
-- --local nFrameTopId = EgtLine( nDrawFrameLayerId, Point3d( WindowWidth, WindowHeight, 0), Point3d( 0, WindowHeight, 0))
|
|
-- local nFrameLeftId = EgtLine( nDrawFrameLayerId, Point3d( 0, WindowHeight, 0), Point3d( 0, 0, 0))
|
|
-- local FrameJointType = WIN_JNT.FULL_H
|
|
-- local nFrameId = WinCreate.CreateGenFrame( nFrameBottomId, nFrameRightId, nFrameTopId, nFrameLeftId, FrameJointType, FrameJointType, FrameJointType, FrameJointType)
|
|
|
|
------------------------ Finestra vetro fisso ------------------------
|
|
|
|
-- sFileName = sFileName .. 'FixedGlass'
|
|
|
|
-- -- aggiungo zoccolo
|
|
-- WinCreate.AddBottomRail( nFrameId)
|
|
-- -- aggiungo vetro
|
|
-- local nFillId = WinCreate.AddFill( nFrameId, WIN_FILLTYPES.GLASS)
|
|
|
|
------------------------ Finestra vetro fisso con divisione orizzontale ------------------------
|
|
|
|
-- sFileName = sFileName .. 'FixedGlass_HorizontalSplit'
|
|
|
|
-- -- aggiungo zoccolo
|
|
-- WinCreate.AddBottomRail( nFrameId)
|
|
|
|
-- -- definisco prima divisione
|
|
-- local nArea1Id, nArea2Id = WinCreate.AddSplit( nFrameId, WIN_SPLITORIENTATION.HORIZONTAL, WIN_MEASURE.ABSOLUT, WindowHeight / 2)
|
|
|
|
-- -- aggiungo vetri
|
|
-- local nFill1Id = WinCreate.AddFill( nArea1Id, WIN_FILLTYPES.GLASS)
|
|
-- local nFill2Id = WinCreate.AddFill( nArea2Id, WIN_FILLTYPES.GLASS)
|
|
|
|
------------------------ Finestra vetro fisso con divisione verticale ------------------------
|
|
|
|
-- sFileName = sFileName .. 'FixedGlass_VerticalSplit'
|
|
|
|
-- -- aggiungo zoccolo
|
|
-- WinCreate.AddBottomRail( nFrameId)
|
|
|
|
-- -- definisco prima divisione
|
|
-- local nArea1Id, nArea2Id = WinCreate.AddSplit( nFrameId, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 2)
|
|
|
|
-- -- aggiungo vetri
|
|
-- local nFill1Id = WinCreate.AddFill( nArea1Id, WIN_FILLTYPES.GLASS)
|
|
-- local nFill2Id = WinCreate.AddFill( nArea2Id, WIN_FILLTYPES.GLASS)
|
|
|
|
------------------------ Finestra vetro fisso con divisione orizzontale e verticale ------------------------
|
|
|
|
--sFileName = sFileName .. 'FixedGlass_Vertical&HorizontalSplit'
|
|
--
|
|
---- aggiungo zoccolo
|
|
--WinCreate.AddBottomRail( nFrameId)
|
|
--
|
|
---- definisco divisioni
|
|
--local nArea1Id, nArea2Id = WinCreate.AddSplit( nFrameId, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 2)
|
|
--local nArea11Id, nArea12Id = WinCreate.AddSplit( nArea1Id, WIN_SPLITORIENTATION.HORIZONTAL, WIN_MEASURE.ABSOLUT, WindowHeight / 2)
|
|
--local nArea21Id, nArea22Id = WinCreate.AddSplit( nArea2Id, WIN_SPLITORIENTATION.HORIZONTAL, WIN_MEASURE.ABSOLUT, WindowHeight / 2)
|
|
--
|
|
---- aggiungo vetri
|
|
--local nFill1Id = WinCreate.AddFill( nArea11Id, WIN_FILLTYPES.GLASS)
|
|
--local nFill2Id = WinCreate.AddFill( nArea12Id, WIN_FILLTYPES.GLASS)
|
|
--local nFill3Id = WinCreate.AddFill( nArea21Id, WIN_FILLTYPES.GLASS)
|
|
--local nFill4Id = WinCreate.AddFill( nArea22Id, WIN_FILLTYPES.GLASS)
|
|
|
|
------------------------ Finestra anta singola ------------------------
|
|
|
|
-- sFileName = sFileName .. 'Sash'
|
|
|
|
-- -- aggiungo anta
|
|
-- local SashJointType = WIN_JNT.FULL_V
|
|
-- local nSashId = WinCreate.AddSash( nFrameId, SashJointType, SashJointType, SashJointType, SashJointType)
|
|
|
|
-- -- aggiungo vetro
|
|
-- local nFillId = WinCreate.AddFill( nSashId, WIN_FILLTYPES.GLASS)
|
|
|
|
------------------------ Finestra anta singola con divisione orizzontale ------------------------
|
|
|
|
-- sFileName = sFileName .. 'Sash_HorizontalSplit'
|
|
|
|
-- -- aggiungo anta
|
|
-- local SashJointType = WIN_JNT.FULL_V
|
|
-- local nSashId = WinCreate.AddSash( nFrameId, SashJointType, SashJointType, SashJointType, SashJointType)
|
|
|
|
-- -- definisco prima divisione
|
|
-- local nArea1Id, nArea2Id = WinCreate.AddSplit( nSashId, WIN_SPLITORIENTATION.HORIZONTAL, WIN_MEASURE.ABSOLUT, WindowHeight / 3)
|
|
|
|
-- -- aggiungo vetri
|
|
-- local nFill1Id = WinCreate.AddFill( nArea1Id, WIN_FILLTYPES.GLASS)
|
|
-- local nFill2Id = WinCreate.AddFill( nArea2Id, WIN_FILLTYPES.GLASS)
|
|
|
|
------------------------ Finestra anta singola con divisione verticale ------------------------
|
|
|
|
-- sFileName = sFileName .. 'Sash_VerticalSplit'
|
|
|
|
-- -- aggiungo anta
|
|
-- local SashJointType = WIN_JNT.FULL_V
|
|
-- local nSashId = WinCreate.AddSash( nFrameId, SashJointType, SashJointType, SashJointType, SashJointType)
|
|
|
|
-- -- definisco prima divisione
|
|
-- local nArea1Id, nArea2Id = WinCreate.AddSplit( nSashId, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 2)
|
|
|
|
-- -- aggiungo vetri
|
|
-- local nFill1Id = WinCreate.AddFill( nArea1Id, WIN_FILLTYPES.GLASS)
|
|
-- local nFill2Id = WinCreate.AddFill( nArea2Id, WIN_FILLTYPES.GLASS)
|
|
|
|
------------------------ Finestra anta singola con divisione orizzontale e verticale ------------------------
|
|
|
|
-- sFileName = sFileName .. 'Sash_Vertical&HorizontalSplit'
|
|
|
|
-- -- aggiungo anta
|
|
-- local SashJointType = WIN_JNT.FULL_V
|
|
-- local nSashId = WinCreate.AddSash( nFrameId, SashJointType, SashJointType, SashJointType, SashJointType)
|
|
|
|
-- -- definisco divisioni
|
|
-- local nArea1Id, nArea2Id = WinCreate.AddSplit( nSashId, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 2)
|
|
-- local nArea11Id, nArea12Id = WinCreate.AddSplit( nArea1Id, WIN_SPLITORIENTATION.HORIZONTAL, WIN_MEASURE.ABSOLUT, WindowHeight / 2)
|
|
-- local nArea21Id, nArea22Id = WinCreate.AddSplit( nArea2Id, WIN_SPLITORIENTATION.HORIZONTAL, WIN_MEASURE.ABSOLUT, WindowHeight / 2)
|
|
|
|
-- -- aggiungo vetri
|
|
-- local nFill1Id = WinCreate.AddFill( nArea11Id, WIN_FILLTYPES.GLASS)
|
|
-- local nFill2Id = WinCreate.AddFill( nArea12Id, WIN_FILLTYPES.GLASS)
|
|
-- local nFill3Id = WinCreate.AddFill( nArea21Id, WIN_FILLTYPES.GLASS)
|
|
-- local nFill4Id = WinCreate.AddFill( nArea22Id, WIN_FILLTYPES.GLASS)
|
|
|
|
------------------------ Finestra doppia anta con montante verticale ------------------------
|
|
|
|
-- sFileName = sFileName .. 'DoubleVerticalSash_Mullion'
|
|
|
|
-- -- definisco prima divisione
|
|
-- local nArea1Id, nArea2Id = WinCreate.AddSplit( nFrameId, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 2)
|
|
|
|
-- -- aggiungo prima anta
|
|
-- local SashJointType = WIN_JNT.FULL_V
|
|
-- local nSash1Id = WinCreate.AddSash( nArea1Id, SashJointType, SashJointType, SashJointType, SashJointType)
|
|
|
|
-- -- aggiungo vetro
|
|
-- local nFill1Id = WinCreate.AddFill( nSash1Id, WIN_FILLTYPES.GLASS)
|
|
|
|
-- -- aggiungo seconda anta
|
|
-- local nSash2Id = WinCreate.AddSash( nArea2Id, SashJointType, SashJointType, SashJointType, SashJointType)
|
|
|
|
-- -- aggiungo vetro
|
|
-- local nFill2Id = WinCreate.AddFill( nSash2Id, WIN_FILLTYPES.GLASS)
|
|
|
|
------------------------ Finestra doppia anta battente ricevente ------------------------
|
|
|
|
-- sFileName = sFileName .. 'DoubleVerticalSash_French'
|
|
|
|
-- -- definisco prima divisione
|
|
-- local nArea1Id, nArea2Id = WinCreate.AddSplit( nFrameId, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 2, _, WIN_SPLITTYPES.FRENCH)
|
|
|
|
-- -- aggiungo prima anta
|
|
-- local SashJointType = WIN_JNT.FULL_V
|
|
-- local nSash1Id = WinCreate.AddSash( nArea1Id, SashJointType, SashJointType, SashJointType, SashJointType, WIN_SASHTYPES.INACTIVE)
|
|
|
|
-- -- aggiungo vetro
|
|
-- local nFill1Id = WinCreate.AddFill( nSash1Id, WIN_FILLTYPES.GLASS)
|
|
|
|
-- -- aggiungo seconda anta
|
|
-- local nSash2Id = WinCreate.AddSash( nArea2Id, SashJointType, SashJointType, SashJointType, SashJointType, WIN_SASHTYPES.ACTIVE)
|
|
|
|
-- -- aggiungo vetro
|
|
-- local nFill2Id = WinCreate.AddFill( nSash2Id, WIN_FILLTYPES.GLASS)
|
|
|
|
------------------------ Finestra doppia anta con montante orizzontale ------------------------
|
|
|
|
--sFileName = sFileName .. 'DoubleHorizontalSash_Mullion'
|
|
--
|
|
---- definisco prima divisione
|
|
--local nArea1Id, nArea2Id = WinCreate.AddSplit( nFrameId, WIN_SPLITORIENTATION.HORIZONTAL, WIN_MEASURE.ABSOLUT, WindowHeight / 2)
|
|
--
|
|
---- aggiungo prima anta
|
|
--local SashJointType = WIN_JNT.FULL_V
|
|
--local nSash1Id = WinCreate.AddSash( nArea1Id, SashJointType, SashJointType, SashJointType, SashJointType)
|
|
--
|
|
---- aggiungo vetro
|
|
--local nFill1Id = WinCreate.AddFill( nSash1Id, WIN_FILLTYPES.GLASS)
|
|
--
|
|
---- aggiungo seconda anta
|
|
--local nSash2Id = WinCreate.AddSash( nArea2Id, SashJointType, SashJointType, SashJointType, SashJointType)
|
|
--
|
|
---- aggiungo vetro
|
|
--local nFill2Id = WinCreate.AddFill( nSash2Id, WIN_FILLTYPES.GLASS)
|
|
|
|
------------------------ Finestra tripla anta con montanti verticali ------------------------
|
|
|
|
-- sFileName = sFileName .. 'TripleVerticalSash_Mullion'
|
|
|
|
-- -- definisco prima divisione
|
|
-- local nArea1Id, nArea2Id = WinCreate.AddSplit( nFrameId, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 3)
|
|
|
|
-- -- definisco seconda divisione
|
|
-- local nArea2Id, nArea3Id = WinCreate.AddSplit( nArea2Id, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 3)
|
|
|
|
-- -- aggiungo prima anta
|
|
-- local SashJointType = WIN_JNT.FULL_V
|
|
-- local nSash1Id = WinCreate.AddSash( nArea1Id, SashJointType, SashJointType, SashJointType, SashJointType)
|
|
|
|
-- -- aggiungo vetro
|
|
-- local nFill1Id = WinCreate.AddFill( nSash1Id, WIN_FILLTYPES.GLASS)
|
|
|
|
-- -- aggiungo seconda anta
|
|
-- local nSash2Id = WinCreate.AddSash( nArea2Id, SashJointType, SashJointType, SashJointType, SashJointType)
|
|
|
|
-- -- aggiungo vetro
|
|
-- local nFill2Id = WinCreate.AddFill( nSash2Id, WIN_FILLTYPES.GLASS)
|
|
|
|
-- -- aggiungo terza anta
|
|
-- local nSash3Id = WinCreate.AddSash( nArea3Id, SashJointType, SashJointType, SashJointType, SashJointType)
|
|
|
|
-- -- aggiungo vetro
|
|
-- local nFill3Id = WinCreate.AddFill( nSash3Id, WIN_FILLTYPES.GLASS)
|
|
|
|
------------------------ Finestra tripla anta con montante verticale e ante battente e ricevente ------------------------
|
|
|
|
-- sFileName = sFileName .. 'TripleVerticalSash_Mullion&French'
|
|
|
|
-- -- definisco prima divisione
|
|
-- local nArea1Id, nArea2Id = WinCreate.AddSplit( nFrameId, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 3)
|
|
|
|
-- -- definisco seconda divisione
|
|
-- local nArea2Id, nArea3Id = WinCreate.AddSplit( nArea2Id, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 3, _, WIN_SPLITTYPES.FRENCH)
|
|
|
|
-- -- aggiungo prima anta
|
|
-- local SashJointType = WIN_JNT.FULL_V
|
|
-- local nSash1Id = WinCreate.AddSash( nArea1Id, SashJointType, SashJointType, SashJointType, SashJointType)
|
|
|
|
-- -- aggiungo vetro
|
|
-- local nFill1Id = WinCreate.AddFill( nSash1Id, WIN_FILLTYPES.GLASS)
|
|
|
|
-- -- aggiungo seconda anta
|
|
-- local nSash2Id = WinCreate.AddSash( nArea2Id, SashJointType, SashJointType, SashJointType, SashJointType, WIN_SASHTYPES.INACTIVE)
|
|
|
|
-- -- aggiungo vetro
|
|
-- local nFill2Id = WinCreate.AddFill( nSash2Id, WIN_FILLTYPES.GLASS)
|
|
|
|
-- -- aggiungo terza anta
|
|
-- local nSash3Id = WinCreate.AddSash( nArea3Id, SashJointType, SashJointType, SashJointType, SashJointType, WIN_SASHTYPES.ACTIVE)
|
|
|
|
-- -- aggiungo vetro
|
|
-- local nFill3Id = WinCreate.AddFill( nSash3Id, WIN_FILLTYPES.GLASS)
|
|
|
|
------------------------ Finestra tripla anta con montanti orizzontali ------------------------
|
|
|
|
-- -- definisco prima divisione
|
|
-- local nArea1Id, nArea2Id = WinCreate.AddSplit( nFrameId, WIN_SPLITORIENTATION.HORIZONTAL, WIN_MEASURE.ABSOLUT, WindowHeight / 3)
|
|
|
|
-- -- definisco seconda divisione
|
|
-- local nArea2Id, nArea3Id = WinCreate.AddSplit( nArea2Id, WIN_SPLITORIENTATION.HORIZONTAL, WIN_MEASURE.ABSOLUT, WindowHeight / 3)
|
|
|
|
-- -- aggiungo prima anta
|
|
-- local SashJointType = WIN_JNT.FULL_V
|
|
-- local nSash1Id = WinCreate.AddSash( nArea1Id, SashJointType, SashJointType, SashJointType, SashJointType)
|
|
|
|
-- -- aggiungo vetro
|
|
-- local nFill1Id = WinCreate.AddFill( nSash1Id, WIN_FILLTYPES.GLASS)
|
|
|
|
-- -- aggiungo seconda anta
|
|
-- local nSash2Id = WinCreate.AddSash( nArea2Id, SashJointType, SashJointType, SashJointType, SashJointType)
|
|
|
|
-- -- aggiungo vetro
|
|
-- local nFill2Id = WinCreate.AddFill( nSash2Id, WIN_FILLTYPES.GLASS)
|
|
|
|
-- -- aggiungo terza anta
|
|
-- local nSash3Id = WinCreate.AddSash( nArea3Id, SashJointType, SashJointType, SashJointType, SashJointType)
|
|
|
|
-- -- aggiungo vetro
|
|
-- local nFill3Id = WinCreate.AddFill( nSash3Id, WIN_FILLTYPES.GLASS)
|
|
|
|
------------------------ Finestra tripla anta con montante orizzontale e verticale ------------------------
|
|
|
|
--sFileName = sFileName .. 'TripleVertical&HorizontalSash_Mullion'
|
|
--
|
|
---- definisco prima divisione
|
|
--local nArea1Id, nArea2Id = WinCreate.AddSplit( nFrameId, WIN_SPLITORIENTATION.HORIZONTAL, WIN_MEASURE.ABSOLUT, WindowHeight / 2)
|
|
--
|
|
---- definisco seconda divisione
|
|
--local nArea2Id, nArea3Id = WinCreate.AddSplit( nArea2Id, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 2)
|
|
--
|
|
---- aggiungo prima anta
|
|
--local SashJointType = WIN_JNT.FULL_V
|
|
--local nSash1Id = WinCreate.AddSash( nArea1Id, SashJointType, SashJointType, SashJointType, SashJointType)
|
|
---- aggiungo vetro
|
|
--local nFill1Id = WinCreate.AddFill( nSash1Id, WIN_FILLTYPES.GLASS)
|
|
--
|
|
---- aggiungo seconda anta
|
|
--local nSash2Id = WinCreate.AddSash( nArea2Id, SashJointType, SashJointType, SashJointType, SashJointType)
|
|
---- aggiungo vetro
|
|
--local nFill2Id = WinCreate.AddFill( nSash2Id, WIN_FILLTYPES.GLASS)
|
|
--
|
|
---- aggiungo terza anta
|
|
--local nSash3Id = WinCreate.AddSash( nArea3Id, SashJointType, SashJointType, SashJointType, SashJointType)
|
|
---- aggiungo vetro
|
|
--local nFill3Id = WinCreate.AddFill( nSash3Id, WIN_FILLTYPES.GLASS)
|
|
|
|
------------------------ Finestra sei ante con montanti verticali e orizzontale ------------------------
|
|
|
|
-- sFileName = sFileName .. 'SixSash_Vertical&HorizontalMullion'
|
|
|
|
-- -- definisco divisione orizzontale
|
|
-- local nArea1Id, nArea2Id = WinCreate.AddSplit( nFrameId, WIN_SPLITORIENTATION.HORIZONTAL, WIN_MEASURE.ABSOLUT, WindowHeight / 2)
|
|
|
|
-- -- definisco divisioni verticali
|
|
-- local nArea11Id, nArea12Id = WinCreate.AddSplit( nArea1Id, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 3)
|
|
-- local nArea12Id, nArea13Id = WinCreate.AddSplit( nArea12Id, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 3)
|
|
-- local nArea21Id, nArea23Id = WinCreate.AddSplit( nArea2Id, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 3)
|
|
-- local nArea21Id, nArea22Id = WinCreate.AddSplit( nArea21Id, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 3)
|
|
|
|
-- -- aggiungo prima anta
|
|
-- local SashJointType = WIN_JNT.FULL_V
|
|
-- local nSash1Id = WinCreate.AddSash( nArea11Id, SashJointType, SashJointType, SashJointType, SashJointType)
|
|
-- -- aggiungo vetro
|
|
-- local nFill1Id = WinCreate.AddFill( nSash1Id, WIN_FILLTYPES.GLASS)
|
|
|
|
-- -- aggiungo seconda anta
|
|
-- local nSash2Id = WinCreate.AddSash( nArea12Id, SashJointType, SashJointType, SashJointType, SashJointType)
|
|
-- -- aggiungo vetro
|
|
-- local nFill2Id = WinCreate.AddFill( nSash2Id, WIN_FILLTYPES.GLASS)
|
|
|
|
-- -- aggiungo terza anta
|
|
-- local nSash3Id = WinCreate.AddSash( nArea13Id, SashJointType, SashJointType, SashJointType, SashJointType)
|
|
-- -- aggiungo vetro
|
|
-- local nFill3Id = WinCreate.AddFill( nSash3Id, WIN_FILLTYPES.GLASS)
|
|
|
|
-- -- aggiungo quarta anta
|
|
-- local nSash4Id = WinCreate.AddSash( nArea21Id, SashJointType, SashJointType, SashJointType, SashJointType)
|
|
-- -- aggiungo vetro
|
|
-- local nFill4Id = WinCreate.AddFill( nSash4Id, WIN_FILLTYPES.GLASS)
|
|
|
|
-- -- aggiungo quinta anta
|
|
-- local nSash5Id = WinCreate.AddSash( nArea22Id, SashJointType, SashJointType, SashJointType, SashJointType)
|
|
-- -- aggiungo vetro
|
|
-- local nFill5Id = WinCreate.AddFill( nSash5Id, WIN_FILLTYPES.GLASS)
|
|
|
|
-- -- aggiungo sesta anta
|
|
-- local nSash6Id = WinCreate.AddSash( nArea23Id, SashJointType, SashJointType, SashJointType, SashJointType)
|
|
-- -- aggiungo vetro
|
|
-- local nFill6Id = WinCreate.AddFill( nSash6Id, WIN_FILLTYPES.GLASS)
|
|
|
|
------------------------ Finestra sei ante con montanti verticale e orizzontali ------------------------
|
|
|
|
sFileName = sFileName .. 'SixSash_Vertical&HorizontalMullion2'
|
|
|
|
-- definisco divisioni verticali
|
|
local nArea1Id, nArea2Id = WinCreate.AddSplit( nFrameId, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 3)
|
|
local nArea2Id, nArea3Id = WinCreate.AddSplit( nArea2Id, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 3)
|
|
|
|
-- definisco divisione orizzontali
|
|
local nArea11Id, nArea12Id = WinCreate.AddSplit( nArea1Id, WIN_SPLITORIENTATION.HORIZONTAL, WIN_MEASURE.ABSOLUT, WindowHeight / 2)
|
|
local nArea21Id, nArea22Id = WinCreate.AddSplit( nArea2Id, WIN_SPLITORIENTATION.HORIZONTAL, WIN_MEASURE.ABSOLUT, WindowHeight / 2)
|
|
local nArea31Id, nArea32Id = WinCreate.AddSplit( nArea3Id, WIN_SPLITORIENTATION.HORIZONTAL, WIN_MEASURE.ABSOLUT, WindowHeight / 2)
|
|
|
|
-- aggiungo prima anta
|
|
local SashJointType = WIN_JNT.FULL_V
|
|
local nSash1Id = WinCreate.AddSash( nArea11Id, SashJointType, SashJointType, SashJointType, SashJointType)
|
|
-- aggiungo vetro
|
|
local nFill1Id = WinCreate.AddFill( nSash1Id, WIN_FILLTYPES.GLASS)
|
|
|
|
-- aggiungo seconda anta
|
|
local nSash2Id = WinCreate.AddSash( nArea12Id, SashJointType, SashJointType, SashJointType, SashJointType)
|
|
-- aggiungo vetro
|
|
local nFill2Id = WinCreate.AddFill( nSash2Id, WIN_FILLTYPES.GLASS)
|
|
|
|
-- aggiungo terza anta
|
|
local nSash3Id = WinCreate.AddSash( nArea21Id, SashJointType, SashJointType, SashJointType, SashJointType)
|
|
-- aggiungo vetro
|
|
local nFill3Id = WinCreate.AddFill( nSash3Id, WIN_FILLTYPES.GLASS)
|
|
|
|
-- aggiungo quarta anta
|
|
local nSash4Id = WinCreate.AddSash( nArea22Id, SashJointType, SashJointType, SashJointType, SashJointType)
|
|
-- aggiungo vetro
|
|
local nFill4Id = WinCreate.AddFill( nSash4Id, WIN_FILLTYPES.GLASS)
|
|
|
|
-- aggiungo quinta anta
|
|
local nSash5Id = WinCreate.AddSash( nArea31Id, SashJointType, SashJointType, SashJointType, SashJointType)
|
|
-- aggiungo vetro
|
|
local nFill5Id = WinCreate.AddFill( nSash5Id, WIN_FILLTYPES.GLASS)
|
|
|
|
-- aggiungo sesta anta
|
|
local nSash6Id = WinCreate.AddSash( nArea32Id, SashJointType, SashJointType, SashJointType, SashJointType)
|
|
-- aggiungo vetro
|
|
local nFill6Id = WinCreate.AddFill( nSash6Id, WIN_FILLTYPES.GLASS)
|
|
|
|
------------------------ Finestra sei ante con montante verticale e orizzontale ed ante battente ricevente ------------------------
|
|
|
|
-- -- definisco divisione orizzontale
|
|
-- local nArea1Id, nArea2Id = WinCreate.AddSplit( nFrameId, WIN_SPLITORIENTATION.HORIZONTAL, WIN_MEASURE.ABSOLUT, WindowHeight / 2)
|
|
|
|
-- -- definisco divisioni verticali
|
|
-- local nArea11Id, nArea12Id = WinCreate.AddSplit( nArea1Id, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 3)
|
|
-- local nArea12Id, nArea13Id = WinCreate.AddSplit( nArea12Id, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 3, _, WIN_SPLITTYPES.FRENCH)
|
|
-- local nArea21Id, nArea23Id = WinCreate.AddSplit( nArea2Id, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 3)
|
|
-- local nArea21Id, nArea22Id = WinCreate.AddSplit( nArea21Id, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 3, _, WIN_SPLITTYPES.FRENCH)
|
|
|
|
-- -- aggiungo prima anta
|
|
-- local SashJointType = WIN_JNT.FULL_V
|
|
-- local nSash1Id = WinCreate.AddSash( nArea11Id, SashJointType, SashJointType, SashJointType, SashJointType)
|
|
-- -- aggiungo vetro
|
|
-- local nFill1Id = WinCreate.AddFill( nSash1Id, WIN_FILLTYPES.GLASS)
|
|
|
|
-- -- aggiungo seconda anta
|
|
-- local nSash2Id = WinCreate.AddSash( nArea12Id, SashJointType, SashJointType, SashJointType, SashJointType, WIN_SASHTYPES.INACTIVE)
|
|
-- -- aggiungo vetro
|
|
-- local nFill2Id = WinCreate.AddFill( nSash2Id, WIN_FILLTYPES.GLASS)
|
|
|
|
-- -- aggiungo terza anta
|
|
-- local nSash3Id = WinCreate.AddSash( nArea13Id, SashJointType, SashJointType, SashJointType, SashJointType, WIN_SASHTYPES.ACTIVE)
|
|
-- -- aggiungo vetro
|
|
-- local nFill3Id = WinCreate.AddFill( nSash3Id, WIN_FILLTYPES.GLASS)
|
|
|
|
-- -- aggiungo quarta anta
|
|
-- local nSash4Id = WinCreate.AddSash( nArea21Id, SashJointType, SashJointType, SashJointType, SashJointType, WIN_SASHTYPES.INACTIVE)
|
|
-- -- aggiungo vetro
|
|
-- local nFill4Id = WinCreate.AddFill( nSash4Id, WIN_FILLTYPES.GLASS)
|
|
|
|
-- -- aggiungo quinta anta
|
|
-- local nSash5Id = WinCreate.AddSash( nArea22Id, SashJointType, SashJointType, SashJointType, SashJointType, WIN_SASHTYPES.ACTIVE)
|
|
-- -- aggiungo vetro
|
|
-- local nFill5Id = WinCreate.AddFill( nSash5Id, WIN_FILLTYPES.GLASS)
|
|
|
|
-- -- aggiungo sesta anta
|
|
-- local nSash6Id = WinCreate.AddSash( nArea23Id, SashJointType, SashJointType, SashJointType, SashJointType)
|
|
-- -- aggiungo vetro
|
|
-- local nFill6Id = WinCreate.AddFill( nSash6Id, WIN_FILLTYPES.GLASS)
|
|
|
|
------------------------ Finestra tre ante con montante verticale, ante battente ricevente e split di tutte le ante ------------------------
|
|
|
|
-- -- definisco prima divisione
|
|
-- local nArea1Id, nArea2Id = WinCreate.AddSplit( nFrameId, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 3)
|
|
|
|
-- -- definisco seconda divisione
|
|
-- local nArea2Id, nArea3Id = WinCreate.AddSplit( nArea2Id, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 3, _, WIN_SPLITTYPES.FRENCH)
|
|
|
|
-- -- aggiungo prima anta
|
|
-- local SashJointType = WIN_JNT.FULL_V
|
|
-- local nSash1Id = WinCreate.AddSash( nArea1Id, SashJointType, SashJointType, SashJointType, SashJointType)
|
|
-- -- definisco divisione
|
|
-- local nArea11Id, nArea12Id = WinCreate.AddSplit( nSash1Id, WIN_SPLITORIENTATION.HORIZONTAL, WIN_MEASURE.ABSOLUT, WindowHeight * 2 / 5)
|
|
-- -- aggiungo vetri
|
|
-- local nFill11Id = WinCreate.AddFill( nArea11Id, WIN_FILLTYPES.GLASS)
|
|
-- local nFill12Id = WinCreate.AddFill( nArea12Id, WIN_FILLTYPES.GLASS)
|
|
|
|
-- -- aggiungo seconda anta
|
|
-- local nSash2Id = WinCreate.AddSash( nArea2Id, SashJointType, SashJointType, SashJointType, SashJointType, WIN_SASHTYPES.INACTIVE)
|
|
-- -- definisco divisione
|
|
-- local nArea21Id, nArea22Id = WinCreate.AddSplit( nSash2Id, WIN_SPLITORIENTATION.HORIZONTAL, WIN_MEASURE.ABSOLUT, WindowHeight * 2 / 5)
|
|
-- -- aggiungo vetri
|
|
-- local nFill21Id = WinCreate.AddFill( nArea21Id, WIN_FILLTYPES.GLASS)
|
|
-- local nFill22Id = WinCreate.AddFill( nArea22Id, WIN_FILLTYPES.GLASS)
|
|
|
|
-- -- aggiungo terza anta
|
|
-- local nSash3Id = WinCreate.AddSash( nArea3Id, SashJointType, SashJointType, SashJointType, SashJointType, WIN_SASHTYPES.ACTIVE)
|
|
-- -- definisco divisione
|
|
-- local nArea31Id, nArea32Id = WinCreate.AddSplit( nSash3Id, WIN_SPLITORIENTATION.HORIZONTAL, WIN_MEASURE.ABSOLUT, WindowHeight * 2 / 5)
|
|
-- -- aggiungo vetri
|
|
-- local nFill31Id = WinCreate.AddFill( nArea31Id, WIN_FILLTYPES.GLASS)
|
|
-- local nFill32Id = WinCreate.AddFill( nArea32Id, WIN_FILLTYPES.GLASS)
|
|
|
|
------------------------ Finestra tre ante con montante orizzontale e verticale, ante battente ricevente e split di tutte le ante ------------------------
|
|
|
|
-- -- definisco prima divisione
|
|
-- local nArea1Id, nArea0Id = WinCreate.AddSplit( nFrameId, WIN_SPLITORIENTATION.HORIZONTAL, WIN_MEASURE.ABSOLUT, WindowHeight)
|
|
|
|
-- -- definisco prima divisione
|
|
-- local nArea1Id, nArea2Id = WinCreate.AddSplit( nArea1Id, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 3)
|
|
|
|
-- -- definisco seconda divisione
|
|
-- local nArea2Id, nArea3Id = WinCreate.AddSplit( nArea2Id, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 3, _, WIN_SPLITTYPES.FRENCH)
|
|
|
|
-- -- aggiungo anta sopra
|
|
-- local SashJointType = WIN_JNT.FULL_V
|
|
-- local nSash0Id = WinCreate.AddSash( nArea0Id, SashJointType, SashJointType, SashJointType, SashJointType)
|
|
-- -- aggiungo vetri
|
|
-- local nFill0Id = WinCreate.AddFill( nSash0Id, WIN_FILLTYPES.GLASS)
|
|
|
|
-- -- aggiungo prima anta
|
|
-- local SashJointType = WIN_JNT.FULL_V
|
|
-- local nSash1Id = WinCreate.AddSash( nArea1Id, SashJointType, SashJointType, SashJointType, SashJointType)
|
|
-- -- definisco divisione
|
|
-- local nArea11Id, nArea12Id = WinCreate.AddSplit( nSash1Id, WIN_SPLITORIENTATION.HORIZONTAL, WIN_MEASURE.ABSOLUT, WindowHeight * 2 / 5)
|
|
-- -- aggiungo vetri
|
|
-- local nFill11Id = WinCreate.AddFill( nArea11Id, WIN_FILLTYPES.GLASS)
|
|
-- local nFill12Id = WinCreate.AddFill( nArea12Id, WIN_FILLTYPES.GLASS)
|
|
|
|
-- -- aggiungo seconda anta
|
|
-- local nSash2Id = WinCreate.AddSash( nArea2Id, SashJointType, SashJointType, SashJointType, SashJointType, WIN_SASHTYPES.INACTIVE)
|
|
-- -- definisco divisione
|
|
-- local nArea21Id, nArea22Id = WinCreate.AddSplit( nSash2Id, WIN_SPLITORIENTATION.HORIZONTAL, WIN_MEASURE.ABSOLUT, WindowHeight * 2 / 5)
|
|
-- -- aggiungo vetri
|
|
-- local nFill21Id = WinCreate.AddFill( nArea21Id, WIN_FILLTYPES.GLASS)
|
|
-- local nFill22Id = WinCreate.AddFill( nArea22Id, WIN_FILLTYPES.GLASS)
|
|
|
|
-- -- aggiungo terza anta
|
|
-- local nSash3Id = WinCreate.AddSash( nArea3Id, SashJointType, SashJointType, SashJointType, SashJointType, WIN_SASHTYPES.ACTIVE)
|
|
-- -- definisco divisione
|
|
-- local nArea31Id, nArea32Id = WinCreate.AddSplit( nSash3Id, WIN_SPLITORIENTATION.HORIZONTAL, WIN_MEASURE.ABSOLUT, WindowHeight * 2 / 5)
|
|
-- -- aggiungo vetri
|
|
-- local nFill31Id = WinCreate.AddFill( nArea31Id, WIN_FILLTYPES.GLASS)
|
|
-- local nFill32Id = WinCreate.AddFill( nArea32Id, WIN_FILLTYPES.GLASS)
|
|
|
|
-----------------------------------------------------------------------------------
|
|
|
|
-- imposto se calcolare i solidi o meno
|
|
WinCalculate.SetCalcSolid( true)
|
|
|
|
-- creo i pezzi
|
|
local nFrameId = EgtGetFirstNameInGroup( GDB_ID.ROOT, WIN_AREAASTERISK)
|
|
WinCalculate.CreatePartFromArea( nFrameId)
|
|
|
|
-- salvo progetto su file
|
|
local sSaveDirPath = 'c:\\EgtData\\EgwWindowLua\\Projects'
|
|
local sSaveFilePath = sSaveDirPath .. '\\' .. sFileName
|
|
WinManageProject.WriteToFile( nFrameId, sSaveFilePath)
|
|
|
|
EgtZoom( SCE_ZM.ALL)
|
|
|
|
-- riporto tempi di esecuzione
|
|
local sOut = string.format( ' ExecTime = %.2f ms', EgtStopCounter())
|
|
EgtOutLog( sOut)
|