5dd44069bc
- gestione delle giunzioni come vettore - modificato il calcolo delle sottaree generate da uno split - aggiunta info lato di riferimento per lavorazione dowels - correzioni varie per telai non rettangolari.
602 lines
27 KiB
Lua
602 lines
27 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 = 900
|
|
local WindowHeight = 1500
|
|
|
|
local WindowTree
|
|
|
|
local sProfilePath = 'c:\\EgtData\\EgwWindowLua\\Profiles\\Profilo78 - Offset.nge'
|
|
|
|
------------------------------------------- ************** -------------------------------------------
|
|
|
|
-- ciclo principale
|
|
|
|
EgtStartCounter()
|
|
|
|
EgtNewFile()
|
|
|
|
-- importo profilo prescelto
|
|
WinCreate.ImportProfile( sProfilePath)
|
|
|
|
-- creo telaio generico
|
|
local FrameJointType = WIN_JNT.FULL_H
|
|
local vFrameJoints = { FrameJointType, FrameJointType, FrameJointType, FrameJointType}
|
|
local SashJointType = WIN_JNT.FULL_V
|
|
local vSashJoints = { SashJointType, SashJointType, SashJointType, SashJointType}
|
|
|
|
local nFrameId = WinCreate.CreateFrame( WIN_FRAME_TYPE.RECT, vFrameJoints, WindowWidth, WindowHeight)
|
|
-- local nFrameId = WinCreate.CreateFrame( WIN_FRAME_TYPE.CHAMFER_SIDE, vFrameJoints, WindowWidth, WindowHeight, WindowHeight + 500)
|
|
-- local nFrameId = WinCreate.CreateFrame( WIN_FRAME_TYPE.CHAMFER_SIDE, vFrameJoints, WindowWidth, WindowHeight + 500, WindowHeight)
|
|
-- local nFrameId = WinCreate.CreateFrame( WIN_FRAME_TYPE.ROUND_ARC, vFrameJoints, WindowWidth, WindowHeight)
|
|
-- local nFrameId = WinCreate.CreateFrame( WIN_FRAME_TYPE.SEGMENTAL_ARC, vFrameJoints, WindowWidth, WindowHeight, WindowHeight + 100)
|
|
|
|
-- vSashJoints = { SashJointType, SashJointType, SashJointType, SashJointType, SashJointType}
|
|
-- local nFrameId = WinCreate.CreateFrame( WIN_FRAME_TYPE.CHAMFER, { FrameJointType, FrameJointType, FrameJointType, FrameJointType, FrameJointType}, WindowWidth, WindowHeight, WindowHeight + 500)
|
|
|
|
-- vSashJoints = { SashJointType, SashJointType, SashJointType, SashJointType, SashJointType}
|
|
-- local nFrameId = WinCreate.CreateFrame( WIN_FRAME_TYPE.POINTED_ARC, { FrameJointType, FrameJointType, FrameJointType, FrameJointType, FrameJointType}, WindowWidth, WindowHeight, WindowHeight + 600)
|
|
|
|
-- local nFrameId = WinCreate.CreateFrame( WIN_FRAME_TYPE.TRG, {WIN_JNT.FULL_H, WIN_JNT.FULL_H, WIN_JNT.FULL_V}, WindowWidth, WindowHeight, WindowWidth)
|
|
-- local nFrameId = WinCreate.CreateFrame( WIN_FRAME_TYPE.TRG, {WIN_JNT.FULL_V, WIN_JNT.FULL_V, WIN_JNT.FULL_V}, WindowWidth, WindowHeight, 0)
|
|
-- local nFrameId = WinCreate.CreateFrame( WIN_FRAME_TYPE.TRG, {WIN_JNT.FULL_V, WIN_JNT.FULL_H, WIN_JNT.FULL_V}, WindowWidth, WindowHeight, WindowWidth - 100)
|
|
|
|
|
|
|
|
------------------------ 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 nSashId = WinCreate.AddSash( nFrameId, vSashJoints)
|
|
--
|
|
-- -- aggiungo vetro
|
|
-- local nFillId = WinCreate.AddFill( nSashId, WIN_FILLTYPES.GLASS)
|
|
|
|
------------------------ Finestra anta singola con divisione orizzontale ------------------------
|
|
|
|
-- -- aggiungo anta
|
|
-- local nSashId = WinCreate.AddSash( nFrameId, vSashJoints)
|
|
--
|
|
-- -- 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 nSashId = WinCreate.AddSash( nFrameId, vSashJoints)
|
|
--
|
|
-- -- 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 nSashId = WinCreate.AddSash( nFrameId, vSashJoints)
|
|
--
|
|
-- -- 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 nSashId = WinCreate.AddSash( nFrameId, vSashJoints)
|
|
|
|
-- 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 nSash1Id = WinCreate.AddSash( nArea1Id, vSashJoints)
|
|
-- -- aggiungo vetro
|
|
-- local nFill1Id = WinCreate.AddFill( nSash1Id, WIN_FILLTYPES.GLASS)
|
|
--
|
|
-- -- aggiungo seconda anta
|
|
-- local nSash2Id = WinCreate.AddSash( nArea2Id, vSashJoints)
|
|
-- -- 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 nSash1Id = WinCreate.AddSash( nArea1Id, vSashJoints, WIN_SASHTYPES.INACTIVE)
|
|
-- -- aggiungo vetro
|
|
-- local nFill1Id = WinCreate.AddFill( nSash1Id, WIN_FILLTYPES.GLASS)
|
|
--
|
|
-- -- aggiungo seconda anta
|
|
-- local nSash2Id = WinCreate.AddSash( nArea2Id, vSashJoints, 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 nSash1Id = WinCreate.AddSash( nArea1Id, vSashJoints)
|
|
-- -- aggiungo vetro
|
|
-- local nFill1Id = WinCreate.AddFill( nSash1Id, WIN_FILLTYPES.GLASS)
|
|
--
|
|
-- -- aggiungo seconda anta
|
|
-- local nSash2Id = WinCreate.AddSash( nArea2Id, vSashJoints)
|
|
-- -- aggiungo vetro
|
|
-- local nFill2Id = WinCreate.AddFill( nSash2Id, WIN_FILLTYPES.GLASS)
|
|
|
|
------------------------ Finestra tripla anta con montanti verticali ------------------------
|
|
|
|
-- -- definisco prima divisione
|
|
-- local nArea1Id, nArea0Id = WinCreate.AddSplit( nFrameId, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 3)
|
|
-- -- definisco seconda divisione
|
|
-- local nArea2Id, nArea3Id = WinCreate.AddSplit( nArea0Id, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 3)
|
|
--
|
|
-- -- aggiungo prima anta
|
|
-- local nSash1Id = WinCreate.AddSash( nArea1Id, vSashJoints)
|
|
-- -- aggiungo vetro
|
|
-- local nFill1Id = WinCreate.AddFill( nSash1Id, WIN_FILLTYPES.GLASS)
|
|
--
|
|
-- -- aggiungo seconda anta
|
|
-- local nSash2Id = WinCreate.AddSash( nArea2Id, vSashJoints)
|
|
-- -- aggiungo vetro
|
|
-- local nFill2Id = WinCreate.AddFill( nSash2Id, WIN_FILLTYPES.GLASS)
|
|
--
|
|
-- -- aggiungo terza anta
|
|
-- local nSash3Id = WinCreate.AddSash( nArea3Id, vSashJoints)
|
|
-- -- aggiungo vetro
|
|
-- local nFill3Id = WinCreate.AddFill( nSash3Id, WIN_FILLTYPES.GLASS)
|
|
|
|
------------------------ Finestra tripla anta con montanti verticali(2) ------------------------
|
|
|
|
-- -- definisco divisioni
|
|
-- local nAreaList = WinCreate.AddSplits( nFrameId, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, { WindowWidth / 3, WindowWidth / 3})
|
|
-- -- local nAreaList = WinCreate.AddSplits( nFrameId, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.PROPORTIONAL, { 1, 1}, 3)
|
|
-- -- local nAreaList = WinCreate.AddSplits( nFrameId, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.PERCENTAGE, { 0.33, 0.33}, 1)
|
|
--
|
|
-- -- aggiungo prima anta
|
|
-- local nSash1Id = WinCreate.AddSash( nAreaList[1], vSashJoints)
|
|
-- -- aggiungo vetro
|
|
-- local nFill1Id = WinCreate.AddFill( nSash1Id, WIN_FILLTYPES.GLASS)
|
|
--
|
|
-- -- aggiungo seconda anta
|
|
-- local nSash2Id = WinCreate.AddSash( nAreaList[2], vSashJoints)
|
|
-- -- aggiungo vetro
|
|
-- local nFill2Id = WinCreate.AddFill( nSash2Id, WIN_FILLTYPES.GLASS)
|
|
--
|
|
-- -- aggiungo terza anta
|
|
-- local nSash3Id = WinCreate.AddSash( nAreaList[3], vSashJoints)
|
|
-- -- 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, nArea0Id = WinCreate.AddSplit( nFrameId, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 3)
|
|
-- -- definisco seconda divisione
|
|
-- local nArea2Id, nArea3Id = WinCreate.AddSplit( nArea0Id, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 3, _, WIN_SPLITTYPES.FRENCH)
|
|
--
|
|
-- -- aggiungo prima anta
|
|
-- local nSash1Id = WinCreate.AddSash( nArea1Id, vSashJoints)
|
|
-- -- aggiungo vetro
|
|
-- local nFill1Id = WinCreate.AddFill( nSash1Id, WIN_FILLTYPES.GLASS)
|
|
--
|
|
-- -- aggiungo seconda anta
|
|
-- local nSash2Id = WinCreate.AddSash( nArea2Id, vSashJoints, WIN_SASHTYPES.INACTIVE)
|
|
-- -- aggiungo vetro
|
|
-- local nFill2Id = WinCreate.AddFill( nSash2Id, WIN_FILLTYPES.GLASS)
|
|
--
|
|
-- -- aggiungo terza anta
|
|
-- local nSash3Id = WinCreate.AddSash( nArea3Id, vSashJoints, WIN_SASHTYPES.ACTIVE)
|
|
-- -- aggiungo vetro
|
|
-- local nFill3Id = WinCreate.AddFill( nSash3Id, WIN_FILLTYPES.GLASS)
|
|
|
|
------------------------ Finestra tripla anta con montanti orizzontali ------------------------
|
|
|
|
-- -- definisco prima divisione
|
|
-- local nArea1Id, nArea0Id = WinCreate.AddSplit( nFrameId, WIN_SPLITORIENTATION.HORIZONTAL, WIN_MEASURE.ABSOLUT, WindowHeight / 3)
|
|
-- -- definisco seconda divisione
|
|
-- local nArea2Id, nArea3Id = WinCreate.AddSplit( nArea0Id, WIN_SPLITORIENTATION.HORIZONTAL, WIN_MEASURE.ABSOLUT, 2 / 3 * WindowHeight)
|
|
--
|
|
-- -- aggiungo prima anta
|
|
-- local nSash1Id = WinCreate.AddSash( nArea1Id, vSashJoints)
|
|
-- -- aggiungo vetro
|
|
-- local nFill1Id = WinCreate.AddFill( nSash1Id, WIN_FILLTYPES.GLASS)
|
|
--
|
|
-- -- aggiungo seconda anta
|
|
-- local nSash2Id = WinCreate.AddSash( nArea2Id, vSashJoints)
|
|
-- -- aggiungo vetro
|
|
-- local nFill2Id = WinCreate.AddFill( nSash2Id, WIN_FILLTYPES.GLASS)
|
|
--
|
|
-- -- aggiungo terza anta
|
|
-- local nSash3Id = WinCreate.AddSash( nArea3Id, vSashJoints)
|
|
-- -- aggiungo vetro
|
|
-- local nFill3Id = WinCreate.AddFill( nSash3Id, WIN_FILLTYPES.GLASS)
|
|
|
|
---------------------- Finestra tripla anta con montante orizzontale e verticale ------------------------
|
|
|
|
-- -- definisco divisioni
|
|
-- local nArea1Id, nArea0Id = WinCreate.AddSplit( nFrameId, WIN_SPLITORIENTATION.HORIZONTAL, WIN_MEASURE.ABSOLUT, WindowHeight / 2)
|
|
-- local nArea2Id, nArea3Id = WinCreate.AddSplit( nArea0Id, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 2)
|
|
--
|
|
-- -- aggiungo prima anta
|
|
-- local nSash1Id = WinCreate.AddSash( nArea1Id, vSashJoints)
|
|
-- -- aggiungo vetro
|
|
-- local nFill1Id = WinCreate.AddFill( nSash1Id, WIN_FILLTYPES.GLASS)
|
|
--
|
|
-- -- aggiungo seconda anta
|
|
-- local nSash2Id = WinCreate.AddSash( nArea2Id, vSashJoints)
|
|
-- -- aggiungo vetro
|
|
-- local nFill2Id = WinCreate.AddFill( nSash2Id, WIN_FILLTYPES.GLASS)
|
|
--
|
|
-- -- aggiungo terza anta
|
|
-- local nSash3Id = WinCreate.AddSash( nArea3Id, vSashJoints)
|
|
-- -- aggiungo vetro
|
|
-- local nFill3Id = WinCreate.AddFill( nSash3Id, WIN_FILLTYPES.GLASS)
|
|
|
|
------------------------ Finestra tripla anta battente / ricevente / ricevente ------------------------
|
|
|
|
-- -- definisco divisioni
|
|
-- local nArea1Id, nArea0Id = WinCreate.AddSplit( nFrameId, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 3, _, WIN_SPLITTYPES.FRENCH)
|
|
-- local nArea2Id, nArea3Id = WinCreate.AddSplit( nArea0Id, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 3, _, WIN_SPLITTYPES.FRENCH)
|
|
--
|
|
-- -- aggiungo prima anta
|
|
-- local nSash1Id = WinCreate.AddSash( nArea1Id, vSashJoints, WIN_SASHTYPES.ACTIVE)
|
|
-- -- aggiungo vetro
|
|
-- local nFill1Id = WinCreate.AddFill( nSash1Id, WIN_FILLTYPES.GLASS)
|
|
--
|
|
-- -- aggiungo seconda anta
|
|
-- local nSash2Id = WinCreate.AddSash( nArea2Id, vSashJoints, WIN_SASHTYPES.INACTIVE_IN)
|
|
-- -- aggiungo vetro
|
|
-- local nFill2Id = WinCreate.AddFill( nSash2Id, WIN_FILLTYPES.GLASS)
|
|
--
|
|
-- -- aggiungo terza anta
|
|
-- local nSash3Id = WinCreate.AddSash( nArea3Id, vSashJoints, WIN_SASHTYPES.INACTIVE_OUT)
|
|
-- -- aggiungo vetro
|
|
-- local nFill3Id = WinCreate.AddFill( nSash3Id, WIN_FILLTYPES.GLASS)
|
|
|
|
------------------------ Finestra tripla anta battente / battente / ricevente ------------------------
|
|
|
|
-- -- definisco divisioni
|
|
-- local nArea1Id, nArea0Id = WinCreate.AddSplit( nFrameId, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 3, _, WIN_SPLITTYPES.FRENCH)
|
|
-- local nArea2Id, nArea3Id = WinCreate.AddSplit( nArea0Id, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 3, _, WIN_SPLITTYPES.FRENCH)
|
|
--
|
|
-- -- aggiungo prima anta
|
|
-- local nSash1Id = WinCreate.AddSash( nArea1Id, vSashJoints, WIN_SASHTYPES.ACTIVE_OUT)
|
|
-- -- aggiungo vetro
|
|
-- local nFill1Id = WinCreate.AddFill( nSash1Id, WIN_FILLTYPES.GLASS)
|
|
--
|
|
-- -- aggiungo seconda anta
|
|
-- local nSash2Id = WinCreate.AddSash( nArea2Id, vSashJoints, WIN_SASHTYPES.ACTIVE_IN)
|
|
-- -- aggiungo vetro
|
|
-- local nFill2Id = WinCreate.AddFill( nSash2Id, WIN_FILLTYPES.GLASS)
|
|
--
|
|
-- -- aggiungo terza anta
|
|
-- local nSash3Id = WinCreate.AddSash( nArea3Id, vSashJoints, WIN_SASHTYPES.INACTIVE)
|
|
-- -- aggiungo vetro
|
|
-- local nFill3Id = WinCreate.AddFill( nSash3Id, WIN_FILLTYPES.GLASS)
|
|
|
|
------------------------ Finestra quattro ante battente / battente / ricevente / ricevente ------------------------
|
|
|
|
-- -- definisco divisioni
|
|
-- local nArea1Id, nAreaTmpId = WinCreate.AddSplit( nFrameId, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 4, _, WIN_SPLITTYPES.FRENCH)
|
|
-- local nArea2Id, nAreaTmp1Id = WinCreate.AddSplit( nAreaTmpId, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 4, _, WIN_SPLITTYPES.FRENCH)
|
|
-- local nArea3Id, nArea4Id = WinCreate.AddSplit( nAreaTmp1Id, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 4, _, WIN_SPLITTYPES.FRENCH)
|
|
--
|
|
-- -- aggiungo prima anta
|
|
-- local nSash1Id = WinCreate.AddSash( nArea1Id, vSashJoints, WIN_SASHTYPES.ACTIVE_OUT)
|
|
-- -- aggiungo vetro
|
|
-- local nFill1Id = WinCreate.AddFill( nSash1Id, WIN_FILLTYPES.GLASS)
|
|
--
|
|
-- -- aggiungo seconda anta
|
|
-- local nSash2Id = WinCreate.AddSash( nArea2Id, vSashJoints, WIN_SASHTYPES.ACTIVE_IN)
|
|
-- -- aggiungo vetro
|
|
-- local nFill2Id = WinCreate.AddFill( nSash2Id, WIN_FILLTYPES.GLASS)
|
|
--
|
|
-- -- aggiungo terza anta
|
|
-- local nSash3Id = WinCreate.AddSash( nArea3Id, vSashJoints, WIN_SASHTYPES.INACTIVE_IN)
|
|
-- -- aggiungo vetro
|
|
-- local nFill3Id = WinCreate.AddFill( nSash3Id, WIN_FILLTYPES.GLASS)
|
|
--
|
|
-- -- aggiungo quarta anta
|
|
-- local nSash4Id = WinCreate.AddSash( nArea4Id, vSashJoints, WIN_SASHTYPES.INACTIVE_OUT)
|
|
-- -- aggiungo vetro
|
|
-- local nFill4Id = WinCreate.AddFill( nSash4Id, 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, nArea0Id = WinCreate.AddSplit( nArea1Id, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 3)
|
|
-- local nArea12Id, nArea13Id = WinCreate.AddSplit( nArea0Id, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 3)
|
|
-- local nArea21Id, nArea00Id = WinCreate.AddSplit( nArea2Id, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 3)
|
|
-- local nArea22Id, nArea23Id = WinCreate.AddSplit( nArea00Id, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 3)
|
|
--
|
|
-- -- aggiungo prima anta
|
|
-- local nSash1Id = WinCreate.AddSash( nArea11Id, vSashJoints)
|
|
-- -- aggiungo vetro
|
|
-- local nFill1Id = WinCreate.AddFill( nSash1Id, WIN_FILLTYPES.GLASS)
|
|
--
|
|
-- -- aggiungo seconda anta
|
|
-- local nSash2Id = WinCreate.AddSash( nArea12Id, vSashJoints)
|
|
-- -- aggiungo vetro
|
|
-- local nFill2Id = WinCreate.AddFill( nSash2Id, WIN_FILLTYPES.GLASS)
|
|
--
|
|
-- -- aggiungo terza anta
|
|
-- local nSash3Id = WinCreate.AddSash( nArea13Id, vSashJoints)
|
|
-- -- aggiungo vetro
|
|
-- local nFill3Id = WinCreate.AddFill( nSash3Id, WIN_FILLTYPES.GLASS)
|
|
--
|
|
-- -- aggiungo quarta anta
|
|
-- local nSash4Id = WinCreate.AddSash( nArea21Id, vSashJoints)
|
|
-- -- aggiungo vetro
|
|
-- local nFill4Id = WinCreate.AddFill( nSash4Id, WIN_FILLTYPES.GLASS)
|
|
--
|
|
-- -- aggiungo quinta anta
|
|
-- local nSash5Id = WinCreate.AddSash( nArea22Id, vSashJoints)
|
|
-- -- aggiungo vetro
|
|
-- local nFill5Id = WinCreate.AddFill( nSash5Id, WIN_FILLTYPES.GLASS)
|
|
--
|
|
-- -- aggiungo sesta anta
|
|
-- local nSash6Id = WinCreate.AddSash( nArea23Id, vSashJoints)
|
|
-- -- 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, nArea0Id = WinCreate.AddSplit( nArea1Id, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 3)
|
|
-- local nArea12Id, nArea13Id = WinCreate.AddSplit( nArea0Id, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 3, _, WIN_SPLITTYPES.FRENCH)
|
|
-- local nArea21Id, nArea00Id = WinCreate.AddSplit( nArea2Id, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 3)
|
|
-- local nArea22Id, nArea23Id = WinCreate.AddSplit( nArea00Id, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 3, _, WIN_SPLITTYPES.FRENCH)
|
|
--
|
|
-- -- aggiungo prima anta
|
|
-- local nSash1Id = WinCreate.AddSash( nArea11Id, vSashJoints)
|
|
-- -- aggiungo vetro
|
|
-- local nFill1Id = WinCreate.AddFill( nSash1Id, WIN_FILLTYPES.GLASS)
|
|
--
|
|
-- -- aggiungo seconda anta
|
|
-- local nSash2Id = WinCreate.AddSash( nArea12Id, vSashJoints, WIN_SASHTYPES.INACTIVE)
|
|
-- -- aggiungo vetro
|
|
-- local nFill2Id = WinCreate.AddFill( nSash2Id, WIN_FILLTYPES.GLASS)
|
|
--
|
|
-- -- aggiungo terza anta
|
|
-- local nSash3Id = WinCreate.AddSash( nArea13Id, vSashJoints, WIN_SASHTYPES.ACTIVE)
|
|
-- -- aggiungo vetro
|
|
-- local nFill3Id = WinCreate.AddFill( nSash3Id, WIN_FILLTYPES.GLASS)
|
|
--
|
|
-- -- aggiungo quarta anta
|
|
-- local nSash4Id = WinCreate.AddSash( nArea21Id, vSashJoints)
|
|
-- -- aggiungo vetro
|
|
-- local nFill4Id = WinCreate.AddFill( nSash4Id, WIN_FILLTYPES.GLASS)
|
|
--
|
|
-- -- aggiungo quinta anta
|
|
-- local nSash5Id = WinCreate.AddSash( nArea22Id, vSashJoints, WIN_SASHTYPES.INACTIVE)
|
|
-- -- aggiungo vetro
|
|
-- local nFill5Id = WinCreate.AddFill( nSash5Id, WIN_FILLTYPES.GLASS)
|
|
--
|
|
-- -- aggiungo sesta anta
|
|
-- local nSash6Id = WinCreate.AddSash( nArea23Id, vSashJoints, WIN_SASHTYPES.ACTIVE)
|
|
-- -- 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, nArea0Id = WinCreate.AddSplit( nFrameId, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 3)
|
|
-- -- definisco seconda divisione
|
|
-- local nArea2Id, nArea3Id = WinCreate.AddSplit( nArea0Id, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 3, _, WIN_SPLITTYPES.FRENCH)
|
|
--
|
|
-- -- aggiungo prima anta
|
|
-- local nSash1Id = WinCreate.AddSash( nArea1Id, vSashJoints)
|
|
-- -- 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, vSashJoints, 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, vSashJoints, 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, 2 * WindowHeight / 3)
|
|
-- local nArea2Id, nArea00Id = WinCreate.AddSplit( nArea1Id, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 3)
|
|
-- local nArea3Id, nArea4Id = WinCreate.AddSplit( nArea00Id, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 3, _, WIN_SPLITTYPES.FRENCH)
|
|
--
|
|
-- -- aggiungo anta sopra
|
|
-- local nSash0Id = WinCreate.AddSash( nArea0Id, vSashJoints)
|
|
-- -- aggiungo vetri
|
|
-- local nFill0Id = WinCreate.AddFill( nSash0Id, WIN_FILLTYPES.GLASS)
|
|
--
|
|
-- -- aggiungo prima anta
|
|
-- local nSash1Id = WinCreate.AddSash( nArea2Id, vSashJoints)
|
|
-- -- 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( nArea3Id, vSashJoints, 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( nArea4Id, vSashJoints, 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)
|
|
|
|
-----------------------------------------------------------------------------------
|
|
|
|
|
|
-- aggiungo ferramenta
|
|
WinCreate.AddHardware( nFrameId, '000545')
|
|
|
|
-- imposto se calcolare i solidi o meno
|
|
WinCalculate.SetCalcSolid( true)
|
|
|
|
-- creo i pezzi
|
|
WinCalculate.CreatePartFromArea( nFrameId)
|
|
WinCalculate.AddHardware( nFrameId)
|
|
|
|
-- preparo per automatismo lavorazioni
|
|
-- WinCalculate.PrepareProject()
|
|
|
|
-- -- 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)
|