- riorganizzazione cartella
This commit is contained in:
@@ -0,0 +1,738 @@
|
||||
--
|
||||
-- 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 = 2500
|
||||
local WindowHeight = 2000
|
||||
|
||||
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, { FrameJointType, FrameJointType, FrameJointType, FrameJointType}, 1500, 1800, 2200)
|
||||
-- local nFrameId = WinCreate.CreateFrame( WIN_FRAME_TYPE.CHAMFER, { FrameJointType, FrameJointType, FrameJointType, FrameJointType, FrameJointType}, WindowWidth, WindowHeight, WindowHeight + 500)
|
||||
-- local nFrameId = WinCreate.CreateFrame( WIN_FRAME_TYPE.POINTED_ARC, { FrameJointType, FrameJointType, FrameJointType, FrameJointType, FrameJointType}, 900, 1500, 2100)
|
||||
|
||||
------------------------ Cambi profilo ------------------------
|
||||
-- vetro/anta
|
||||
-- local vAreas = WinCreate.AddSplits( nFrameId, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.PERCENTAGE, { 0.5}, 1)
|
||||
-- WinCreate.AddFill( vAreas[1], WIN_FILLTYPES.GLASS)
|
||||
-- WinCreate.AddSash( vAreas[2], vSashJoints)
|
||||
|
||||
-- vetro/anta orizzontale
|
||||
-- local vAreas = WinCreate.AddSplits( nFrameId, WIN_SPLITORIENTATION.HORIZONTAL, WIN_MEASURE.PERCENTAGE, { 0.5}, 1)
|
||||
-- WinCreate.AddFill( vAreas[1], WIN_FILLTYPES.GLASS)
|
||||
-- WinCreate.AddSash( vAreas[2], vSashJoints)
|
||||
|
||||
-- anta/vetro
|
||||
-- local vAreas = WinCreate.AddSplits( nFrameId, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.PERCENTAGE, { 0.5}, 1)
|
||||
-- WinCreate.AddFill( vAreas[2], WIN_FILLTYPES.GLASS)
|
||||
-- WinCreate.AddSash( vAreas[1], vSashJoints)
|
||||
|
||||
-- vetro/anta/vetro
|
||||
-- local vAreas = WinCreate.AddSplits( nFrameId, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.PERCENTAGE, { 0.33, 0.33}, 1)
|
||||
-- WinCreate.AddFill( vAreas[1], WIN_FILLTYPES.GLASS)
|
||||
-- WinCreate.AddSash( vAreas[2], vSashJoints)
|
||||
-- WinCreate.AddFill( vAreas[3], WIN_FILLTYPES.GLASS)
|
||||
|
||||
-- vetro/anta/anta
|
||||
-- local vAreas = WinCreate.AddSplits( nFrameId, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.PERCENTAGE, { 0.33, 0.33}, 1)
|
||||
-- WinCreate.AddFill( vAreas[1], WIN_FILLTYPES.GLASS)
|
||||
-- WinCreate.AddSash( vAreas[2], vSashJoints)
|
||||
-- WinCreate.AddSash( vAreas[3], vSashJoints)
|
||||
|
||||
-- anta battente/anta ricevente/vetro
|
||||
-- local vAreas = WinCreate.AddSplits( nFrameId, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.PERCENTAGE, { 0.66}, 1)
|
||||
-- local vAreas2 = WinCreate.AddSplits( vAreas[1], WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.PERCENTAGE, { 0.5}, 1, WIN_SPLITTYPES.FRENCH)
|
||||
-- WinCreate.AddSash( vAreas2[1], vSashJoints, WIN_SASHTYPES.ACTIVE)
|
||||
-- WinCreate.AddSash( vAreas2[2], vSashJoints, WIN_SASHTYPES.INACTIVE)
|
||||
-- WinCreate.AddFill( vAreas[2], WIN_FILLTYPES.GLASS)
|
||||
|
||||
-- vetro/anta/vetro/anta
|
||||
-- local vAreas = WinCreate.AddSplits( nFrameId, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.PERCENTAGE, { 0.5}, 1)
|
||||
-- local vAreas2 = WinCreate.AddSplits( vAreas[1], WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.PERCENTAGE, { 0.5}, 1)
|
||||
-- local vAreas3 = WinCreate.AddSplits( vAreas[2], WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.PERCENTAGE, { 0.5}, 1)
|
||||
-- WinCreate.AddFill( vAreas2[1], WIN_FILLTYPES.GLASS)
|
||||
-- WinCreate.AddFill( vAreas3[1], WIN_FILLTYPES.GLASS)
|
||||
-- WinCreate.AddSash( vAreas2[2], vSashJoints)
|
||||
-- WinCreate.AddSash( vAreas3[2], vSashJoints)
|
||||
|
||||
-- vetro/anta/vetro/anta
|
||||
-- local vAreas = WinCreate.AddSplits( nFrameId, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.PERCENTAGE, { 0.25}, 1)
|
||||
-- WinCreate.AddFill( vAreas[1], WIN_FILLTYPES.GLASS)
|
||||
-- local vAreas2 = WinCreate.AddSplits( vAreas[2], WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.PERCENTAGE, { 0.75}, 1)
|
||||
-- WinCreate.AddSash( vAreas2[2], vSashJoints)
|
||||
-- local vAreas3 = WinCreate.AddSplits( vAreas2[1], WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.PERCENTAGE, { 0.5}, 1)
|
||||
-- WinCreate.AddSash( vAreas3[1], vSashJoints)
|
||||
-- WinCreate.AddFill( vAreas3[2], WIN_FILLTYPES.GLASS)
|
||||
|
||||
-- con split
|
||||
-- local vAreas = WinCreate.AddSplits( nFrameId, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.PERCENTAGE, { 0.5}, 1)
|
||||
-- WinCreate.AddSash( vAreas[1], vSashJoints)
|
||||
-- local vAreas2 = WinCreate.AddSplits( vAreas[2], WIN_SPLITORIENTATION.HORIZONTAL, WIN_MEASURE.PERCENTAGE, { 0.5}, 1)
|
||||
-- WinCreate.AddFill( vAreas2[1], WIN_FILLTYPES.GLASS)
|
||||
-- WinCreate.AddFill( vAreas2[2], WIN_FILLTYPES.GLASS)
|
||||
|
||||
-- con split nell'anta
|
||||
-- local vAreas = WinCreate.AddSplits( nFrameId, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.PERCENTAGE, { 0.5}, 1)
|
||||
-- local nSash = WinCreate.AddSash( vAreas[1], vSashJoints)
|
||||
-- WinCreate.AddFill( vAreas[2], WIN_FILLTYPES.GLASS)
|
||||
-- WinCreate.AddSplits( nSash, WIN_SPLITORIENTATION.HORIZONTAL, WIN_MEASURE.PERCENTAGE, { 0.5}, 1)
|
||||
|
||||
|
||||
|
||||
------------------------ Alzante Scorrevole ------------------------
|
||||
|
||||
-- anta mobile a sx
|
||||
local vAreas = WinCreate.AddSplits( nFrameId, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.PERCENTAGE, { 0.5}, 1, WIN_SPLITTYPES.FRENCH)
|
||||
local nSash1 = WinCreate.AddSash( vAreas[1], vSashJoints, WIN_SASHTYPES.SLIDE_MOVABLE)
|
||||
local nSash2 = WinCreate.AddSash( vAreas[2], vSashJoints, WIN_SASHTYPES.SLIDE_FIXED)
|
||||
WinCreate.AddFill( nSash1, WIN_FILLTYPES.GLASS)
|
||||
WinCreate.AddFill( nSash2, WIN_FILLTYPES.GLASS)
|
||||
|
||||
-- anta mobile a dx
|
||||
-- local vAreas = WinCreate.AddSplits( nFrameId, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.PERCENTAGE, { 0.5}, 1, WIN_SPLITTYPES.FRENCH)
|
||||
-- local nSash1 = WinCreate.AddSash( vAreas[1], vSashJoints, WIN_SASHTYPES.SLIDE_FIXED)
|
||||
-- local nSash2 = WinCreate.AddSash( vAreas[2], vSashJoints, WIN_SASHTYPES.SLIDE_MOVABLE)
|
||||
-- WinCreate.AddFill( nSash1, WIN_FILLTYPES.GLASS)
|
||||
-- WinCreate.AddFill( nSash2, WIN_FILLTYPES.GLASS)
|
||||
|
||||
-- 2 ante mobili, sx davanti
|
||||
-- local vAreas = WinCreate.AddSplits( nFrameId, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.PERCENTAGE, { 0.5}, 1, WIN_SPLITTYPES.FRENCH)
|
||||
-- local nSash1 = WinCreate.AddSash( vAreas[1], vSashJoints, WIN_SASHTYPES.SLIDE_MOVABLE)
|
||||
-- local nSash2 = WinCreate.AddSash( vAreas[2], vSashJoints, WIN_SASHTYPES.SLIDE_MOVABLE_BACK)
|
||||
-- WinCreate.AddFill( nSash1, WIN_FILLTYPES.GLASS)
|
||||
-- WinCreate.AddFill( nSash2, WIN_FILLTYPES.GLASS)
|
||||
|
||||
-- 2 ante mobili, dx davanti
|
||||
-- local vAreas = WinCreate.AddSplits( nFrameId, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.PERCENTAGE, { 0.5}, 1, WIN_SPLITTYPES.FRENCH)
|
||||
-- local nSash1 = WinCreate.AddSash( vAreas[1], vSashJoints, WIN_SASHTYPES.SLIDE_MOVABLE_BACK)
|
||||
-- local nSash2 = WinCreate.AddSash( vAreas[2], vSashJoints, WIN_SASHTYPES.SLIDE_MOVABLE)
|
||||
-- WinCreate.AddFill( nSash1, WIN_FILLTYPES.GLASS)
|
||||
-- WinCreate.AddFill( nSash2, WIN_FILLTYPES.GLASS)
|
||||
|
||||
-- 4 ante, le centrali sono mobili
|
||||
-- local vAreas = WinCreate.AddSplits( nFrameId, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.PERCENTAGE, { 0.25, 0.25, 0.25}, 1, WIN_SPLITTYPES.FRENCH)
|
||||
-- local nSash1 = WinCreate.AddSash( vAreas[1], vSashJoints, WIN_SASHTYPES.SLIDE_FIXED)
|
||||
-- local nSash2 = WinCreate.AddSash( vAreas[2], vSashJoints, WIN_SASHTYPES.SLIDE_MOVABLE)
|
||||
-- local nSash3 = WinCreate.AddSash( vAreas[3], vSashJoints, WIN_SASHTYPES.SLIDE_MOVABLE)
|
||||
-- local nSash4 = WinCreate.AddSash( vAreas[4], vSashJoints, WIN_SASHTYPES.SLIDE_FIXED)
|
||||
-- WinCreate.AddFill( nSash1, WIN_FILLTYPES.GLASS)
|
||||
-- WinCreate.AddFill( nSash2, WIN_FILLTYPES.GLASS)
|
||||
-- WinCreate.AddFill( nSash3, WIN_FILLTYPES.GLASS)
|
||||
-- WinCreate.AddFill( nSash4, WIN_FILLTYPES.GLASS)
|
||||
|
||||
-- 4 ante mobili
|
||||
-- local vAreas = WinCreate.AddSplits( nFrameId, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.PERCENTAGE, { 0.25, 0.25, 0.25}, 1, WIN_SPLITTYPES.FRENCH)
|
||||
-- local nSash1 = WinCreate.AddSash( vAreas[1], vSashJoints, WIN_SASHTYPES.SLIDE_MOVABLE_BACK)
|
||||
-- local nSash2 = WinCreate.AddSash( vAreas[2], vSashJoints, WIN_SASHTYPES.SLIDE_MOVABLE)
|
||||
-- local nSash3 = WinCreate.AddSash( vAreas[3], vSashJoints, WIN_SASHTYPES.SLIDE_MOVABLE)
|
||||
-- local nSash4 = WinCreate.AddSash( vAreas[4], vSashJoints, WIN_SASHTYPES.SLIDE_MOVABLE_BACK)
|
||||
-- WinCreate.AddFill( nSash1, WIN_FILLTYPES.GLASS)
|
||||
-- WinCreate.AddFill( nSash2, WIN_FILLTYPES.GLASS)
|
||||
-- WinCreate.AddFill( nSash3, WIN_FILLTYPES.GLASS)
|
||||
-- WinCreate.AddFill( nSash4, WIN_FILLTYPES.GLASS)
|
||||
|
||||
|
||||
------------------------ 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)
|
||||
|
||||
-- tronchetti
|
||||
-- local nLogsNbr = 4 -- 0 per numero minimo
|
||||
-- local vSections = { 100, 150, 80, 130, 120, 180}
|
||||
-- local bAlign = false
|
||||
-- local dOverMatOut = 10
|
||||
-- local dOverMatIn = 7
|
||||
-- local dOverMatExt = 5
|
||||
-- local dOverMatInt = 3
|
||||
-- local bCutExtremities = true
|
||||
-- -- cero i pezzi top ad arco
|
||||
-- local vTops = EgtGetNameInGroup( 0, WIN_TOP)
|
||||
-- for i = 1, #vTops do
|
||||
-- local nOutline = EgtGetInfo( vTops[i], WIN_REF_OUTLINE, 'i')
|
||||
-- if EgtGetType( nOutline) == GDB_TY.CRV_ARC then
|
||||
-- -- se anta richiedo allineamento con telaio
|
||||
-- local nAreaId = EgtGetParent( EgtGetParent( nOutline))
|
||||
-- local nAreaType = EgtGetInfo( nAreaId, WIN_AREATYPE, 'i')
|
||||
-- if nAreaType == WIN_AREATYPES.SASH then
|
||||
-- bAlign = true
|
||||
-- nLogsNbr = 0
|
||||
-- end
|
||||
-- WinCalculate.CreateArcLogs( vTops[i], nLogsNbr, vSections, bAlign, dOverMatOut, dOverMatIn, dOverMatExt, dOverMatInt, bCutExtremities)
|
||||
-- end
|
||||
-- end
|
||||
|
||||
|
||||
-- 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)
|
||||
@@ -0,0 +1,374 @@
|
||||
--
|
||||
-- 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
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
local WinConst = {}
|
||||
|
||||
------------------------------------------- PARAMETERS -------------------------------------------
|
||||
|
||||
-- tipi di telaio
|
||||
WIN_FRAME_TYPE = {
|
||||
RECT = 1,
|
||||
CHAMFER_SIDE = 2,
|
||||
CHAMFER = 3,
|
||||
ROUND_ARC = 4,
|
||||
SEGMENTAL_ARC = 5,
|
||||
POINTED_ARC = 6,
|
||||
TRG = 7,
|
||||
}
|
||||
|
||||
-- Tipi di giunzioni (joint)
|
||||
WIN_JNT = {
|
||||
ANGLED = 1,
|
||||
FULL_H = 2,
|
||||
FULL_V = 3,
|
||||
}
|
||||
|
||||
-- tipo di giunzione pezzo
|
||||
WIN_PART_JNT = {
|
||||
ANGLED = 1,
|
||||
FULL = 2,
|
||||
SHORT = 3,
|
||||
}
|
||||
|
||||
-- Tipi di profilo
|
||||
WIN_PRF = {
|
||||
NULL = 0,
|
||||
TOP = 1,
|
||||
BOTTOM = 2,
|
||||
LEFT = 3,
|
||||
RIGHT = 4,
|
||||
VERTICAL = 5,
|
||||
HORIZONTAL = 6,
|
||||
SPLIT = 7,
|
||||
BOTTOMRAIL = 8,
|
||||
}
|
||||
|
||||
-- Tipi di split
|
||||
WIN_SPLITORIENTATION = {
|
||||
VERTICAL = 1,
|
||||
HORIZONTAL = 2,
|
||||
}
|
||||
|
||||
-- Tipi di misure
|
||||
WIN_MEASURE = {
|
||||
ABSOLUT = 1,
|
||||
PROPORTIONAL = 2,
|
||||
PERCENTAGE = 3,
|
||||
}
|
||||
|
||||
-- tipo di Area
|
||||
WIN_AREATYPES = {
|
||||
NULL = 0,
|
||||
FRAME = 1,
|
||||
SASH = 2,
|
||||
FILL = 3,
|
||||
SPLIT = 4,
|
||||
}
|
||||
|
||||
-- tipo di split:
|
||||
-- mullion = montante
|
||||
-- french = battente / ricevente
|
||||
-- mixed = cambio profilo
|
||||
WIN_SPLITTYPES = {
|
||||
NULL = 0,
|
||||
MULLION = 1,
|
||||
FRENCH = 2,
|
||||
MIXED = 3,
|
||||
}
|
||||
|
||||
-- tipi di riempimento interno
|
||||
WIN_FILLTYPES = {
|
||||
NULL = 0,
|
||||
GLASS = 1,
|
||||
WOOD = 2,
|
||||
}
|
||||
|
||||
-- tipi di sash battente e ricevente
|
||||
WIN_SASHTYPES = {
|
||||
NULL = 0,
|
||||
ACTIVE = 1,
|
||||
INACTIVE = 2,
|
||||
ACTIVE_IN = 3,
|
||||
ACTIVE_OUT = 4,
|
||||
INACTIVE_IN = 5,
|
||||
INACTIVE_OUT = 6,
|
||||
SLIDE_MOVABLE = 7,
|
||||
SLIDE_FIXED = 8,
|
||||
SLIDE_MOVABLE_BACK = 9,
|
||||
}
|
||||
|
||||
WIN_CHILDREN_TYPES = {
|
||||
NULL = 0,
|
||||
SASH = 1,
|
||||
FILL = 2,
|
||||
MIXED = 3,
|
||||
}
|
||||
|
||||
-- tipi di apertura ante
|
||||
WIN_OPENING_TYPES = {
|
||||
NULL = 0,
|
||||
TURNONLY_LEFT = 1,
|
||||
TURNONLY_RIGHT = 2,
|
||||
TILTTURN_LEFT = 3,
|
||||
TILTTURN_RIGHT = 4,
|
||||
TILTONLY_TOP = 5,
|
||||
TILTONLY_BOTTOM = 6,
|
||||
PIVOT = 7,
|
||||
FIXED = 8,
|
||||
COPLANARSLIDE_LEFT = 9,
|
||||
COPLANARSLIDE_RIGHT = 10,
|
||||
LIFTSLIDE_LEFT = 11,
|
||||
LIFTSLIDE_RIGHT = 12,
|
||||
}
|
||||
|
||||
WIN_SURF_APPROX = 0.05
|
||||
|
||||
WIN_PROFILE = 'Profile'
|
||||
WIN_PROFILEPATH = 'ProfilePath'
|
||||
|
||||
WIN_FRAME = 'Frame'
|
||||
WIN_AREAOUTLINE = 'BaseOutline'
|
||||
WIN_OUTLINE = 'Outline'
|
||||
WIN_SELECTION = 'Selection'
|
||||
WIN_SPLITSELECTION = 'SplitSelection'
|
||||
WIN_ORIGOUTLINE = 'OrigOutline'
|
||||
WIN_GEO = 'Geo'
|
||||
WIN_SOLID = 'Solid'
|
||||
WIN_BOTTOM = 'Bottom'
|
||||
WIN_RIGHT = 'Right'
|
||||
WIN_TOP = 'Top'
|
||||
WIN_LEFT = 'Left'
|
||||
WIN_HORIZONTAL = 'Horizontal'
|
||||
WIN_VERTICAL = 'Vertical'
|
||||
WIN_BASESPLIT = 'BaseSplit'
|
||||
WIN_TEMPSPLIT = 'TempSplit'
|
||||
WIN_SPLIT = 'Split'
|
||||
WIN_AREA = 'Area'
|
||||
WIN_AREAASTERISK = 'Area*'
|
||||
WIN_AREA1 = 'Area1'
|
||||
WIN_AREA2 = 'Area2'
|
||||
WIN_AREATYPE = 'AreaType'
|
||||
WIN_SASH = 'Sash'
|
||||
WIN_FILL = 'Fill'
|
||||
WIN_FILLTYPE = 'FillType'
|
||||
WIN_SPLITTYPE = 'SplitType'
|
||||
WIN_STARTJOINT = 'StartJoint'
|
||||
WIN_SASHTYPE = 'SashType'
|
||||
WIN_REF_OUTLINE = 'OutlineRef'
|
||||
WIN_REF_PART = 'PartRef'
|
||||
WIN_REF_BOTTOMRAIL_PART = 'BottomRailPartRef'
|
||||
WIN_AREA_NAME = 'AreaName'
|
||||
WIN_SASH_OPENING = 'Opening'
|
||||
WIN_OPENING_TYPE = 'OpeningType'
|
||||
|
||||
WIN_SASH_TOP = 'Sash_Top'
|
||||
WIN_SASH_BOTTOM = 'Sash_Bottom'
|
||||
WIN_SASH_VERTICAL = 'Sash_Vertical'
|
||||
WIN_SASH_HORIZONTAL = 'Sash_Horizontal'
|
||||
WIN_RAIL_BOTTOM = 'Rail_Bottom'
|
||||
WIN_FRAME_TOP = 'Frame_Top'
|
||||
WIN_FRAME_BOTTOM = 'Frame_Bottom'
|
||||
WIN_FIXED_TOP = 'Fixed_Top'
|
||||
WIN_FIXED_BOTTOM = 'Fixed_Bottom'
|
||||
WIN_SASH_ACTIVE = 'Sash_Active'
|
||||
WIN_SASH_INACTIVE = 'Sash_Inactive'
|
||||
WIN_FRENCH_IN = 'French_In'
|
||||
WIN_FRENCH_OUT = 'French_Out'
|
||||
WIN_SASH_SPLIT = 'Sash_Split'
|
||||
WIN_FRAME_SPLIT = 'Frame_Split'
|
||||
WIN_MIXED_BOTTOM = 'Mixed_Bottom'
|
||||
WIN_MIXED_TOP = 'Mixed_Top'
|
||||
WIN_MIXED_SPLIT = 'Mixed_Split'
|
||||
WIN_SLIDE_TOP = 'Slide_Top'
|
||||
WIN_SLIDE_BOTTOM = 'Slide_Bottom'
|
||||
WIN_SLIDE_MOVABLE = 'Slide_Movable'
|
||||
WIN_SLIDE_FIXED = 'Slide_Fixed'
|
||||
WIN_SLIDE_BOTTOM_MOVABLEBACK = 'Slide_Bottom_MovableBack'
|
||||
WIN_SLIDE_MOVABLE_TOP = 'Slide_Movable_Top'
|
||||
WIN_SLIDE_MOVABLE_BOTTOM = 'Slide_Movable_Bottom'
|
||||
WIN_SLIDE_MOVABLE_BACK_TOP = 'Slide_MovableBack_Top'
|
||||
WIN_SLIDE_MOVABLE_BACK_BOTTOM = 'Slide_MovableBack_Bottom'
|
||||
WIN_SLIDE_FIXED_BOTTOM = 'Slide_Fixed_Bottom'
|
||||
WIN_SLIDE_FIXED_TOP = 'Slide_Fixed_Top'
|
||||
WIN_SLIDE_ACTIVE = 'Slide_Active'
|
||||
WIN_SLIDE_ACTIVE_IN = 'Slide_Active_In'
|
||||
WIN_SLIDE_INACTIVE = 'Slide_Inactive'
|
||||
WIN_INFO_GRP = 'Info'
|
||||
|
||||
WIN_REF = 'Ref'
|
||||
WIN_SECTION = 'Section'
|
||||
WIN_STRIP = 'Strip'
|
||||
WIN_ALU = 'Alu'
|
||||
WIN_CTRIN = 'CtrIn'
|
||||
WIN_OUT = 'Out'
|
||||
WIN_IN = 'In'
|
||||
WIN_OUTOFST = 'OfstOut'
|
||||
WIN_CTRINOFST = 'OfstCtrIn'
|
||||
WIN_OFST = 'Ofst'
|
||||
WIN_SECTIONFRAME = 'SectionFrame'
|
||||
WIN_MIXED_COMMON = 'Common'
|
||||
WIN_SIMPLIFIED = 'Simplified'
|
||||
|
||||
WIN_MINIZINKEN = 'MiniZinken'
|
||||
|
||||
-- WIN_STARTCPDELTA = 'StartCPDelta'
|
||||
-- WIN_ENDCPDELTA = 'EndCPDelta'
|
||||
WIN_GEOWIDTH = 'GeoWidth'
|
||||
WIN_GLASSTHICKNESS = 'GlassThickness'
|
||||
WIN_SEMI_PROFILE = 'SemiProfileId'
|
||||
|
||||
WIN_GEOOUTLINEBOTTOM = 'GeoOutlineBottom'
|
||||
|
||||
WIN_JOINT_BL = 'JointBL'
|
||||
WIN_JOINT_BR = 'JointBR'
|
||||
WIN_JOINT_BDIV = 'JointBDiv'
|
||||
WIN_JOINT_TL = 'JointTL'
|
||||
WIN_JOINT_TR = 'JointTR'
|
||||
WIN_JOINT_TDIV = 'JointTDiv'
|
||||
WIN_JOINTS = 'Joints'
|
||||
|
||||
|
||||
WIN_GEO_IN = 'In'
|
||||
WIN_GEO_OUT = 'Out'
|
||||
WIN_GEO_LEFT = 'Left'
|
||||
WIN_GEO_RIGHT = 'Right'
|
||||
WIN_GEO_RAW = 'GeoRaw'
|
||||
|
||||
WIN_PRF_TYPE = 'Type'
|
||||
WIN_PRF_MAIN = 'Main'
|
||||
WIN_PRF_START = 'Start'
|
||||
WIN_PRF_END = 'End'
|
||||
WIN_PRF_SPLIT = 'Split'
|
||||
|
||||
WIN_PROFILETYPE = 'ProfileType'
|
||||
WIN_SEPARATIONTYPE = 'SeparationType'
|
||||
|
||||
WIN_SPLIT_STARTINTERS = 'SplitStartInters'
|
||||
WIN_SPLIT_ENDINTERS = 'SplitEndInters'
|
||||
|
||||
WIN_SOU = 'SOU'
|
||||
WIN_CHILD = 'CHILD'
|
||||
WIN_COPY = 'COPY'
|
||||
|
||||
WIN_SASH_TOP_OVERLAP = 'SashTopOverlap'
|
||||
WIN_SASH_BOTTOM_OVERLAP = 'SashBottomOverlap'
|
||||
WIN_DELTA = 'Delta'
|
||||
WIN_FILLOVERLAP = 'FillOverlap'
|
||||
WIN_FILLDELTA = 'FillDelta'
|
||||
WIN_GAPDELTA = 'GapDelta'
|
||||
WIN_GAPDELTAZ = 'GapDeltaZ'
|
||||
WIN_GAPDELTAIN = 'GapDeltaIn'
|
||||
WIN_GAPDELTAOUT = 'GapDeltaOut'
|
||||
WIN_FIXED_REF = 'FixedRef'
|
||||
WIN_SASH_REF = 'SashRef'
|
||||
WIN_SASH_DEPTH = 'SashDepth'
|
||||
WIN_RAD_REF = 'RefRad'
|
||||
WIN_EXTRA_DIST = 'ExtraDist'
|
||||
WIN_PRC_PHASE = 'PHASE'
|
||||
WIN_PRC_NTOOLS = 'NTOOLS'
|
||||
WIN_PRC_TOOL_NAME = 'TOOL_NAME'
|
||||
WIN_PRC_OFFL = 'OFFL'
|
||||
WIN_PRC_OFFR = 'OFFR'
|
||||
WIN_PRC_OFFY_1 = 'OFFY_1'
|
||||
WIN_PRC_OFFZ_1 = 'OFFZ_1'
|
||||
WIN_PRC_OFFY_2 = 'OFFY_2'
|
||||
WIN_PRC_OFFZ_2 = 'OFFZ_2'
|
||||
WIN_PRC_CLAMPV_1 = 'CLAMPV_1'
|
||||
WIN_PRC_CLAMPV_2 = 'CLAMPV_2'
|
||||
WIN_STRIP_DIST = 'StripDistance'
|
||||
|
||||
WIN_GLASS = 'GLASS'
|
||||
WIN_WOOD = 'WOOD'
|
||||
WIN_INACTIVE = 'INACTIVE'
|
||||
|
||||
WIN_REF_SPLIT = 'RefSplit'
|
||||
WIN_CRV_ON_FRENCH_SPLIT = 'OutlineOnFrenchSplit'
|
||||
WIN_PREV_OUTLINES = 'PrevOutlines'
|
||||
WIN_NEXT_OUTLINES = 'NextOutlines'
|
||||
|
||||
WIN_PRF_CHANGE = 'ProfileChange'
|
||||
WIN_MIXED_OUTLINES = 'ProfileChangeOutlines'
|
||||
WIN_MIXED_INTERSECTIONS = 'ProfileChangeIntersections'
|
||||
WIN_SASH_CHILDREN = 'SashChildren'
|
||||
WIN_FILL_CHILDREN = 'FillChildren'
|
||||
WIN_MIXED_SPLIT_REF = 'MixedSplitRef'
|
||||
WIN_MIXED_INTERS_REF = 'MixedIntersRef'
|
||||
WIN_MIXED_REF_START = 'MixedRefEnd'
|
||||
WIN_MIXED_REF_END = 'MixedRefStart'
|
||||
|
||||
WIN_MAINGUIDE = 'MainGuide'
|
||||
WIN_SRF_MAIN = 'MainSurface'
|
||||
WIN_SRF_ORIGMAIN = 'OrigMainSurface'
|
||||
WIN_SRF_START = 'StartSurface'
|
||||
WIN_SRF_END = 'EndSurface'
|
||||
WIN_SRF_STRIP = 'StripSurface'
|
||||
|
||||
WIN_BOTTOMRAIL = 'BottomRail'
|
||||
|
||||
WIN_PRC = 'Processings'
|
||||
WIN_PRC_FRAME = 'AuxFrame'
|
||||
WIN_PRC_FEATURE_TYPE = 'FEATURE_TYPE'
|
||||
WIN_PRC_TYPE = {
|
||||
HOLE = 'Hole',
|
||||
PROFILING = 'Profiling',
|
||||
POCKET = 'Pocket',
|
||||
CUT = 'Cut',
|
||||
STRIP_CUT = 'StripCut'
|
||||
}
|
||||
WIN_PRC_PROFILE_INFO = 'PROFILE_INFO'
|
||||
WIN_PRC_PROFILE_TYPE = {
|
||||
HEAD = 'Head',
|
||||
LONGITUDINAL = 'Longitudinal',
|
||||
MIXED = 'Mixed',
|
||||
GENERIC = 'Generic'
|
||||
}
|
||||
WIN_PRC_OVERMAT_IN = 'OVERMAT_IN'
|
||||
WIN_PRC_OVERMAT_OUT = 'OVERMAT_OUT'
|
||||
WIN_PRC_OVERMAT_LEFT = 'OVERMAT_LEFT'
|
||||
WIN_PRC_OVERMAT_RIGHT = 'OVERMAT_RIGHT'
|
||||
WIN_PRC_SIDE = 'REFERENCE_SIDE'
|
||||
WIN_PRC_SIDETYPE = {
|
||||
OUT = 'Out',
|
||||
IN = 'In',
|
||||
LEFT = 'Left',
|
||||
RIGHT = 'Right'
|
||||
}
|
||||
|
||||
WIN_DOWEL = 'Dowel'
|
||||
WIN_DWL_DIAM = 'DowelsDiam'
|
||||
WIN_DWL_TOP_PERP_LEN = 'TopPerpLen'
|
||||
WIN_DWL_TOP_PARA_LEN = 'TopParaLen'
|
||||
WIN_DWL_BOTTOM_PERP_LEN = 'BottomPerpLen'
|
||||
WIN_DWL_BOTTOM_PARA_LEN = 'BottomParaLen'
|
||||
WIN_DWL_RAILBOTTOM_PERP_LEN = 'RailBottomPerpLen'
|
||||
WIN_DWL_RAILBOTTOM_PARA_LEN = 'RailBottomParaLen'
|
||||
WIN_DWL_SPLIT_PERP_LEN = 'SplitPerpLen'
|
||||
WIN_DWL_SPLIT_PARA_LEN = 'SplitParaLen'
|
||||
WIN_DWL_LOG_LEN = 'DowelsLogLen'
|
||||
|
||||
WIN_LOGS = 'Log'
|
||||
|
||||
WIN_PRJ_ORIGSPLIT = 'OrigSplit'
|
||||
|
||||
WIN_HARDWARE = 'Hardware'
|
||||
WIN_HDW_FAVOURITE = 'HdwFavourite'
|
||||
WIN_HDW_HANDLE = 'HdwHandle'
|
||||
WIN_HDW_FRAME = 'HdwFrame'
|
||||
WIN_HDW_HANDLE_HEIGHT = 'HdwHandleH'
|
||||
WIN_HDW_OPTIONS = 'HdwOptions'
|
||||
WIN_HDW_HINGES = 'HdwHinges'
|
||||
---------------------------------------------------------------------
|
||||
return WinConst
|
||||
@@ -0,0 +1,54 @@
|
||||
--
|
||||
-- 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
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
local WinJWDConst = {}
|
||||
|
||||
------------------------------------------- PARAMETERS -------------------------------------------
|
||||
|
||||
|
||||
-- tipi di sash battente e ricevente
|
||||
-- WIN_SASHTYPES = {
|
||||
-- NULL = 0,
|
||||
-- ACTIVE = 1,
|
||||
-- INACTIVE = 2,
|
||||
-- }
|
||||
|
||||
JWD_EXT = '.jwd'
|
||||
|
||||
JWD_PROFILE_PATH = 'ProfilePath'
|
||||
|
||||
JWD_AREA = 'Area'
|
||||
JWD_AREA_TYPE = 'AreaType'
|
||||
|
||||
JWD_JOINT_BL = 'JointBL'
|
||||
JWD_JOINT_BR = 'JointBR'
|
||||
JWD_JOINT_TL = 'JointTL'
|
||||
JWD_JOINT_TR = 'JointTR'
|
||||
|
||||
JWD_OUTLINE = 'Outline'
|
||||
JWD_JOINT = 'Joint'
|
||||
JWD_SPLIT = 'Split'
|
||||
JWD_CRV_TYPE = 'CurveType'
|
||||
JWD_POINT_START = 'ptStart'
|
||||
JWD_POINT_END = 'ptEnd'
|
||||
JWD_POINT_MID = 'ptMid'
|
||||
JWD_BOTTOM_RAIL = 'BottomRail'
|
||||
|
||||
JWD_SASH_TYPE = 'SashType'
|
||||
JWD_FILL_TYPE = 'FillType'
|
||||
|
||||
---------------------------------------------------------------------
|
||||
return WinJWDConst
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,605 @@
|
||||
--
|
||||
-- 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
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
local WinCreate = {}
|
||||
|
||||
-- Include
|
||||
require( 'EgtBase')
|
||||
require( 'WinConst')
|
||||
|
||||
-- funzioni
|
||||
|
||||
local function AddInfo( nId, sInfo, nVal)
|
||||
local vInfo = EgtGetInfo( nId, sInfo, 'vi') or {}
|
||||
table.insert( vInfo, nVal)
|
||||
EgtSetInfo( nId, sInfo, vInfo)
|
||||
end
|
||||
|
||||
-- funzione che importa il profilo
|
||||
function WinCreate.ImportProfile( sProfilePath)
|
||||
-- verifico esistenza file
|
||||
if not EgtExistsFile( sProfilePath) then
|
||||
EgtOutLog( 'File del profilo non trovato! ' .. sProfilePath)
|
||||
EgtOutText( 'File del profilo non trovato! ' .. sProfilePath)
|
||||
EgtPause(5000)
|
||||
return false
|
||||
end
|
||||
-- creo gruppo per il profilo
|
||||
local nProfileId = EgtGroup( GDB_ID.ROOT)
|
||||
EgtSetName( nProfileId, WIN_PROFILE)
|
||||
EgtSetLevel( nProfileId, GDB_LV.SYSTEM)
|
||||
-- importo profilo prescelto
|
||||
local bOk = EgtInsertFile( sProfilePath)
|
||||
-- recupero gruppi importati e li sposto nel gruppo profilo
|
||||
local nGroupId = EgtGetFirstInGroup( GDB_ID.ROOT)
|
||||
while nGroupId do
|
||||
if nGroupId ~= nProfileId then
|
||||
local nCurrId = nGroupId
|
||||
nGroupId = EgtGetNext( nGroupId)
|
||||
EgtRelocateGlob( nCurrId, nProfileId)
|
||||
EgtSetStatus( nCurrId, GDB_ST.OFF)
|
||||
else
|
||||
nGroupId = EgtGetNext( nGroupId)
|
||||
end
|
||||
end
|
||||
-- riporto path nel Part del profilo
|
||||
EgtSetInfo( nProfileId, WIN_PROFILEPATH, sProfilePath)
|
||||
return true
|
||||
end
|
||||
|
||||
----------------------------------------------------------------------------------
|
||||
------------------------------------- TELAIO -------------------------------------
|
||||
----------------------------------------------------------------------------------
|
||||
-- funzione che crea il buco per la finestra a partire da curve generiche
|
||||
function WinCreate.CreateGenFrame( vFrameCrvs, vJoints)
|
||||
-- creo gruppo per telaio
|
||||
local nFrameAreaId = EgtGroup( GDB_ID.ROOT)
|
||||
EgtSetName( nFrameAreaId, WIN_AREA .. '(' .. WIN_FRAME .. ')')
|
||||
EgtSetLevel( nFrameAreaId, GDB_LV.SYSTEM)
|
||||
-- imposto il tipo
|
||||
EgtSetInfo( nFrameAreaId, WIN_AREATYPE, WIN_AREATYPES.FRAME)
|
||||
-- creo il gruppo con le curve di outline
|
||||
local nAreaOutlineLayerId = EgtGroup( nFrameAreaId)
|
||||
EgtSetName( nAreaOutlineLayerId, WIN_AREAOUTLINE)
|
||||
for i = 1, #vFrameCrvs do
|
||||
EgtRelocateGlob( vFrameCrvs[i], nAreaOutlineLayerId)
|
||||
end
|
||||
-- imposto tipo giunzioni
|
||||
EgtSetInfo( nAreaOutlineLayerId, WIN_JOINTS, vJoints)
|
||||
|
||||
return nFrameAreaId
|
||||
end
|
||||
|
||||
----------------------------------------------------------------------------------
|
||||
-- funzione che crea le curve che definiscono il telaio in base alla geometria richiesta
|
||||
local function CreateFrameCurves( nLayerId, nType, dWidth, dHeight, dVal)
|
||||
|
||||
-- rettangolo
|
||||
if nType == WIN_FRAME_TYPE.RECT then
|
||||
-- telaio rettangolare
|
||||
local nBottomId = EgtLine( nLayerId, ORIG(), Point3d( dWidth, 0, 0))
|
||||
EgtSetName( nBottomId, WIN_BOTTOM)
|
||||
local nRightId = EgtLine( nLayerId, Point3d( dWidth, 0, 0), Point3d( dWidth, dHeight, 0))
|
||||
EgtSetName( nRightId, WIN_RIGHT)
|
||||
local nTopId = EgtLine( nLayerId, Point3d( dWidth, dHeight, 0), Point3d( 0, dHeight, 0))
|
||||
EgtSetName( nTopId, WIN_TOP)
|
||||
local nLeftId = EgtLine( nLayerId, Point3d( 0, dHeight, 0), ORIG())
|
||||
EgtSetName( nLeftId, WIN_LEFT)
|
||||
|
||||
-- lato top inclinato
|
||||
elseif nType == WIN_FRAME_TYPE.CHAMFER_SIDE then
|
||||
-- dHeight è l'altezza del lato sx, dVal è l'altezza del lato dx
|
||||
local nBottomId = EgtLine( nLayerId, ORIG(), Point3d( dWidth, 0, 0))
|
||||
EgtSetName( nBottomId, WIN_BOTTOM)
|
||||
local nRightId = EgtLine( nLayerId, Point3d( dWidth, 0, 0), Point3d( dWidth, dVal, 0))
|
||||
EgtSetName( nRightId, WIN_RIGHT)
|
||||
local nTopId = EgtLine( nLayerId, Point3d( dWidth, dVal, 0), Point3d( 0, dHeight, 0))
|
||||
EgtSetName( nTopId, WIN_TOP)
|
||||
local nLeftId = EgtLine( nLayerId, Point3d( 0, dHeight, 0), ORIG())
|
||||
EgtSetName( nLeftId, WIN_LEFT)
|
||||
|
||||
-- triangular arch
|
||||
elseif nType == WIN_FRAME_TYPE.CHAMFER then
|
||||
-- dHeight è l'altezza dei lati verticali, dVal è l'altezza complessiva della finestra
|
||||
local nBottomId = EgtLine( nLayerId, ORIG(), Point3d( dWidth, 0, 0))
|
||||
EgtSetName( nBottomId, WIN_BOTTOM)
|
||||
local nRightId = EgtLine( nLayerId, Point3d( dWidth, 0, 0), Point3d( dWidth, dHeight, 0))
|
||||
EgtSetName( nRightId, WIN_RIGHT)
|
||||
local nTop1Id = EgtLine( nLayerId, Point3d( dWidth, dHeight, 0), Point3d( dWidth / 2, dVal, 0))
|
||||
local nTop2Id = EgtLine( nLayerId, Point3d( dWidth / 2, dVal, 0), Point3d( 0, dHeight, 0))
|
||||
EgtSetName( nTop1Id, WIN_TOP)
|
||||
EgtSetName( nTop2Id, WIN_TOP)
|
||||
local nLeftId = EgtLine( nLayerId, Point3d( 0, dHeight, 0), ORIG())
|
||||
EgtSetName( nLeftId, WIN_LEFT)
|
||||
|
||||
-- arco a tutto sesto
|
||||
elseif nType == WIN_FRAME_TYPE.ROUND_ARC then
|
||||
local nBottomId = EgtLine( nLayerId, ORIG(), Point3d( dWidth, 0, 0))
|
||||
EgtSetName( nBottomId, WIN_BOTTOM)
|
||||
local nRightId = EgtLine( nLayerId, Point3d( dWidth, 0, 0), Point3d( dWidth, dHeight - 0.5 * dWidth, 0))
|
||||
EgtSetName( nRightId, WIN_RIGHT)
|
||||
local nTopId = EgtArcCPA( nLayerId, Point3d( 0.5 * dWidth, dHeight - 0.5 * dWidth, 0), Point3d( dWidth, dHeight - 0.5 * dWidth, 0), 180, 0)
|
||||
EgtSetName( nTopId, WIN_TOP)
|
||||
local nLeftId = EgtLine( nLayerId, Point3d( 0, dHeight - 0.5 * dWidth, 0), ORIG())
|
||||
EgtSetName( nLeftId, WIN_LEFT)
|
||||
|
||||
-- arco ribassato
|
||||
elseif nType == WIN_FRAME_TYPE.SEGMENTAL_ARC then
|
||||
-- dHeight è l'altezza dei lati verticali, dVal è l'altezza complessiva della finestra
|
||||
local nBottomId = EgtLine( nLayerId, ORIG(), Point3d( dWidth, 0, 0))
|
||||
EgtSetName( nBottomId, WIN_BOTTOM)
|
||||
local nRightId = EgtLine( nLayerId, Point3d( dWidth, 0, 0), Point3d( dWidth, dHeight, 0))
|
||||
EgtSetName( nRightId, WIN_RIGHT)
|
||||
local nTopId = EgtArc3P( nLayerId, Point3d( dWidth, dHeight, 0), Point3d( 0.5 * dWidth, dVal, 0), Point3d( 0, dHeight, 0))
|
||||
EgtSetName( nTopId, WIN_TOP)
|
||||
local nLeftId = EgtLine( nLayerId, Point3d( 0, dHeight, 0), ORIG())
|
||||
EgtSetName( nLeftId, WIN_LEFT)
|
||||
|
||||
-- arco a tutto sesto
|
||||
elseif nType == WIN_FRAME_TYPE.POINTED_ARC then
|
||||
-- dHeight è l'altezza dei lati verticali, dVal è l'altezza complessiva della finestra
|
||||
-- verifico che le due altezze abbiano valori sensati per realizzare i due archi
|
||||
if dVal - dHeight < 0.5 * dWidth then
|
||||
return
|
||||
end
|
||||
local nBottomId = EgtLine( nLayerId, ORIG(), Point3d( dWidth, 0, 0))
|
||||
EgtSetName( nBottomId, WIN_BOTTOM)
|
||||
local nRightId = EgtLine( nLayerId, Point3d( dWidth, 0, 0), Point3d( dWidth, dHeight, 0))
|
||||
EgtSetName( nRightId, WIN_RIGHT)
|
||||
local nTop1Id = EgtArc2PV( nLayerId, Point3d( dWidth, dHeight, 0), Point3d( 0.5 * dWidth, dVal, 0), Y_AX())
|
||||
EgtSetName( nTop1Id, WIN_TOP)
|
||||
local nTop2Id = EgtArc2PV( nLayerId, Point3d( 0, dHeight, 0), Point3d( 0.5 * dWidth, dVal, 0), Y_AX())
|
||||
EgtInvertCurve( nTop2Id)
|
||||
EgtSetName( nTop2Id, WIN_TOP)
|
||||
local nLeftId = EgtLine( nLayerId, Point3d( 0, dHeight, 0), ORIG())
|
||||
EgtSetName( nLeftId, WIN_LEFT)
|
||||
|
||||
-- triangolo
|
||||
elseif nType == WIN_FRAME_TYPE.TRG then
|
||||
local nBottomId = EgtLine( nLayerId, ORIG(), Point3d( dWidth, 0, 0))
|
||||
EgtSetName( nBottomId, WIN_BOTTOM)
|
||||
local nEdge1Id = EgtLine( nLayerId, Point3d( dWidth, 0, 0), Point3d( dVal, dHeight, 0))
|
||||
local nEdge2Id = EgtLine( nLayerId, Point3d( dVal, dHeight, 0), ORIG())
|
||||
-- un lato verticale è right/left, un lato inclinato è top
|
||||
if dVal < GEO.EPS_SMALL then
|
||||
EgtSetName( nEdge1Id, WIN_TOP)
|
||||
EgtSetName( nEdge2Id, WIN_LEFT)
|
||||
elseif abs( dVal - dWidth) < GEO.EPS_SMALL then
|
||||
EgtSetName( nEdge1Id, WIN_RIGHT)
|
||||
EgtSetName( nEdge2Id, WIN_TOP)
|
||||
else
|
||||
EgtSetName( nEdge1Id, WIN_TOP)
|
||||
EgtSetName( nEdge2Id, WIN_TOP)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
----------------------------------------------------------------------------------
|
||||
-- funzione che crea il telaio a partire da una specifica geometria ( rettangolo, chamfer...)
|
||||
function WinCreate.CreateFrame( nType, vJoints, dWidth, dHeight, dHeight2)
|
||||
|
||||
-- creo un gruppo temporaneo per le curve di outline
|
||||
local nTmpLay = EgtGroup( GDB_ID.ROOT)
|
||||
-- disegno outline
|
||||
CreateFrameCurves( nTmpLay, nType, dWidth, dHeight, dHeight2)
|
||||
local nFrameAreaId = WinCreate.CreateGenFrame( EgtGetAllInGroup( nTmpLay), vJoints)
|
||||
EgtErase( nTmpLay)
|
||||
|
||||
return nFrameAreaId
|
||||
end
|
||||
|
||||
----------------------------------------------------------------------------------
|
||||
-------------------------------------- ANTA --------------------------------------
|
||||
----------------------------------------------------------------------------------
|
||||
-- funzione che aggiunge una anta
|
||||
function WinCreate.AddSash( nAreaId, vJoints, nSashType, nOpeningType)
|
||||
-- creo nuova area
|
||||
local nSashAreaId = EgtGroup( nAreaId)
|
||||
EgtSetName( nSashAreaId, WIN_AREA .. '(' .. WIN_SASH .. ')')
|
||||
-- imposto il tipo
|
||||
EgtSetInfo( nSashAreaId, WIN_AREATYPE, WIN_AREATYPES.SASH)
|
||||
-- recupero outline area precedente
|
||||
local nPrevAreaOutlineId = EgtGetFirstNameInGroup( nAreaId, WIN_AREAOUTLINE)
|
||||
-- lo copio per outline area dell'anta
|
||||
local nAreaOutlineLayerId = EgtGroup( nSashAreaId)
|
||||
EgtSetName( nAreaOutlineLayerId, WIN_AREAOUTLINE)
|
||||
local nAreaOutlineId = EgtGetFirstInGroup( nPrevAreaOutlineId)
|
||||
while nAreaOutlineId do
|
||||
local nOutlineId = EgtCopy( nAreaOutlineId, nAreaOutlineLayerId)
|
||||
EgtSetInfo( nOutlineId, WIN_SOU, nAreaOutlineId)
|
||||
EgtRemoveInfo( nOutlineId, WIN_CHILD)
|
||||
AddInfo( nAreaOutlineId, WIN_CHILD, nOutlineId)
|
||||
nAreaOutlineId = EgtGetNext( nAreaOutlineId)
|
||||
end
|
||||
-- imposto tipo giunzioni
|
||||
EgtSetInfo( nAreaOutlineLayerId, WIN_JOINTS, vJoints)
|
||||
-- imposto tipo di anta e di apertura se presente
|
||||
if nSashType then
|
||||
EgtSetInfo( nSashAreaId, WIN_SASHTYPE, nSashType)
|
||||
end
|
||||
if nOpeningType then
|
||||
EgtSetInfo( nSashAreaId, WIN_OPENING_TYPE, nOpeningType)
|
||||
end
|
||||
return nSashAreaId
|
||||
end
|
||||
|
||||
----------------------------------------------------------------------------------
|
||||
-------------------------------------- FILL --------------------------------------
|
||||
----------------------------------------------------------------------------------
|
||||
-- funzione che aggiunge un riempimento
|
||||
function WinCreate.AddFill( nAreaId, FillType)
|
||||
-- creo nuova area
|
||||
local nFillAreaId = EgtGroup( nAreaId)
|
||||
EgtSetName( nFillAreaId, WIN_AREA .. '(' .. WIN_FILL .. ')')
|
||||
-- imposto il tipo
|
||||
EgtSetInfo( nFillAreaId, WIN_AREATYPE, WIN_AREATYPES.FILL)
|
||||
-- recupero outline area precedente
|
||||
local nPrevAreaOutlineId = EgtGetFirstNameInGroup( nAreaId, WIN_AREAOUTLINE)
|
||||
-- lo copio per outline area del riempimento
|
||||
local nAreaOutlineLayerId = EgtGroup( nFillAreaId)
|
||||
EgtSetName( nAreaOutlineLayerId, WIN_AREAOUTLINE)
|
||||
local nAreaOutlineId = EgtGetFirstInGroup( nPrevAreaOutlineId)
|
||||
while nAreaOutlineId do
|
||||
local nOutlineId = EgtCopy( nAreaOutlineId, nAreaOutlineLayerId)
|
||||
EgtSetInfo( nOutlineId, WIN_SOU, nAreaOutlineId)
|
||||
EgtRemoveInfo( nOutlineId, WIN_CHILD)
|
||||
AddInfo( nAreaOutlineId, WIN_CHILD, nOutlineId)
|
||||
nAreaOutlineId = EgtGetNext( nAreaOutlineId)
|
||||
end
|
||||
-- rimuovo eventuali info di giunzioni
|
||||
EgtRemoveInfo( nAreaOutlineLayerId, WIN_JOINTS)
|
||||
|
||||
-- imposto tipo di fill
|
||||
EgtSetInfo( nFillAreaId, WIN_FILLTYPE, FillType)
|
||||
return nFillAreaId
|
||||
end
|
||||
|
||||
----------------------------------------------------------------------------------
|
||||
------------------------------------- SPLIT --------------------------------------
|
||||
----------------------------------------------------------------------------------
|
||||
-- funzione che crea un taglio split
|
||||
function WinCreate.AddSplit( nAreaLayerId, SplitType, MeasureType, nPosition, nProportion, nSplitType)
|
||||
-- creo layer temporaneo per split
|
||||
local nTempSplitLayerId = EgtGroup( nAreaLayerId)
|
||||
EgtSetName( nTempSplitLayerId, WIN_TEMPSPLIT)
|
||||
-- recupero contorno area precedente
|
||||
local nOutlineLayerId = EgtGetFirstNameInGroup( nAreaLayerId, WIN_AREAOUTLINE)
|
||||
local b3OutlineLayer = EgtGetBBox( nOutlineLayerId, GDB_BB.STANDARD)
|
||||
local nTotSplitId
|
||||
if SplitType == WIN_SPLITORIENTATION.VERTICAL then
|
||||
-- creo linea
|
||||
local nCalcPosition = 0
|
||||
if MeasureType == WIN_MEASURE.ABSOLUT then
|
||||
nCalcPosition = nPosition
|
||||
elseif MeasureType == WIN_MEASURE.PROPORTIONAL then
|
||||
nCalcPosition = b3OutlineLayer:getDimX() / nProportion * nPosition
|
||||
elseif MeasureType == WIN_MEASURE.PERCENTAGE then
|
||||
nCalcPosition = b3OutlineLayer:getDimX() * nPosition
|
||||
end
|
||||
nTotSplitId = EgtLine( nTempSplitLayerId, b3OutlineLayer:getMin() + X_AX() * nCalcPosition, b3OutlineLayer:getMin() + X_AX() * nCalcPosition + Y_AX() * b3OutlineLayer:getDimY())
|
||||
elseif SplitType == WIN_SPLITORIENTATION.HORIZONTAL then
|
||||
-- creo linea
|
||||
local nCalcPosition = 0
|
||||
if MeasureType == WIN_MEASURE.ABSOLUT then
|
||||
nCalcPosition = nPosition
|
||||
elseif MeasureType == WIN_MEASURE.PROPORTIONAL then
|
||||
nCalcPosition = b3OutlineLayer:getDimY() / nProportion * nPosition
|
||||
elseif MeasureType == WIN_MEASURE.PERCENTAGE then
|
||||
nCalcPosition = b3OutlineLayer:getDimY() * nPosition
|
||||
end
|
||||
nTotSplitId = EgtLine( nTempSplitLayerId, b3OutlineLayer:getMin() + Y_AX() * nCalcPosition, b3OutlineLayer:getMin() + Y_AX() * nCalcPosition + X_AX() * b3OutlineLayer:getDimX())
|
||||
end
|
||||
-- calcolo split
|
||||
local nArea1Id, nArea2Id = WinCreate.AddGenSplit( nAreaLayerId, nTotSplitId, nSplitType)
|
||||
EgtErase( nTempSplitLayerId)
|
||||
return nArea1Id, nArea2Id
|
||||
end
|
||||
|
||||
----------------------------------------------------------------------------------
|
||||
-- funzione che crea tagli split multipli
|
||||
function WinCreate.AddSplits( nAreaLayerId, SplitType, MeasureType, PositionList, nProportion, nSplitType)
|
||||
local AreaList = {}
|
||||
if MeasureType == WIN_MEASURE.ABSOLUT then
|
||||
local nResArea1
|
||||
local nResArea2 = nAreaLayerId
|
||||
for nIndex = 1, #PositionList do
|
||||
if nIndex > 1 then
|
||||
EgtSetInfo( nResArea2, WIN_PRJ_ORIGSPLIT, nAreaLayerId)
|
||||
end
|
||||
nResArea1, nResArea2 = WinCreate.AddSplit( nResArea2, SplitType, MeasureType, PositionList[nIndex], nProportion, nSplitType)
|
||||
table.insert( AreaList, nResArea1)
|
||||
if nIndex == #PositionList then
|
||||
table.insert( AreaList, nResArea2)
|
||||
end
|
||||
end
|
||||
elseif MeasureType == WIN_MEASURE.PROPORTIONAL then
|
||||
local nResArea1
|
||||
local nResArea2 = nAreaLayerId
|
||||
local dAddPosition = 0
|
||||
for nIndex = 1, #PositionList do
|
||||
if nIndex > 1 then
|
||||
EgtSetInfo( nResArea2, WIN_PRJ_ORIGSPLIT, nAreaLayerId)
|
||||
end
|
||||
nResArea1, nResArea2 = WinCreate.AddSplit( nResArea2, SplitType, MeasureType, PositionList[nIndex], nProportion - dAddPosition, nSplitType)
|
||||
table.insert( AreaList, nResArea1)
|
||||
if nIndex == #PositionList then
|
||||
table.insert( AreaList, nResArea2)
|
||||
end
|
||||
dAddPosition = dAddPosition + PositionList[nIndex]
|
||||
end
|
||||
elseif MeasureType == WIN_MEASURE.PERCENTAGE then
|
||||
local nResArea1
|
||||
local nResArea2 = nAreaLayerId
|
||||
local dAddPosition = 0
|
||||
local sChildAreas = ''
|
||||
for nIndex = 1, #PositionList do
|
||||
if nIndex > 1 then
|
||||
EgtSetInfo( nResArea2, WIN_PRJ_ORIGSPLIT, nAreaLayerId)
|
||||
sChildAreas = sChildAreas .. nResArea2 .. EgtIf( nIndex < #PositionList, ',', '')
|
||||
end
|
||||
nResArea1, nResArea2 = WinCreate.AddSplit( nResArea2, SplitType, MeasureType, EgtIf( nIndex == 1, PositionList[nIndex], PositionList[nIndex] / ( 1 - dAddPosition)), nProportion, nSplitType)
|
||||
table.insert( AreaList, nResArea1)
|
||||
if nIndex == #PositionList then
|
||||
table.insert( AreaList, nResArea2)
|
||||
end
|
||||
dAddPosition = dAddPosition + PositionList[nIndex]
|
||||
end
|
||||
EgtSetInfo( nAreaLayerId, 'ChildSplit', sChildAreas)
|
||||
end
|
||||
return AreaList
|
||||
end
|
||||
|
||||
----------------------------------------------------------------------------------
|
||||
-- funzione che assegna il nome alla curva di split nella sottoarea in base alla sua direzione
|
||||
local function SetSplitName( nSplitId)
|
||||
|
||||
local vtMedia = ( ( EgtEV( nSplitId) - EgtSV( nSplitId)) / 2)
|
||||
if not vtMedia:normalize() then
|
||||
vtMedia = EgtSV( nSplitId)
|
||||
end
|
||||
if abs( vtMedia:getX()) > abs( vtMedia:getY()) then
|
||||
if vtMedia:getX() > 0 then
|
||||
EgtSetName( nSplitId, WIN_BOTTOM)
|
||||
else
|
||||
EgtSetName( nSplitId, WIN_TOP)
|
||||
end
|
||||
else
|
||||
if vtMedia:getY() > 0 then
|
||||
EgtSetName( nSplitId, WIN_RIGHT)
|
||||
else
|
||||
EgtSetName( nSplitId, WIN_LEFT)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
----------------------------------------------------------------------------------
|
||||
-- funzione che crea le aree da un taglio split
|
||||
local function CreateAreaFromSplit( nAreaLayerId, nCompo, nSplitId, dPar1, dPar2, vOutlineCrvs)
|
||||
|
||||
-- creo layer per le due sottoaree
|
||||
local nArea1Id = EgtGroup( nAreaLayerId)
|
||||
EgtSetName( nArea1Id , WIN_AREA1)
|
||||
EgtSetInfo( nArea1Id, WIN_AREATYPE, WIN_AREATYPES.NULL)
|
||||
local nArea1OutlineLayerId = EgtGroup( nArea1Id)
|
||||
EgtSetName( nArea1OutlineLayerId , WIN_AREAOUTLINE)
|
||||
local nArea2Id = EgtGroup( nAreaLayerId)
|
||||
EgtSetName( nArea2Id , WIN_AREA2)
|
||||
EgtSetInfo( nArea2Id, WIN_AREATYPE, WIN_AREATYPES.NULL)
|
||||
local nArea2OutlineLayerId = EgtGroup( nArea2Id)
|
||||
EgtSetName( nArea2OutlineLayerId , WIN_AREAOUTLINE)
|
||||
|
||||
-- ad ogni sottoarea associo la porzione di curva composita corrispondente
|
||||
local nCrv1 = EgtCopyGlob( nCompo, nArea1OutlineLayerId)
|
||||
local nCrv2 = EgtCopyGlob( nCompo, nArea2OutlineLayerId)
|
||||
EgtTrimCurveStartEndAtParam( nCrv1, dPar2, dPar1)
|
||||
EgtTrimCurveStartEndAtParam( nCrv2, dPar1, dPar2)
|
||||
|
||||
-- copio curva di split
|
||||
local nSplitId1 = EgtCopyGlob( nSplitId, nArea1OutlineLayerId)
|
||||
local nSplitId2 = EgtCopyGlob( nSplitId, nArea2OutlineLayerId)
|
||||
-- verifico se necessaria inversione
|
||||
if AreSamePointApprox( EgtSP( nSplitId1), EgtSP( nCrv1)) then
|
||||
EgtInvertCurve( nSplitId1)
|
||||
end
|
||||
if AreSamePointApprox( EgtSP( nSplitId2), EgtSP( nCrv2)) then
|
||||
EgtInvertCurve( nSplitId2)
|
||||
end
|
||||
-- assegno il nome in base alla direzione
|
||||
SetSplitName( nSplitId1)
|
||||
SetSplitName( nSplitId2)
|
||||
-- assengo le info di source e child
|
||||
EgtSetInfo( nSplitId, WIN_CHILD, { nSplitId1, nSplitId2})
|
||||
EgtSetInfo( nSplitId1, WIN_SOU, nSplitId)
|
||||
EgtSetInfo( nSplitId2, WIN_SOU, nSplitId)
|
||||
|
||||
-- spezzo le curve composite per riottenere le curve originarie di partenza
|
||||
local nFirst1, nCnt1 = EgtExplodeCurveCompo( nCrv1)
|
||||
local nFirst2, nCnt2 = EgtExplodeCurveCompo( nCrv2)
|
||||
-- assegno nome e info
|
||||
local vCrvs = EgtTableFill( nFirst1, nCnt1)
|
||||
EgtTableAdd( vCrvs, nFirst2, nCnt2)
|
||||
for i = 1, #vCrvs do
|
||||
-- ricavo la curva di outline originale da cui deriva
|
||||
local ptM = EgtMP( vCrvs[i])
|
||||
for j = 1, #vOutlineCrvs do
|
||||
if EgtCurveParamAtPoint( vOutlineCrvs[j], ptM, 100 * GEO.EPS_SMALL) then
|
||||
-- ne prendo il nome
|
||||
EgtSetName( vCrvs[i], EgtGetName( vOutlineCrvs[j]))
|
||||
-- assegno le info di child e source
|
||||
EgtSetInfo( vCrvs[i], WIN_SOU, vOutlineCrvs[j])
|
||||
AddInfo( vOutlineCrvs[j], WIN_CHILD, vCrvs[i])
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- scorro pezzi del primo e secondo outline per avere bottom come primo
|
||||
local nFirstInAreaId = EgtGetFirstInGroup( nArea1OutlineLayerId)
|
||||
local sFirstInAreaName = EgtGetName( nFirstInAreaId)
|
||||
while sFirstInAreaName ~= WIN_BOTTOM do
|
||||
EgtRelocate( nFirstInAreaId, nArea1OutlineLayerId)
|
||||
nFirstInAreaId = EgtGetFirstInGroup( nArea1OutlineLayerId)
|
||||
sFirstInAreaName = EgtGetName( nFirstInAreaId)
|
||||
end
|
||||
nFirstInAreaId = EgtGetFirstInGroup( nArea2OutlineLayerId)
|
||||
sFirstInAreaName = EgtGetName( nFirstInAreaId)
|
||||
while sFirstInAreaName ~= WIN_BOTTOM do
|
||||
EgtRelocate( nFirstInAreaId, nArea2OutlineLayerId)
|
||||
nFirstInAreaId = EgtGetFirstInGroup( nArea2OutlineLayerId)
|
||||
sFirstInAreaName = EgtGetName( nFirstInAreaId)
|
||||
end
|
||||
|
||||
return nArea1Id, nArea2Id
|
||||
end
|
||||
|
||||
----------------------------------------------------------------------------------
|
||||
-- funzione che crea un taglio split da una curva generica
|
||||
function WinCreate.AddGenSplit( nAreaLayerId, nSplitId, nSplitType)
|
||||
-- se area nulla diventa di tipo split
|
||||
local nAreaType = EgtGetInfo( nAreaLayerId, WIN_AREATYPE, 'i')
|
||||
if nAreaType == WIN_AREATYPES.NULL then
|
||||
EgtSetInfo( nAreaLayerId, WIN_AREATYPE, WIN_AREATYPES.SPLIT)
|
||||
end
|
||||
-- creo layer per split
|
||||
local nSplitLayerId = EgtGroup( nAreaLayerId)
|
||||
EgtSetName( nSplitLayerId, WIN_BASESPLIT)
|
||||
-- sposto curva split nel layer
|
||||
EgtRelocateGlob( nSplitId, nSplitLayerId)
|
||||
-- assegno nome profilo
|
||||
EgtSetName( nSplitId, WIN_SPLIT)
|
||||
|
||||
-- verifico se devo impostare tipo di split ( solo se deriva da tipo frame)
|
||||
if nSplitType then
|
||||
local nParentAreaId = nAreaLayerId
|
||||
local nParentAreaType = nAreaType
|
||||
-- recupero parent fino a trovare frame o sash
|
||||
while nParentAreaType ~= WIN_AREATYPES.FRAME and nParentAreaType ~= WIN_AREATYPES.SASH do
|
||||
nParentAreaId = EgtGetParent( nParentAreaId)
|
||||
nParentAreaType = EgtGetInfo( nParentAreaId, WIN_AREATYPE, 'i')
|
||||
end
|
||||
if nParentAreaType == WIN_AREATYPES.FRAME then
|
||||
-- imposto tipo di split
|
||||
EgtSetInfo( nSplitLayerId, WIN_SPLITTYPE, nSplitType)
|
||||
end
|
||||
end
|
||||
|
||||
-- Ricerca delle intersezioni :
|
||||
-- creo una curva composita a partire da tutte le curve di outline
|
||||
local nOutlineLayerId = EgtGetFirstNameInGroup( nAreaLayerId, WIN_AREAOUTLINE)
|
||||
local vOutlineCrvs = EgtGetAllInGroup( nOutlineLayerId)
|
||||
local nCompo = EgtCurveCompo( nSplitLayerId, vOutlineCrvs, false)
|
||||
-- allungo curva split per cercare intersezioni
|
||||
EgtExtendCurveStartByLen( nSplitId, 10)
|
||||
EgtExtendCurveEndByLen( nSplitId, 10)
|
||||
-- trovo intersezioni tra composita e lo split
|
||||
local nFirst, nPntCnt, nCrvCnt = EgtCurveCurveInters( nCompo, nSplitId, nSplitLayerId)
|
||||
if nCrvCnt ~= 0 or nPntCnt ~= 2 then
|
||||
-- errore
|
||||
return
|
||||
end
|
||||
-- recupero i due punti di intersezione
|
||||
local pt1 = EgtSP( nFirst)
|
||||
local pt2 = EgtSP( nFirst + 1)
|
||||
EgtErase( { nFirst, nFirst + 1})
|
||||
|
||||
-- recupero i parametri di intersezione sulla curva di split
|
||||
local dSplitParS = EgtCurveParamAtPoint( nSplitId, pt1, 100 * GEO.EPS_SMALL)
|
||||
local dSplitParE = EgtCurveParamAtPoint( nSplitId, pt2, 100 * GEO.EPS_SMALL)
|
||||
-- recupero i parametri di intersezione sulla curva composita
|
||||
local dPar1 = EgtCurveParamAtPoint( nCompo, pt1, 100 * GEO.EPS_SMALL)
|
||||
local dPar2 = EgtCurveParamAtPoint( nCompo, pt2, 100 * GEO.EPS_SMALL)
|
||||
|
||||
-- ricavo i parametri di intersezione legati a start ed end dello split
|
||||
local dParCrvS = dPar1
|
||||
local dParCrvE = dPar2
|
||||
if dSplitParS > dSplitParE then
|
||||
dSplitParS, dSplitParE = dSplitParE, dSplitParS
|
||||
dParCrvS, dParCrvE = dParCrvE, dParCrvS
|
||||
end
|
||||
|
||||
-- taglio la curva di split nei punti di intersezione
|
||||
EgtTrimCurveStartEndAtParam( nSplitId, dSplitParS, dSplitParE)
|
||||
|
||||
-- setto info per intersezione start
|
||||
-- se il parametro è intero allora l'intersezione coinvolge due curve successive
|
||||
if abs( dParCrvS - ceil( dParCrvS)) < GEO.EPS_SMALL then
|
||||
local nCrv = vOutlineCrvs[ ceil( dParCrvS) + 1]
|
||||
local nOther = EgtGetPrev( nCrv) or EgtGetLastInGroup( nOutlineLayerId)
|
||||
EgtSetInfo( nSplitId, WIN_SPLIT_STARTINTERS, { nOther, nCrv})
|
||||
elseif abs( dParCrvS - floor( dParCrvS)) < GEO.EPS_SMALL then
|
||||
local nCrv = vOutlineCrvs[ floor( dParCrvS) + 1]
|
||||
local nOther = EgtGetPrev( nCrv) or EgtGetLastInGroup( nOutlineLayerId)
|
||||
EgtSetInfo( nSplitId, WIN_SPLIT_STARTINTERS, { nOther, nCrv})
|
||||
else
|
||||
-- se il parametro non è intero allora l'intersezione coinvolge una sola curva
|
||||
local nCrv = vOutlineCrvs[ floor( dParCrvS) + 1]
|
||||
EgtSetInfo( nSplitId, WIN_SPLIT_STARTINTERS, { nCrv})
|
||||
end
|
||||
|
||||
-- setto info per intersezione end
|
||||
if abs( dParCrvE - ceil( dParCrvE)) < GEO.EPS_SMALL then
|
||||
local nCrv = vOutlineCrvs[ ceil( dParCrvE) + 1]
|
||||
local nOther = EgtGetPrev( nCrv) or EgtGetLastInGroup( nOutlineLayerId)
|
||||
EgtSetInfo( nSplitId, WIN_SPLIT_ENDINTERS, { nOther, nCrv})
|
||||
elseif abs( dParCrvE - floor( dParCrvE)) < GEO.EPS_SMALL then
|
||||
local nCrv = vOutlineCrvs[ floor( dParCrvE) + 1]
|
||||
local nOther = EgtGetPrev( nCrv) or EgtGetLastInGroup( nOutlineLayerId)
|
||||
EgtSetInfo( nSplitId, WIN_SPLIT_ENDINTERS, { nOther, nCrv})
|
||||
else
|
||||
local nCrv = vOutlineCrvs[ floor( dParCrvE) + 1]
|
||||
EgtSetInfo( nSplitId, WIN_SPLIT_ENDINTERS, { nCrv})
|
||||
end
|
||||
|
||||
-- creo sottoaree
|
||||
local nArea1, nArea2 = CreateAreaFromSplit( nAreaLayerId, nCompo, nSplitId, dPar1, dPar2, vOutlineCrvs)
|
||||
|
||||
EgtErase( nCompo)
|
||||
|
||||
return nArea1, nArea2
|
||||
|
||||
end
|
||||
|
||||
----------------------------------------------------------------------------------
|
||||
-- funzione che crea tagli split da curve generiche
|
||||
function WinCreate.AddGenSplits( nAreaLayerId, SplitList)
|
||||
for nIndex = 1, #SplitList do
|
||||
WinCreate.AddSplit( nAreaLayerId, SplitList[nIndex])
|
||||
end
|
||||
end
|
||||
|
||||
----------------------------------------------------------------------------------
|
||||
---------------------------------- BOTTOMRAIL ------------------------------------
|
||||
----------------------------------------------------------------------------------
|
||||
-- funzione che aggiunge uno zoccolo
|
||||
function WinCreate.AddBottomRail( nAreaId)
|
||||
local nAreaType = EgtGetInfo( nAreaId, WIN_AREATYPE, 'i')
|
||||
if nAreaType == WIN_AREATYPES.FRAME then
|
||||
-- recupero l'outline bottom
|
||||
local nBaseOutlineLayerId = EgtGetFirstNameInGroup( nAreaId, WIN_AREAOUTLINE)
|
||||
EgtSetInfo( nBaseOutlineLayerId, WIN_BOTTOMRAIL, 1)
|
||||
end
|
||||
end
|
||||
|
||||
----------------------------------------------------------------------------------
|
||||
---------------------------------- FERRAMENTA ------------------------------------
|
||||
----------------------------------------------------------------------------------
|
||||
function WinCreate.AddHardware( nFrameId, sFavourite, sHandle)
|
||||
EgtSetInfo( nFrameId, WIN_HDW_FAVOURITE, sFavourite)
|
||||
EgtSetInfo( nFrameId, WIN_HDW_HANDLE, sHandle)
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
return WinCreate
|
||||
@@ -0,0 +1,34 @@
|
||||
--
|
||||
-- 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
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
local WinDesign = {}
|
||||
|
||||
-- Include
|
||||
require( 'EgtBase')
|
||||
require( 'WinConst')
|
||||
|
||||
-- funzioni
|
||||
|
||||
function WinDesign.DesignFrame( dWidth, dHeight, nJointBL, nJointBR, nJointTR, nJointTL)
|
||||
|
||||
end
|
||||
|
||||
function WinDesign.DesignSash( sFilePath)
|
||||
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
return WinDesign
|
||||
@@ -0,0 +1,264 @@
|
||||
--
|
||||
-- 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
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
local WinManageProject = {}
|
||||
|
||||
-- Include
|
||||
require( 'EgtBase')
|
||||
_G.package.loaded.WinConst = nil
|
||||
require( 'WinConst')
|
||||
_G.package.loaded.WinJWDConst = nil
|
||||
require( 'WinJWDConst')
|
||||
_G.package.loaded.WinCreate = nil
|
||||
local WinCreate = require( 'WinCreate')
|
||||
_G.package.loaded.JSON = nil
|
||||
local JSON = require( 'JSON')
|
||||
|
||||
-- funzioni
|
||||
local function ConvertCurveToTableEntity( nCurveId)
|
||||
-- verifico il tipo di entita'
|
||||
local nBaseOutlineType = EgtGetType( nCurveId)
|
||||
if nBaseOutlineType == GDB_TY.CRV_LINE then
|
||||
local ptStart = EgtSP( nCurveId)
|
||||
local ptEnd = EgtEP( nCurveId)
|
||||
return { [JWD_CRV_TYPE] = nBaseOutlineType, [JWD_POINT_START] = ptStart, [JWD_POINT_END] = ptEnd}
|
||||
elseif nBaseOutlineType == GDB_TY.CRV_ARC then
|
||||
local ptStart = EgtSP( nCurveId)
|
||||
local ptEnd = EgtEP( nCurveId)
|
||||
local ptMid = EgtMP( nCurveId)
|
||||
return { [JWD_CRV_TYPE] = nBaseOutlineType, [JWD_POINT_START] = ptStart, [JWD_POINT_END] = ptEnd, [JWD_POINT_MID] = ptMid}
|
||||
elseif nBaseOutlineType == GDB_TY.CRV_COMPO then
|
||||
-- local ptStart = EgtSP( nCurveId)
|
||||
-- local ptEnd = EgtEP( nCurveId)
|
||||
-- local ptMid = EgtMP( nCurveId)
|
||||
-- return { Type = nBaseOutlineType, ptStart = ptStart, ptEnd = ptEnd, ptMid = ptMid}
|
||||
end
|
||||
end
|
||||
|
||||
-- funzione ricorsiva che legge le aree e ne riporta i dati in tabella
|
||||
local function ConvertAreaToTable( nAreaId)
|
||||
local AreaTable = {}
|
||||
local nAreaType = EgtGetInfo( nAreaId, WIN_AREATYPE, 'i')
|
||||
AreaTable[JWD_AREA_TYPE] = nAreaType
|
||||
if nAreaType == WIN_AREATYPES.NULL then
|
||||
-- non faccio nulla
|
||||
elseif nAreaType == WIN_AREATYPES.FRAME then
|
||||
-- recupero outline del frame
|
||||
local nBaseOutlineLayerId = EgtGetFirstNameInGroup( nAreaId, WIN_AREAOUTLINE, 'i')
|
||||
local JointTable = {}
|
||||
-- recupero tipo giunzioni
|
||||
local nJointBL = EgtGetInfo( nBaseOutlineLayerId, WIN_JOINT_BL, 'i')
|
||||
local nJointBR = EgtGetInfo( nBaseOutlineLayerId, WIN_JOINT_BR, 'i')
|
||||
local nJointTL = EgtGetInfo( nBaseOutlineLayerId, WIN_JOINT_TL, 'i')
|
||||
local nJointTR = EgtGetInfo( nBaseOutlineLayerId, WIN_JOINT_TR, 'i')
|
||||
JointTable[JWD_JOINT_BL] = nJointBL
|
||||
JointTable[JWD_JOINT_BR] = nJointBR
|
||||
JointTable[JWD_JOINT_TL] = nJointTL
|
||||
JointTable[JWD_JOINT_TR] = nJointTR
|
||||
local OutlineTable = {}
|
||||
-- recupero contorno
|
||||
local nBaseOutlineId = EgtGetFirstInGroup( nBaseOutlineLayerId)
|
||||
local nBaseOutlineIndex = 1
|
||||
while nBaseOutlineId do
|
||||
local Entity = ConvertCurveToTableEntity( nBaseOutlineId)
|
||||
table.insert( OutlineTable, Entity)
|
||||
nBaseOutlineIndex = nBaseOutlineIndex + 1
|
||||
nBaseOutlineId = EgtGetNext( nBaseOutlineId)
|
||||
end
|
||||
AreaTable[JWD_JOINT] = JointTable
|
||||
AreaTable[JWD_OUTLINE] = OutlineTable
|
||||
-- verifico se c'e' BottomRail
|
||||
local nBottomRailId = EgtGetInfo( nBaseOutlineLayerId, WIN_BOTTOMRAIL, 'i')
|
||||
if nBottomRailId then
|
||||
AreaTable[JWD_BOTTOM_RAIL] = 1
|
||||
end
|
||||
elseif nAreaType == WIN_AREATYPES.SASH then
|
||||
local nBaseOutlineLayerId = EgtGetFirstNameInGroup( nAreaId, WIN_AREAOUTLINE)
|
||||
local JointTable = {}
|
||||
-- recupero tipo giunzioni
|
||||
local nJointBL = EgtGetInfo( nBaseOutlineLayerId, WIN_JOINT_BL, 'i')
|
||||
local nJointBR = EgtGetInfo( nBaseOutlineLayerId, WIN_JOINT_BR, 'i')
|
||||
local nJointTL = EgtGetInfo( nBaseOutlineLayerId, WIN_JOINT_TL, 'i')
|
||||
local nJointTR = EgtGetInfo( nBaseOutlineLayerId, WIN_JOINT_TR, 'i')
|
||||
JointTable[JWD_JOINT_BL] = nJointBL
|
||||
JointTable[JWD_JOINT_BR] = nJointBR
|
||||
JointTable[JWD_JOINT_TL] = nJointTL
|
||||
JointTable[JWD_JOINT_TR] = nJointTR
|
||||
AreaTable[JWD_JOINT] = JointTable
|
||||
local nSashType = EgtGetInfo( nAreaId, WIN_SASHTYPE, 'i')
|
||||
if nSashType then
|
||||
AreaTable[JWD_SASH_TYPE] = nSashType
|
||||
end
|
||||
elseif nAreaType == WIN_AREATYPES.FILL then
|
||||
local nFillType = EgtGetInfo( nAreaId, WIN_FILLTYPE, 'i')
|
||||
AreaTable[JWD_FILL_TYPE] = nFillType
|
||||
|
||||
elseif nAreaType == WIN_AREATYPES.SPLIT then
|
||||
|
||||
|
||||
end
|
||||
-- verifico se c'e' Split
|
||||
local nSplitLayerId = EgtGetFirstNameInGroup( nAreaId, WIN_BASESPLIT)
|
||||
if nSplitLayerId then
|
||||
local SplitTable = {}
|
||||
local nSplitId = EgtGetFirstInGroup( nSplitLayerId)
|
||||
local Entity = ConvertCurveToTableEntity( nSplitId)
|
||||
table.insert( SplitTable, Entity)
|
||||
AreaTable[JWD_SPLIT] = SplitTable
|
||||
end
|
||||
-- ciclo sulle aree contenute
|
||||
local nChildAreaId = EgtGetFirstNameInGroup( nAreaId, WIN_AREAASTERISK)
|
||||
local nChildIndex = 1
|
||||
while nChildAreaId do
|
||||
local ChildTable = ConvertAreaToTable( nChildAreaId)
|
||||
local AreaName = JWD_AREA .. nChildIndex
|
||||
AreaTable[AreaName] = ChildTable
|
||||
nChildIndex = nChildIndex + 1
|
||||
nChildAreaId = EgtGetNextName( nChildAreaId, WIN_AREAASTERISK)
|
||||
end
|
||||
return AreaTable
|
||||
end
|
||||
|
||||
-- funzione che converte una curva descritta in tabella in una geometria
|
||||
local function ConvertCurveTableToEntity( nDrawFrameLayerId, CurrCurve)
|
||||
if CurrCurve[JWD_CRV_TYPE] == GDB_TY.CRV_LINE then
|
||||
EgtLine( nDrawFrameLayerId, Point3d(CurrCurve[JWD_POINT_START]), Point3d(CurrCurve[JWD_POINT_END]))
|
||||
elseif CurrCurve[JWD_CRV_TYPE] == GDB_TY.CRV_ARC then
|
||||
EgtArc3P( nDrawFrameLayerId, Point3d(CurrCurve[JWD_POINT_START]), Point3d(CurrCurve[JWD_POINT_MID]), Point3d(CurrCurve[JWD_POINT_END]))
|
||||
elseif CurrCurve[JWD_CRV_TYPE] == GDB_TY.CRV_COMPO then
|
||||
-- local ptStart = EgtSP( nBaseOutlineId)
|
||||
-- local ptEnd = EgtEP( nBaseOutlineId)
|
||||
-- local ptMid = EgtMP( nBaseOutlineId)
|
||||
-- local Entity = { Type = nBaseOutlineType, ptStart = ptStart, ptEnd = ptEnd, ptMid = ptMid}
|
||||
end
|
||||
end
|
||||
|
||||
-- funzione ricorsiva che legge le aree in tabella e crea le geometrie
|
||||
local function ConvertTableToGeometry( AreaTable, nAreaId)
|
||||
if AreaTable[JWD_AREA_TYPE] == WIN_AREATYPES.NULL then
|
||||
|
||||
elseif AreaTable[JWD_AREA_TYPE] == WIN_AREATYPES.FRAME then
|
||||
-- creo gruppo e layer per contorno
|
||||
local nDrawFramePartId = EgtGroup( GDB_ID.ROOT)
|
||||
EgtSetName( nDrawFramePartId, 'DrawFrame')
|
||||
local nDrawFrameLayerId = EgtGroup( nDrawFramePartId)
|
||||
for nIndex = 1, #AreaTable[JWD_OUTLINE] do
|
||||
local CurrCurve = AreaTable[JWD_OUTLINE][nIndex]
|
||||
ConvertCurveTableToEntity( nDrawFrameLayerId, CurrCurve)
|
||||
end
|
||||
local nFrameBottomId = EgtGetFirstInGroup(nDrawFrameLayerId)
|
||||
EgtSetName( nFrameBottomId, WIN_BOTTOM)
|
||||
local nFrameRightId = EgtGetNext(nFrameBottomId)
|
||||
EgtSetName( nFrameRightId, WIN_RIGHT)
|
||||
local nFrameTopId = EgtGetNext(nFrameRightId)
|
||||
EgtSetName( nFrameTopId, WIN_TOP)
|
||||
local nFrameLeftId = EgtGetNext(nFrameTopId)
|
||||
EgtSetName( nFrameLeftId, WIN_LEFT)
|
||||
-- creo frame
|
||||
nAreaId = WinCreate.CreateGenFrame( {nFrameBottomId, nFrameRightId, nFrameTopId, nFrameLeftId}, {AreaTable[JWD_JOINT][JWD_JOINT_BL], AreaTable[JWD_JOINT][JWD_JOINT_BR], AreaTable[JWD_JOINT][JWD_JOINT_TR], AreaTable[JWD_JOINT][JWD_JOINT_TL]})
|
||||
-- elimino contorno frame
|
||||
EgtErase( nDrawFramePartId)
|
||||
-- se BottomRail
|
||||
if AreaTable[JWD_BOTTOM_RAIL] and AreaTable[JWD_BOTTOM_RAIL] == 1 then
|
||||
WinCreate.AddBottomRail( nAreaId)
|
||||
end
|
||||
elseif AreaTable[JWD_AREA_TYPE] == WIN_AREATYPES.SASH then
|
||||
nAreaId = WinCreate.AddSash( nAreaId, {AreaTable[JWD_JOINT][JWD_JOINT_BL], AreaTable[JWD_JOINT][JWD_JOINT_BR], AreaTable[JWD_JOINT][JWD_JOINT_TR], AreaTable[JWD_JOINT][JWD_JOINT_TL]}, AreaTable[JWD_SASH_TYPE])
|
||||
elseif AreaTable[JWD_AREA_TYPE] == WIN_AREATYPES.FILL then
|
||||
WinCreate.AddFill( nAreaId, AreaTable[JWD_FILL_TYPE])
|
||||
elseif AreaTable[JWD_AREA_TYPE] == WIN_AREATYPES.SPLIT then
|
||||
|
||||
end
|
||||
-- verifico se c'e' Split
|
||||
if AreaTable[JWD_SPLIT] then
|
||||
-- creo gruppo e layer per Split
|
||||
local nDrawFramePartId = EgtGroup( GDB_ID.ROOT)
|
||||
EgtSetName( nDrawFramePartId, 'DrawFrame')
|
||||
local nDrawFrameLayerId = EgtGroup( nDrawFramePartId)
|
||||
ConvertCurveTableToEntity( nDrawFrameLayerId, AreaTable[JWD_SPLIT][1])
|
||||
local nArea1Id, nArea2Id = WinCreate.AddGenSplit( nAreaId, EgtGetFirstInGroup(nDrawFrameLayerId), AreaTable["SplitType"])
|
||||
-- local nArea1Id, nArea2Id = WinCreate.AddGenSplit( nAreaId, EgtGetFirstInGroup(nDrawFrameLayerId))
|
||||
EgtErase(nDrawFramePartId)
|
||||
ConvertTableToGeometry( AreaTable[JWD_AREA .. 1], nArea1Id)
|
||||
ConvertTableToGeometry( AreaTable[JWD_AREA .. 2], nArea2Id)
|
||||
else
|
||||
-- ciclo sulle sotto aree
|
||||
local nChildIndex = 1
|
||||
while AreaTable[JWD_AREA ..nChildIndex] do
|
||||
ConvertTableToGeometry( AreaTable[JWD_AREA ..nChildIndex], nAreaId)
|
||||
nChildIndex = nChildIndex + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- funzione che crea le tabelle gerarchiche dalla struttura geometrica
|
||||
function WinManageProject.CreateTableFromGeom( nFrameId)
|
||||
-- creo la tabella
|
||||
local WinTable = {}
|
||||
-- riporto la path del profilo
|
||||
local nProfileId = EgtGetFirstNameInGroup( GDB_ID.ROOT, WIN_PROFILE)
|
||||
local sProfilePath = EgtGetInfo( nProfileId, WIN_PROFILEPATH)
|
||||
WinTable[JWD_PROFILE_PATH] = sProfilePath
|
||||
-- leggo aree
|
||||
local FrameTable = ConvertAreaToTable( nFrameId)
|
||||
local AreaName = JWD_AREA .. 1
|
||||
WinTable[AreaName] = FrameTable
|
||||
return WinTable
|
||||
end
|
||||
|
||||
-- funzione che crea la struttura geometrica dalle tabelle gerarchiche
|
||||
function WinManageProject.CreateGeomFromTable( WinTable)
|
||||
-- importo profilo
|
||||
if not WinCreate.ImportProfile( WinTable[JWD_PROFILE_PATH]) then
|
||||
return false
|
||||
end
|
||||
-- creo aree
|
||||
ConvertTableToGeometry( WinTable[JWD_AREA .. 1], GDB_ID.ROOT)
|
||||
return true
|
||||
end
|
||||
|
||||
-- funzione che dato un progetto gerarchico lo scrive in json su un file
|
||||
function WinManageProject.WriteToFile( nFrameId, sFilePath)
|
||||
local sFilePath = EgtChangePathExtension( sFilePath, JWD_EXT)
|
||||
local WinTable = WinManageProject.CreateTableFromGeom( nFrameId)
|
||||
local sData = JSON:encode_pretty(WinTable)
|
||||
local DestFh = io.open( sFilePath, 'w+')
|
||||
if not DestFh then
|
||||
EgtOutBox( 'Error opening ' .. sFilePath, 'WriteToFile', 'ERROR')
|
||||
return
|
||||
end
|
||||
DestFh:write( sData)
|
||||
DestFh:close()
|
||||
end
|
||||
|
||||
-- funzione che dato un file in json ne crea il progetto gerarchico
|
||||
function WinManageProject.ReadFromFile( sFilePath)
|
||||
local SouFh = io.open( sFilePath, "rb")
|
||||
if not SouFh then
|
||||
EgtOutBox( 'Error opening ' .. sFilePath, 'ReadFromFile', 'ERROR')
|
||||
return false
|
||||
end
|
||||
local content = SouFh:read( "*all")
|
||||
SouFh:close()
|
||||
local tData = JSON:decode( content)
|
||||
if not WinManageProject.CreateGeomFromTable( tData) then
|
||||
return false
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
return WinManageProject
|
||||
@@ -0,0 +1,88 @@
|
||||
--
|
||||
-- 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( false)
|
||||
--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')
|
||||
|
||||
local sOpenFilePath = ''
|
||||
-- verifico se lanciato file in batch per test
|
||||
if WINDOW and WINDOW.FILE then
|
||||
sOpenFilePath = WINDOW.FILE
|
||||
else
|
||||
-- altrimenti apro dialogo di scelta file
|
||||
local sOpenDirPath = 'c:\\EgtData\\EgwWindowLua\\Projects'
|
||||
local FilePathList = EgtFindAllFiles( sOpenDirPath .. '\\*.jwd')
|
||||
local sDialogFile = 'CB:'
|
||||
for FilePathIndex = 1, #FilePathList do
|
||||
local sName = EgtSplitString( FilePathList[FilePathIndex], '.')
|
||||
sDialogFile = sDialogFile .. sName[1] .. ','
|
||||
end
|
||||
local DialogRes = EgtDialogBox( 'Open Window Project', { 'Nome Progetto', sDialogFile })
|
||||
if DialogRes and DialogRes[1] then
|
||||
sOpenFilePath = sOpenDirPath .. '\\' .. DialogRes[1] .. '.jwd'
|
||||
else
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
EgtNewFile()
|
||||
|
||||
EgtStartCounter()
|
||||
|
||||
--local sFileName = 'RoundArc_FixedGlass_Vertical&HorizontalSplit.jwd'
|
||||
if not WinManageProject.ReadFromFile( sOpenFilePath) then
|
||||
return
|
||||
end
|
||||
|
||||
-- imposto se calcolare i solidi o meno
|
||||
WinCalculate.SetCalcSolid( true)
|
||||
|
||||
-- creo i pezzi
|
||||
local nFrameId = EgtGetFirstNameInGroup( GDB_ID.ROOT, WIN_AREAASTERISK)
|
||||
WinCalculate.CreatePartFromArea( nFrameId)
|
||||
|
||||
-- preparo per automatismo lavorazioni
|
||||
-- WinCalculate.PrepareProject()
|
||||
|
||||
-- elimino profilo se in batch per test
|
||||
if WINDOW and WINDOW.TEST and WINDOW.TEST == 1 then
|
||||
local nProfileGroupId = EgtGetFirstNameInGroup( GDB_ID.ROOT, WIN_PROFILE)
|
||||
if nProfileGroupId and nProfileGroupId ~= GDB_ID.NULL then
|
||||
EgtErase( nProfileGroupId)
|
||||
end
|
||||
end
|
||||
|
||||
EgtZoom( SCE_ZM.ALL)
|
||||
|
||||
-- riporto tempi di esecuzione
|
||||
local sOut = string.format( ' ExecTime = %.2f ms', EgtStopCounter())
|
||||
EgtOutLog( sOut)
|
||||
@@ -0,0 +1,153 @@
|
||||
--
|
||||
-- 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( 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')
|
||||
|
||||
-- WDG
|
||||
|
||||
-- funzioni
|
||||
----------------------------------------------------------------------------------
|
||||
local function GetVariableList( sName)
|
||||
local List = {}
|
||||
local nIndex = 1
|
||||
while WDG[sName .. nIndex] do
|
||||
table.insert(List, WDG['JOINT' .. nIndex])
|
||||
nIndex = nIndex + 1
|
||||
end
|
||||
return List
|
||||
end
|
||||
|
||||
----------------------------------------------------------------------------------
|
||||
local function CleanVariableList( sName)
|
||||
local nIndex = 1
|
||||
while WDG[sName .. nIndex] do
|
||||
WDG[sName .. nIndex] = nil
|
||||
nIndex = nIndex + 1
|
||||
end
|
||||
end
|
||||
|
||||
----------------------------------------------------------------------------------
|
||||
local function WinCreate_ImportProfile()
|
||||
WinCreate.ImportProfile(WDG.PROFILE)
|
||||
end
|
||||
_G.WinCreate_ImportProfile = WinCreate_ImportProfile
|
||||
|
||||
----------------------------------------------------------------------------------
|
||||
local function WinCreate_CreateFrame()
|
||||
local JointList = GetVariableList('JOINT')
|
||||
WDG.AREAID = WinCreate.CreateFrame(WDG.FRAMETYPE, JointList, WDG.WIDTH, WDG.HEIGHT, WDG.HEIGHT2)
|
||||
CleanVariableList('JOINT')
|
||||
end
|
||||
_G.WinCreate_CreateFrame = WinCreate_CreateFrame
|
||||
|
||||
----------------------------------------------------------------------------------
|
||||
local function WinCreate_AddSash()
|
||||
local JointList = GetVariableList('JOINT')
|
||||
WDG.AREAID = WinCreate.AddSash( WDG.AREAID, {WDG.JOINTBL, WDG.JOINTBR, WDG.JOINTTR, WDG.JOINTTL, WDG.JOINTBL}, WDG.SASHTYPE, WDG.OPENINGTYPE)
|
||||
CleanVariableList('JOINT')
|
||||
end
|
||||
_G.WinCreate_AddSash = WinCreate_AddSash
|
||||
|
||||
----------------------------------------------------------------------------------
|
||||
local function WinCreate_AddHardware()
|
||||
WinCreate.AddHardware(WDG.AREAID, WDG.FAVOURITE, WDG.HANDLE)
|
||||
end
|
||||
_G.WinCreate_AddHardware = WinCreate_AddHardware
|
||||
|
||||
----------------------------------------------------------------------------------
|
||||
local function WinCreate_AddFill()
|
||||
WDG.AREAID = WinCreate.AddFill(WDG.AREAID, WDG.FILLTYPE)
|
||||
end
|
||||
_G.WinCreate_AddFill = WinCreate_AddFill
|
||||
|
||||
----------------------------------------------------------------------------------
|
||||
local function WinCreate_AddBottomRail()
|
||||
WinCreate.AddBottomRail(WDG.AREAID)
|
||||
end
|
||||
_G.WinCreate_AddBottomRail = WinCreate_AddBottomRail
|
||||
|
||||
----------------------------------------------------------------------------------
|
||||
local function WinCreate_AddSplits()
|
||||
local AreaIndex = 1
|
||||
while WDG['AREAID' .. AreaIndex] do
|
||||
WDG['AREAID' .. AreaIndex] = nil
|
||||
AreaIndex = AreaIndex + 1
|
||||
end
|
||||
local PositionList = {}
|
||||
local PositionIndex = 1
|
||||
while WDG['POSITION' .. PositionIndex] do
|
||||
table.insert( PositionList, WDG['POSITION' .. PositionIndex])
|
||||
PositionIndex = PositionIndex + 1
|
||||
end
|
||||
local AreaList = WinCreate.AddSplits(WDG.AREAID, WDG.SPLITORIENTATION, WDG.MEASURETYPE, PositionList, WDG.PROPORTION, WDG.SPLITTYPE)
|
||||
for AreaIndex = 1, #AreaList do
|
||||
WDG['AREAID' .. AreaIndex] = AreaList[ AreaIndex]
|
||||
end
|
||||
PositionIndex = 1
|
||||
while WDG['POSITION' .. PositionIndex] do
|
||||
WDG['POSITION' .. PositionIndex] = nil
|
||||
PositionIndex = PositionIndex + 1
|
||||
end
|
||||
end
|
||||
_G.WinCreate_AddSplits = WinCreate_AddSplits
|
||||
|
||||
----------------------------------------------------------------------------------
|
||||
local function WinCalculate_SetCalcSolid()
|
||||
WinCalculate.SetCalcSolid(WDG.VALUE)
|
||||
end
|
||||
_G.WinCalculate_SetCalcSolid = WinCalculate_SetCalcSolid
|
||||
|
||||
----------------------------------------------------------------------------------
|
||||
local function WinCalculate_SetSimplifiedSolid()
|
||||
WinCalculate.SetSimplifiedSolid(WDG.VALUE)
|
||||
end
|
||||
_G.WinCalculate_SetSimplifiedSolid = WinCalculate_SetSimplifiedSolid
|
||||
|
||||
----------------------------------------------------------------------------------
|
||||
local function WinCalculate_CreatePartFromArea()
|
||||
WinCalculate.CreatePartFromArea(WDG.FRAMEID)
|
||||
end
|
||||
_G.WinCalculate_CreatePartFromArea = WinCalculate_CreatePartFromArea
|
||||
|
||||
----------------------------------------------------------------------------------
|
||||
local function WinCalculate_AddHardware()
|
||||
WinCalculate.AddHardware(WDG.FRAMEID)
|
||||
end
|
||||
_G.WinCalculate_AddHardware = WinCalculate_AddHardware
|
||||
|
||||
----------------------------------------------------------------------------------
|
||||
local function WinCreate_GetHardwareOptionPath()
|
||||
WDG.HWDOPTPATH = WinCalculate.AddHardwareForSash(WDG.AREAID, true)
|
||||
end
|
||||
_G.WinCreate_GetHardwareOptionPath = WinCreate_GetHardwareOptionPath
|
||||
|
||||
---------------------------------------------------------------------
|
||||
@@ -0,0 +1,589 @@
|
||||
--
|
||||
-- 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( false)
|
||||
-- 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_Horizontal&VerticalSplit_Mullion'
|
||||
--
|
||||
---- 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, nArea22Id = WinCreate.AddSplit( nArea2Id, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 3)
|
||||
--local nArea22Id, nArea23Id = WinCreate.AddSplit( nArea22Id, 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&HorizontalSplit_Mullion'
|
||||
|
||||
-- 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)
|
||||
Reference in New Issue
Block a user