Files
egwwindowlua/Profiles/Main.lua
T
Emmanuele Sassi a550ccc3ed Primo commit:
- progettazione serramenti rettangolari , ad arco e di forma generica
- gestione vetrifissi, ante, divisioni, montanti, ante battenti e riceventi
- costruzione solidi
- scrittura e lettura file jwd
- inizio creazione test
- inizio gestione spine
2023-12-12 16:30:52 +01:00

645 lines
30 KiB
Lua

--
-- EEEEEEEEEE GGGGGG WW WW WW
-- EEEEEEEEEE GGGGGGGGGG WW WW WW
-- EEEE GGGG GGGG WW WW WW
-- EEEE GGGG WWW WWWW WWW
-- EEEEEEE GGGG GGGGGGG WW WWWW WW
-- EEEEEEE GGGG GGGGGGG WWW WWWW WWW
-- EEEE GGGG GGGG WWWW WWWW
-- EEEE GGGG GGGG WWWW WWWW
-- EEEEEEEEEE GGGGGGGGGG WWW WWW
-- EEEEEEEEEE GGGGGG WW WW
--
-- 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\\Window\\Profiles\\Profilo78 - Offset.nge'
------------------------------------------- ************** -------------------------------------------
-- ciclo principale
EgtStartCounter()
EgtNewFile()
-- importo profilo prescelto
WinCreate.ImportProfile( sProfilePath)
-- creo telaio rettangolare
local FrameJointType = WIN_JNT.FULL_H
local nFrameId = WinCreate.CreateFrame( WindowWidth, WindowHeight, FrameJointType, FrameJointType, FrameJointType, FrameJointType)
-- -- creo telaio generico
-- 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.ANGLED
-- local nFrameId = WinCreate.CreateGenFrame( nFrameBottomId, nFrameRightId, nFrameTopId, nFrameLeftId, FrameJointType, FrameJointType, FrameJointType, FrameJointType)
------------------------ Finestra vetro fisso ------------------------
-- -- aggiungo zoccolo
-- WinCreate.AddBottomRail( nFrameId)
-- -- aggiungo vetro
-- local nFillId = WinCreate.AddFill( nFrameId, WIN_FILLTYPES.GLASS)
------------------------ Finestra vetro fisso con divisione orizzontale ------------------------
-- -- 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 ------------------------
-- -- 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 ------------------------
-- -- 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 ------------------------
-- 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 ------------------------
-- -- 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 ------------------------
-- -- 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 ------------------------
-- -- 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 anta singola con divisione custom ------------------------
-- -- aggiungo anta
-- local SashJointType = WIN_JNT.FULL_V
-- local nSashId = WinCreate.AddSash( nFrameId, SashJointType, SashJointType, SashJointType, SashJointType)
-- local nTempSplitLayerId = EgtGroup( nFrameId)
-- EgtSetName( nTempSplitLayerId, WIN_TEMPSPLIT)
-- -- creo decoro
-- local nRectangleId = EgtRectangle2P( nTempSplitLayerId, Point3d( WindowWidth / 3, WindowHeight / 3, 0), Point3d( WindowWidth * 2 / 3, WindowHeight * 2 / 3, 0))
-- -- definisco prima divisione
-- local nArea1Id, nArea2Id = WinCreate.AddGenSplit( nSashId, nRectangleId)
-- EgtErase( nTempSplitLayerId)
-- -- aggiungo vetri
-- local nFill1Id = WinCreate.AddFill( nArea1Id, WIN_FILLTYPES.GLASS)
-- local nFill2Id = WinCreate.AddFill( nArea2Id, WIN_FILLTYPES.GLASS)
------------------------ Finestra doppia anta con montante verticale ------------------------
-- -- 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 ------------------------
-- -- 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 ------------------------
-- -- 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 ------------------------
-- -- 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 ------------------------
-- -- 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 ------------------------
-- -- 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 ------------------------
-- -- 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 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)
-----------------------------------------------------------------------------------
-- -- creo gruppo frame
-- local nFrameLayerId = EgtGroup( GDB_ID.ROOT)
-- EgtSetName( nFrameLayerId, WIN_FRAME)
-- local nOutlineLayerId = EgtGroup( nFrameLayerId)
-- EgtSetName( nOutlineLayerId, WIN_OUTLINE)
-- -- disegno outline
-- local nFrameBottomId = EgtLine( nOutlineLayerId, Point3d( 0, 0, 0), Point3d( WindowWidth, 0, 0))
-- EgtSetName( nFrameBottomId, WIN_BOTTOM)
-- local nFrameRightId = EgtLine( nOutlineLayerId, Point3d( WindowWidth, 0, 0), Point3d( WindowWidth, WindowHeight, 0))
-- EgtSetName( nFrameRightId, WIN_RIGHT)
-- local nFrameTopId = EgtLine( nOutlineLayerId, Point3d( WindowWidth, WindowHeight, 0), Point3d( 0, WindowHeight, 0), Vector3d( -1, 0.5, 0))
-- EgtSetName( nFrameTopId, WIN_TOP)
-- local nFrameLeftId = EgtLine( nOutlineLayerId, Point3d( 0, WindowHeight, 0), Point3d( 0, 0, 0))
-- EgtSetName( nFrameLeftId, WIN_LEFT)
-- -- cerchio
-- local nFrameBottomId = EgtArcC2P( nOutlineLayerId, Point3d( WindowHeight / 2, WindowHeight / 2, 0), Point3d( 0, 0, 0), Point3d( WindowWidth, 0, 0))
-- EgtSetName( nFrameBottomId, WIN_BOTTOM)
-- local nFrameRightId = EgtArcC2P( nOutlineLayerId, Point3d( WindowHeight / 2, WindowHeight / 2, 0), Point3d( WindowWidth, 0, 0), Point3d( WindowWidth, WindowHeight, 0))
-- EgtSetName( nFrameRightId, WIN_RIGHT)
-- local nFrameTopId = EgtArcC2P( nOutlineLayerId, Point3d( WindowHeight / 2, WindowHeight / 2, 0), Point3d( WindowWidth, WindowHeight, 0), Point3d( 0, WindowHeight, 0))
-- EgtSetName( nFrameTopId, WIN_TOP)
-- local nFrameLeftId = EgtArcC2P( nOutlineLayerId, Point3d( WindowHeight / 2, WindowHeight / 2, 0), Point3d( 0, WindowHeight, 0), Point3d( 0, 0, 0))
-- EgtSetName( nFrameLeftId, WIN_LEFT)
-- -- disegno outline
-- local nFrameBottomId = EgtLine( nOutlineLayerId, Point3d( 0, 0, 0), Point3d( WindowWidth, 0, 0))
-- EgtSetName( nFrameBottomId, WIN_BOTTOM)
-- local nFrameRightId = EgtLine( nOutlineLayerId, Point3d( WindowWidth, 0, 0), Point3d( WindowWidth+400, WindowHeight, 0))
-- EgtSetName( nFrameRightId, WIN_RIGHT)
-- local nFrameTopId = EgtLine( nOutlineLayerId, Point3d( WindowWidth+400, WindowHeight, 0), Point3d( -200, WindowHeight-300, 0))
-- --local nFrameTopId = EgtArc2PV( nOutlineLayerId, Point3d( WindowWidth+400, WindowHeight, 0), Point3d( -200, WindowHeight-300, 0), Vector3d( -1, 0.5, 0))
-- --local nFirstArcId = EgtArc2PDEx(nOutlineLayerId,{-200,1220,0},{0,1700,0},GDB_PT.STD,-1,90,GDB_RT.GRID) -- Id=369
-- --local nFrameTopId = EgtCurveCompo(nOutlineLayerId,nFirstArcId,true) -- Id=369
-- --local nSecondArcId = EgtArc2PDEx(nOutlineLayerId,{0,1700,0},{1700,1900,0},GDB_PT.STD,-1,44.7603,GDB_RT.GRID) -- Id=370
-- --EgtAddCurveCompoCurve(nFrameTopId,nSecondArcId,true,true) -- Ok=1
-- --local nThirdArcId = EgtArc2PDEx(nOutlineLayerId,{1700,1900,0},{1930,1520,0},GDB_PT.STD,199,328.6594,GDB_RT.GRID) -- Id=370
-- --EgtAddCurveCompoCurve(nFrameTopId,nThirdArcId,true,true) -- Ok=1
-- --EgtInvertCurve( nFrameTopId)
-- --local nFrameTop1Id = EgtLine( nOutlineLayerId, Point3d( WindowWidth+400, WindowHeight, 0), Point3d( WindowWidth / 2, WindowHeight+100, 0))
-- --local nFrameTop2Id = EgtLine( nOutlineLayerId, Point3d( WindowWidth / 2, WindowHeight+100, 0), Point3d( -200, WindowHeight-300, 0))
-- --local nFrameTopId = EgtCurveCompo(nOutlineLayerId,nFrameTop1Id,true) -- Id=369
-- --EgtAddCurveCompoCurve(nFrameTopId,nFrameTop2Id,true,true) -- Ok=1
-- EgtSetName( nFrameTopId, WIN_TOP)
-- local nFrameLeftId = EgtLine( nOutlineLayerId, Point3d( -200, WindowHeight-300, 0), Point3d( 0, 0, 0))
-- EgtSetName( nFrameLeftId, WIN_LEFT)
-- -- scelgo tipo di giunzioni
-- local JointType = WIN_JNT.FULL_H
-- EgtSetInfo( nOutlineLayerId, WIN_JOINT_BL, JointType)
-- EgtSetInfo( nOutlineLayerId, WIN_JOINT_BR, JointType)
-- EgtSetInfo( nOutlineLayerId, WIN_JOINT_TL, JointType)
-- EgtSetInfo( nOutlineLayerId, WIN_JOINT_TR, JointType)
-- -- funzione che assegna i profili serramento ai vari outline
-- -- per il momento li assegno a mano
-- EgtSetInfo( nFrameBottomId, WIN_PROFILETYPE, WIN_SASH_BOTTOM)
-- EgtSetInfo( nFrameRightId, WIN_PROFILETYPE, WIN_SASH_TOP)
-- EgtSetInfo( nFrameTopId, WIN_PROFILETYPE, WIN_SASH_TOP)
-- EgtSetInfo( nFrameLeftId, WIN_PROFILETYPE, WIN_SASH_TOP)
-- -- definisco prima divisione
-- WinLib.AddSplit( nHoleLayerId, WIN_SPLITTYPE.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 2)
-- WinLib.AddSplit( nFrameLayerId, WIN_SPLITTYPE.HORIZONTAL, WIN_MEASURE.PROPORTIONAL, 2, 3)
--WinLib.AddSplits( nFrameLayerId, WIN_SPLITTYPE.VERTICAL, WIN_MEASURE.ABSOLUT, { WindowWidth / 5, WindowWidth / 3 * 2})
--WinLib.AddSplits( nFrameLayerId, WIN_SPLITTYPE.HORIZONTAL, WIN_MEASURE.PROPORTIONAL, { 1.5, 3}, 4.5)
-- local nSplitId = EgtLine( nOutlineLayerId, Point3d( 0, WindowHeight / 2, 0), Point3d( WindowWidth, WindowHeight / 4, 0))
-- local nArc1Id = EgtArc2PDEx( nOutlineLayerId, { 600, 1500, 0}, { 900, 800, 0}, GDB_PT.STD, -1, 270, GDB_RT.GRID) -- Id=301
-- local nSplitId = EgtCurveCompo( nOutlineLayerId, nArc1Id, true) -- Id=301
-- local nArc2Id = EgtArc2PDEx( nOutlineLayerId, { 900, 800, 0}, { 900, 0, 0}, GDB_PT.STD, -1, 316.3972, GDB_RT.GRID) -- Id=302
-- EgtAddCurveCompoCurve( nSplitId, nArc2Id, true, true) -- Ok=1
-- EgtInvertCurve( nSplitId)
-- WinLib.AddGenSplit( nFrameLayerId, nSplitId)
-- local nArea1Id = EgtGetFirstNameInGroup( nHoleLayerId, WIN_AREA1)
-- WinLib.AddSplit( nArea1Id, WIN_SPLITTYPE.HORIZONTAL, WIN_MEASURE.PROPORTIONAL, 2, 3)
-- creo pezzi per outline
-- local nCurrOutlineId = EgtGetFirstInGroup( nOutlineLayerId)
-- while nCurrOutlineId do
-- WinLib.CreatePartFromOutline( nFrameLayerId, nCurrOutlineId)
-- nCurrOutlineId = EgtGetNext( nCurrOutlineId)
-- end
-- local nCurrOutlineId = EgtGetFirstNameInGroup( nOutlineLayerId, WIN_SPLIT)
-- WinLib.CreatePartFromOutline( nFrameLayerId, nCurrOutlineId)
-- imposto se calcolare i solidi o meno
WinCalculate.SetCalcSolid( true)
-- -- creo i pezzi
WinCalculate.CreatePartFromArea( nFrameId)
-- -- creo tabella per salvataggio
-- local sSaveFilePath = 'c:\\Temp\\WindowTest1.txt'
-- local WinTable = WinManageProject.WriteToFile( nFrameId, sSaveFilePath)
-- assemblo i pezzi
--WinLib.AssembleFrame()
EgtZoom( SCE_ZM.ALL)
-- riporto tempi di esecuzione
local sOut = string.format( ' ExecTime = %.2f ms', EgtStopCounter())
EgtOutLog( sOut)