Merge remote-tracking branch 'origin/HEAD' into CAM_Auto

This commit is contained in:
andrea.villa
2024-06-27 16:47:21 +02:00
6 changed files with 712 additions and 479 deletions
+75 -67
View File
@@ -57,9 +57,17 @@ EgtNewFile()
-- importo profilo prescelto
WinCreate.ImportProfile( sProfilePath)
-- creo telaio rettangolare
-- creo telaio generico
local FrameJointType = WIN_JNT.FULL_H
local nFrameId = WinCreate.CreateFrame( WindowWidth, WindowHeight, FrameJointType, FrameJointType, FrameJointType, FrameJointType)
local nFrameId = WinCreate.CreateFrame( WIN_FRAME_TYPE.RECT, FrameJointType, FrameJointType, FrameJointType, FrameJointType, WindowWidth, WindowHeight)
-- local nFrameId = WinCreate.CreateFrame( WIN_FRAME_TYPE.CHAMFER_SIDE, FrameJointType, FrameJointType, FrameJointType, FrameJointType, WindowWidth, WindowHeight, WindowHeight + 500)
-- local nFrameId = WinCreate.CreateFrame( WIN_FRAME_TYPE.CHAMFER_SIDE, FrameJointType, FrameJointType, FrameJointType, FrameJointType, WindowWidth, WindowHeight + 500, WindowHeight)
-- local nFrameId = WinCreate.CreateFrame( WIN_FRAME_TYPE.CHAMFER, FrameJointType, FrameJointType, FrameJointType, FrameJointType, WindowWidth, WindowHeight, WindowHeight + 500)
-- local nFrameId = WinCreate.CreateFrame( WIN_FRAME_TYPE.ROUND_ARC, FrameJointType, FrameJointType, FrameJointType, FrameJointType, WindowWidth, WindowHeight)
-- local nFrameId = WinCreate.CreateFrame( WIN_FRAME_TYPE.SEGMENTAL_ARC, FrameJointType, FrameJointType, FrameJointType, FrameJointType, WindowWidth, WindowHeight, WindowHeight + 100)
-- local nFrameId = WinCreate.CreateFrame( WIN_FRAME_TYPE.POINTED_ARC, FrameJointType, FrameJointType, FrameJointType, FrameJointType, WindowWidth, WindowHeight, WindowHeight + 600)
-- local nFrameId = WinCreate.CreateFrame( WIN_FRAME_TYPE.TRG, FrameJointType, FrameJointType, WIN_JNT.ANGLED, WIN_JNT.ANGLED, WindowWidth, WindowHeight, 0)
-- -- creo telaio generico
-- local nDrawFramePartId = EgtGroup( GDB_ID.ROOT)
@@ -71,23 +79,23 @@ local nFrameId = WinCreate.CreateFrame( WindowWidth, WindowHeight, FrameJointTyp
-- --local nFrameTopId = EgtLine( nDrawFrameLayerId, Point3d( WindowWidth, WindowHeight, 0), Point3d( 0, WindowHeight, 0))
-- local nFrameLeftId = EgtLine( nDrawFrameLayerId, Point3d( 0, WindowHeight, 0), Point3d( 0, 0, 0))
-- local FrameJointType = WIN_JNT.ANGLED
-- local nFrameId = WinCreate.CreateGenFrame( nFrameBottomId, nFrameRightId, nFrameTopId, nFrameLeftId, FrameJointType, FrameJointType, FrameJointType, FrameJointType)
-- local nFrameId = WinCreate.CreateGenFrame( {nFrameBottomId, nFrameRightId, nFrameTopId, nFrameLeftId}, FrameJointType, FrameJointType, FrameJointType, FrameJointType)
------------------------ Finestra vetro fisso ------------------------
-- -- aggiungo zoccolo
-- WinCreate.AddBottomRail( nFrameId)
-- -- aggiungo vetro
-- local nFillId = WinCreate.AddFill( nFrameId, WIN_FILLTYPES.GLASS)
-- 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)
@@ -96,10 +104,10 @@ local nFrameId = WinCreate.CreateFrame( WindowWidth, WindowHeight, FrameJointTyp
-- -- 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)
@@ -108,36 +116,36 @@ local nFrameId = WinCreate.CreateFrame( WindowWidth, WindowHeight, FrameJointTyp
-- -- 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 ------------------------
------------------------ Finestra anta singola ------------------------
-- aggiungo anta
local SashJointType = WIN_JNT.FULL_V
local nSashId = WinCreate.AddSash( nFrameId, SashJointType, SashJointType, SashJointType, SashJointType)
-- aggiungo vetro
local nFillId = WinCreate.AddFill( nSashId, WIN_FILLTYPES.GLASS)
-- -- aggiungo anta
-- local SashJointType = WIN_JNT.FULL_V
-- local nSashId = WinCreate.AddSash( nFrameId, SashJointType, SashJointType, SashJointType, SashJointType)
--
-- -- aggiungo vetro
-- local nFillId = WinCreate.AddFill( nSashId, WIN_FILLTYPES.GLASS)
------------------------ Finestra anta singola con divisione orizzontale ------------------------
-- -- aggiungo anta
-- local SashJointType = WIN_JNT.FULL_V
-- local nSashId = WinCreate.AddSash( nFrameId, SashJointType, SashJointType, SashJointType, SashJointType)
--
-- -- definisco prima divisione
-- local nArea1Id, nArea2Id = WinCreate.AddSplit( nSashId, WIN_SPLITORIENTATION.HORIZONTAL, WIN_MEASURE.ABSOLUT, WindowHeight / 3)
--
-- -- aggiungo vetri
-- local nFill1Id = WinCreate.AddFill( nArea1Id, WIN_FILLTYPES.GLASS)
-- local nFill2Id = WinCreate.AddFill( nArea2Id, WIN_FILLTYPES.GLASS)
@@ -147,10 +155,10 @@ local nFillId = WinCreate.AddFill( nSashId, WIN_FILLTYPES.GLASS)
-- -- 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)
@@ -160,12 +168,12 @@ local nFillId = WinCreate.AddFill( nSashId, WIN_FILLTYPES.GLASS)
-- -- 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)
@@ -198,17 +206,17 @@ local nFillId = WinCreate.AddFill( nSashId, WIN_FILLTYPES.GLASS)
-- -- 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)
@@ -216,17 +224,17 @@ local nFillId = WinCreate.AddFill( nSashId, WIN_FILLTYPES.GLASS)
-- -- 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)
@@ -251,27 +259,27 @@ local nFillId = WinCreate.AddFill( nSashId, WIN_FILLTYPES.GLASS)
------------------------ Finestra tripla anta con montanti verticali ------------------------
-- -- definisco prima divisione
-- local nArea1Id, nArea2Id = WinCreate.AddSplit( nFrameId, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 3)
-- local nArea1Id, nArea0Id = 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)
-- local nArea2Id, nArea3Id = WinCreate.AddSplit( nArea0Id, 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)
@@ -307,27 +315,27 @@ local nFillId = WinCreate.AddFill( nSashId, WIN_FILLTYPES.GLASS)
------------------------ Finestra tripla anta con montante verticale e ante battente e ricevente ------------------------
-- -- definisco prima divisione
-- local nArea1Id, nArea2Id = WinCreate.AddSplit( nFrameId, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 3)
-- local nArea1Id, nArea0Id = 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)
-- local nArea2Id, nArea3Id = WinCreate.AddSplit( nArea0Id, 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)
@@ -335,26 +343,26 @@ local nFillId = WinCreate.AddFill( nSashId, WIN_FILLTYPES.GLASS)
-- -- 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)
@@ -461,39 +469,39 @@ local nFillId = WinCreate.AddFill( nSashId, WIN_FILLTYPES.GLASS)
-- -- definisco divisione orizzontale
-- local nArea1Id, nArea2Id = WinCreate.AddSplit( nFrameId, WIN_SPLITORIENTATION.HORIZONTAL, WIN_MEASURE.ABSOLUT, WindowHeight / 2)
--
-- -- definisco divisioni verticali
-- local nArea11Id, nArea12Id = WinCreate.AddSplit( nArea1Id, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 3)
-- local nArea12Id, nArea13Id = WinCreate.AddSplit( nArea12Id, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 3)
-- local nArea21Id, nArea23Id = WinCreate.AddSplit( nArea2Id, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 3)
-- local nArea21Id, nArea22Id = WinCreate.AddSplit( nArea21Id, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 3)
-- local nArea22Id, nArea23Id = WinCreate.AddSplit( nArea23Id, 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
+12
View File
@@ -18,6 +18,17 @@ 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,
@@ -275,6 +286,7 @@ WIN_PRJ_ORIGSPLIT = 'OrigSplit'
WIN_HARDWARE = 'Hardware'
WIN_HDW_FAVOURITE = 'HdwFavourite'
WIN_HDW_HANDLE = 'HdwHandle'
WIN_HDW_FRAME = 'HdwFrame'
---------------------------------------------------------------------
return WinConst
File diff suppressed because it is too large Load Diff
+192 -76
View File
@@ -59,73 +59,141 @@ function WinCreate.ImportProfile( sProfilePath)
return true
end
-- funzione che crea il buco rettangolare per la finestra
function WinCreate.CreateFrame( dWidth, dHeight, nJointBL, nJointBR, nJointTR, nJointTL)
----------------------------------------------------------------------------------
------------------------------------- TELAIO -------------------------------------
----------------------------------------------------------------------------------
-- funzione che crea il buco per la finestra a partire da curve generiche
-- TO DO rendere i joints un vettore con un numero variabile a seconda del tipo di finestra
function WinCreate.CreateGenFrame( vFrameCrvs, nJointBL, nJointBR, nJointTL, nJointTR)
-- creo gruppo per telaio
local nFrameAreaId = EgtGroup( GDB_ID.ROOT)
EgtSetName( nFrameAreaId, WIN_AREA .. '(' .. WIN_FRAME .. ')')
-- 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)
EgtSetStatus( nAreaOutlineLayerId, GDB_ST.OFF)
-- disegno outline
local nFrameBottomId = EgtLine( nAreaOutlineLayerId, Point3d( 0, 0, 0), Point3d( dWidth, 0, 0))
EgtSetName( nFrameBottomId, WIN_BOTTOM)
local nFrameRightId = EgtLine( nAreaOutlineLayerId, Point3d( dWidth, 0, 0), Point3d( dWidth, dHeight, 0))
EgtSetName( nFrameRightId, WIN_RIGHT)
local nFrameTopId = EgtLine( nAreaOutlineLayerId, Point3d( dWidth, dHeight, 0), Point3d( 0, dHeight, 0))
EgtSetName( nFrameTopId, WIN_TOP)
local nFrameLeftId = EgtLine( nAreaOutlineLayerId, Point3d( 0, dHeight, 0), Point3d( 0, 0, 0))
EgtSetName( nFrameLeftId, WIN_LEFT)
for i = 1, #vFrameCrvs do
EgtRelocateGlob( vFrameCrvs[i], nAreaOutlineLayerId)
end
-- imposto tipo giunzioni
EgtSetInfo( nAreaOutlineLayerId, WIN_JOINT_BL, nJointBL)
EgtSetInfo( nAreaOutlineLayerId, WIN_JOINT_BR, nJointBR)
EgtSetInfo( nAreaOutlineLayerId, WIN_JOINT_TL, nJointTL)
EgtSetInfo( nAreaOutlineLayerId, WIN_JOINT_TR, nJointTR)
return nFrameAreaId
return nFrameAreaId
end
-- funzione che crea il buco per la finestra
function WinCreate.CreateGenFrame( nFrameBottomId, nFrameRightId, nFrameTopId, nFrameLeftId, nJointBL, nJointBR, nJointTR, nJointTL)
-- creo gruppo per telaio
local nFrameAreaId = EgtGroup( GDB_ID.ROOT)
EgtSetName( nFrameAreaId, WIN_AREA .. '(' .. WIN_FRAME .. ')')
-- imposto il tipo
EgtSetInfo( nFrameAreaId, WIN_AREATYPE, WIN_AREATYPES.FRAME)
local nAreaOutlineLayerId = EgtGroup( nFrameAreaId)
EgtSetName( nAreaOutlineLayerId, WIN_AREAOUTLINE)
----------------------------------------------------------------------------------
-- funzione che crea le curve che definiscono il telaio in base alla geometria richiesta
local function CreateFrameCurves( nLayerId, nType, dWidth, dHeight, dVal)
if nType == WIN_FRAME_TYPE.RECT then
-- telaio rettangolare
local nFrameBottomId = EgtLine( nLayerId, Point3d( 0, 0, 0), Point3d( dWidth, 0, 0))
EgtSetName( nFrameBottomId, WIN_BOTTOM)
local nFrameRightId = EgtLine( nLayerId, Point3d( dWidth, 0, 0), Point3d( dWidth, dHeight, 0))
EgtSetName( nFrameRightId, WIN_RIGHT)
local nFrameTopId = EgtLine( nLayerId, Point3d( dWidth, dHeight, 0), Point3d( 0, dHeight, 0))
EgtSetName( nFrameTopId, WIN_TOP)
local nFrameLeftId = EgtLine( nLayerId, Point3d( 0, dHeight, 0), Point3d( 0, 0, 0))
EgtSetName( nFrameLeftId, WIN_LEFT)
elseif nType == WIN_FRAME_TYPE.CHAMFER_SIDE then
-- dHeight è l'altezza del lato sx, dVal è l'altezza del lato dx
local nFrameBottomId = EgtLine( nLayerId, Point3d( 0, 0, 0), Point3d( dWidth, 0, 0))
EgtSetName( nFrameBottomId, WIN_BOTTOM)
local nFrameRightId = EgtLine( nLayerId, Point3d( dWidth, 0, 0), Point3d( dWidth, dVal, 0))
EgtSetName( nFrameRightId, WIN_RIGHT)
local nFrameTopId = EgtLine( nLayerId, Point3d( dWidth, dVal, 0), Point3d( 0, dHeight, 0))
EgtSetName( nFrameTopId, WIN_TOP)
local nFrameLeftId = EgtLine( nLayerId, Point3d( 0, dHeight, 0), Point3d( 0, 0, 0))
EgtSetName( nFrameLeftId, WIN_LEFT)
elseif nType == WIN_FRAME_TYPE.CHAMFER then
-- dHeight è l'altezza dei lati verticali, dVal è l'altezza complessiva della finestra
local nFrameBottomId = EgtLine( nLayerId, Point3d( 0, 0, 0), Point3d( dWidth, 0, 0))
EgtSetName( nFrameBottomId, WIN_BOTTOM)
local nFrameRightId = EgtLine( nLayerId, Point3d( dWidth, 0, 0), Point3d( dWidth, dHeight, 0))
EgtSetName( nFrameRightId, WIN_RIGHT)
local nFrameTop1Id = EgtLine( nLayerId, Point3d( dWidth, dHeight, 0), Point3d( dWidth / 2, dVal, 0))
local nFrameTop2Id = EgtLine( nLayerId, Point3d( dWidth / 2, dVal, 0), Point3d( 0, dHeight, 0))
EgtSetName( nFrameTop1Id, WIN_TOP)
EgtSetName( nFrameTop2Id, WIN_TOP)
local nFrameLeftId = EgtLine( nLayerId, Point3d( 0, dHeight, 0), Point3d( 0, 0, 0))
EgtSetName( nFrameLeftId, WIN_LEFT)
elseif nType == WIN_FRAME_TYPE.ROUND_ARC then
-- arco a tutto sesto
local nFrameBottomId = EgtLine( nLayerId, Point3d( 0, 0, 0), Point3d( dWidth, 0, 0))
EgtSetName( nFrameBottomId, WIN_BOTTOM)
local nFrameRightId = EgtLine( nLayerId, Point3d( dWidth, 0, 0), Point3d( dWidth, dHeight - 0.5 * dWidth, 0))
EgtSetName( nFrameRightId, WIN_RIGHT)
local nFrameTopId = EgtArcCPA( nLayerId, Point3d( 0.5 * dWidth, dHeight - 0.5 * dWidth, 0), Point3d( dWidth, dHeight - 0.5 * dWidth, 0), 180, 0)
EgtSetName( nFrameTopId, WIN_TOP)
local nFrameLeftId = EgtLine( nLayerId, Point3d( 0, dHeight - 0.5 * dWidth, 0), Point3d( 0, 0, 0))
EgtSetName( nFrameLeftId, WIN_LEFT)
elseif nType == WIN_FRAME_TYPE.SEGMENTAL_ARC then
-- arco ribassato
-- dHeight è l'altezza dei lati verticali, dVal è l'altezza complessiva della finestra
local nFrameBottomId = EgtLine( nLayerId, Point3d( 0, 0, 0), Point3d( dWidth, 0, 0))
EgtSetName( nFrameBottomId, WIN_BOTTOM)
local nFrameRightId = EgtLine( nLayerId, Point3d( dWidth, 0, 0), Point3d( dWidth, dHeight, 0))
EgtSetName( nFrameRightId, WIN_RIGHT)
local nFrameTopId = EgtArc3P( nLayerId, Point3d( dWidth, dHeight, 0), Point3d( 0.5 * dWidth, dVal, 0), Point3d( 0, dHeight, 0))
EgtSetName( nFrameTopId, WIN_TOP)
local nFrameLeftId = EgtLine( nLayerId, Point3d( 0, dHeight, 0), Point3d( 0, 0, 0))
EgtSetName( nFrameLeftId, WIN_LEFT)
elseif nType == WIN_FRAME_TYPE.POINTED_ARC then
-- arco a tutto sesto
-- 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 nFrameBottomId = EgtLine( nLayerId, Point3d( 0, 0, 0), Point3d( dWidth, 0, 0))
EgtSetName( nFrameBottomId, WIN_BOTTOM)
local nFrameRightId = EgtLine( nLayerId, Point3d( dWidth, 0, 0), Point3d( dWidth, dHeight, 0))
EgtSetName( nFrameRightId, WIN_RIGHT)
local nFrameTop1Id = EgtArc2PV( nLayerId, Point3d( dWidth, dHeight, 0), Point3d( 0.5 * dWidth, dVal, 0), Y_AX())
EgtSetName( nFrameTop1Id, WIN_TOP)
local nFrameTop2Id = EgtArc2PV( nLayerId, Point3d( 0, dHeight, 0), Point3d( 0.5 * dWidth, dVal, 0), Y_AX())
EgtInvertCurve( nFrameTop2Id)
EgtSetName( nFrameTop2Id, WIN_TOP)
local nFrameLeftId = EgtLine( nLayerId, Point3d( 0, dHeight, 0), Point3d( 0, 0, 0))
EgtSetName( nFrameLeftId, WIN_LEFT)
elseif nType == WIN_FRAME_TYPE.TRG then
local nFrameBottomId = EgtLine( nLayerId, Point3d( 0, 0, 0), Point3d( dWidth, 0, 0))
EgtSetName( nFrameBottomId, WIN_BOTTOM)
local nFrameRightId = EgtLine( nLayerId, Point3d( dWidth, 0, 0), Point3d( dVal, dHeight, 0))
EgtSetName( nFrameRightId, WIN_RIGHT)
local nFrameLeftId = EgtLine( nLayerId, Point3d( dVal, dHeight, 0), Point3d( 0, 0, 0))
EgtSetName( nFrameLeftId, WIN_LEFT)
end
end
----------------------------------------------------------------------------------
-- funzione che crea il telaio a partire da una specifica geometria ( rettangolo, chamfer...)
function WinCreate.CreateFrame( nType, nJointBL, nJointBR, nJointTL, nJointTR, dWidth, dHeight, dHeight2)
-- creo un gruppo temporaneo per le curve di outline
local nTmpLay = EgtGroup( GDB_ID.ROOT)
-- disegno outline
EgtRelocateGlob( nFrameBottomId, nAreaOutlineLayerId)
EgtSetName( nFrameBottomId, WIN_BOTTOM)
EgtRelocateGlob( nFrameRightId, nAreaOutlineLayerId)
EgtSetName( nFrameRightId, WIN_RIGHT)
EgtRelocateGlob( nFrameTopId, nAreaOutlineLayerId)
EgtSetName( nFrameTopId, WIN_TOP)
EgtRelocateGlob( nFrameLeftId, nAreaOutlineLayerId)
EgtSetName( nFrameLeftId, WIN_LEFT)
-- imposto tipo giunzioni
EgtSetInfo( nAreaOutlineLayerId, WIN_JOINT_BL, nJointBL)
EgtSetInfo( nAreaOutlineLayerId, WIN_JOINT_BR, nJointBR)
EgtSetInfo( nAreaOutlineLayerId, WIN_JOINT_TL, nJointTL)
EgtSetInfo( nAreaOutlineLayerId, WIN_JOINT_TR, nJointTR)
CreateFrameCurves( nTmpLay, nType, dWidth, dHeight, dHeight2)
local nFrameAreaId = WinCreate.CreateGenFrame( EgtGetAllInGroup( nTmpLay), nJointBL, nJointBR, nJointTL, nJointTR)
EgtErase( nTmpLay)
return nFrameAreaId
end
-- -- funzione che crea il telaio a partire dal buco
-- function WinCreate.CreateFrameOnHole( nHoleLayerId, dWidth, dHeight)
-- local nAreaOutlineLayerId = EgtGroup( nHoleLayerId)
-- EgtSetName( nAreaOutlineLayerId, WIN_OUTLINE)
-- -- disegno outline
-- local nHoleBottomId = EgtLine( nAreaOutlineLayerId, Point3d( 0, 0, 0), Point3d( dWidth, 0, 0))
-- EgtSetName( nHoleBottomId, WIN_BOTTOM)
-- local nHoleRightId = EgtLine( nAreaOutlineLayerId, Point3d( dWidth, 0, 0), Point3d( dWidth, dHeight, 0))
-- EgtSetName( nHoleRightId, WIN_RIGHT)
-- local nHoleTopId = EgtLine( nAreaOutlineLayerId, Point3d( dWidth, dHeight, 0), Point3d( 0, dHeight, 0))
-- EgtSetName( nHoleTopId, WIN_TOP)
-- local nHoleLeftId = EgtLine( nAreaOutlineLayerId, Point3d( 0, dHeight, 0), Point3d( 0, 0, 0))
-- EgtSetName( nHoleLeftId, WIN_LEFT)
-- end
----------------------------------------------------------------------------------
-------------------------------------- ANTA --------------------------------------
----------------------------------------------------------------------------------
-- funzione che aggiunge una anta
function WinCreate.AddSash( nAreaId, nJointBL, nJointBR, nJointTR, nJointTL, nSashType)
-- creo nuova area
@@ -158,6 +226,9 @@ function WinCreate.AddSash( nAreaId, nJointBL, nJointBR, nJointTR, nJointTL, nSa
return nSashAreaId
end
----------------------------------------------------------------------------------
-------------------------------------- FILL --------------------------------------
----------------------------------------------------------------------------------
-- funzione che aggiunge un riempimento
function WinCreate.AddFill( nAreaId, FillType)
-- creo nuova area
@@ -176,32 +247,29 @@ function WinCreate.AddFill( nAreaId, FillType)
EgtSetInfo( nOutlineId, WIN_SOU, nAreaOutlineId)
EgtRemoveInfo( nOutlineId, WIN_CHILD)
AddInfo( nAreaOutlineId, WIN_CHILD, nOutlineId)
EgtRemoveInfo( nAreaOutlineLayerId, WIN_JOINT_BL)
EgtRemoveInfo( nAreaOutlineLayerId, WIN_JOINT_BR)
EgtRemoveInfo( nAreaOutlineLayerId, WIN_JOINT_TL)
EgtRemoveInfo( nAreaOutlineLayerId, WIN_JOINT_TR)
nAreaOutlineId = EgtGetNext( nAreaOutlineId)
end
-- rimuovo eventuali info di giunzioni
EgtRemoveInfo( nAreaOutlineLayerId, WIN_JOINT_BL)
EgtRemoveInfo( nAreaOutlineLayerId, WIN_JOINT_BR)
EgtRemoveInfo( nAreaOutlineLayerId, WIN_JOINT_TL)
EgtRemoveInfo( nAreaOutlineLayerId, WIN_JOINT_TR)
-- 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)
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 OutlineIds = {}
local nOutlineId = EgtGetFirstInGroup( nOutlineLayerId)
while nOutlineId do
local sName = EgtGetName( nOutlineId)
table.insert( OutlineIds, nOutlineId)
nOutlineId = EgtGetNext( nOutlineId)
end
local nTotSplitId
if SplitType == WIN_SPLITORIENTATION.VERTICAL then
-- creo linea
@@ -232,6 +300,7 @@ function WinCreate.AddSplit( nAreaLayerId, SplitType, MeasureType, nPosition, n
return nArea1Id, nArea2Id
end
----------------------------------------------------------------------------------
-- funzione che crea tagli split multipli
function WinCreate.AddSplits( nAreaLayerId, SplitType, MeasureType, PositionList, nProportion, nSplitType)
local AreaList = {}
@@ -285,6 +354,7 @@ function WinCreate.AddSplits( nAreaLayerId, SplitType, MeasureType, PositionList
return AreaList
end
----------------------------------------------------------------------------------
-- funzione che crea un taglio split da una curva generica
function WinCreate.AddGenSplit( nAreaLayerId, nSplitId, nSplitType)
-- se area nulla diventa di tipo split
@@ -320,8 +390,8 @@ function WinCreate.AddGenSplit( nAreaLayerId, nSplitId, nSplitType)
local EndInters
for nIndex = 1, #OutlineInters do
local CurrOutInters = OutlineInters[nIndex]
CurrOutInters.StartDistance = (CurrOutInters.IntersPoint - ptStartSplit):sqlen()
CurrOutInters.EndDistance = (CurrOutInters.IntersPoint - ptEndSplit):sqlen()
CurrOutInters.StartDistance = dist( CurrOutInters.IntersPoint, ptStartSplit)
CurrOutInters.EndDistance = dist( CurrOutInters.IntersPoint, ptEndSplit)
if not StartInters or CurrOutInters.StartDistance < StartInters.StartDistance then
StartInters = CurrOutInters
end
@@ -334,8 +404,36 @@ function WinCreate.AddGenSplit( nAreaLayerId, nSplitId, nSplitType)
EgtTrimCurveStartAtParam( nSplitId, dStartSplitInters)
local dEndSplitInters = EgtCurveParamAtPoint( nSplitId, EndInters.IntersPoint)
EgtTrimCurveEndAtParam( nSplitId, dEndSplitInters)
EgtSetInfo( nSplitId, WIN_SPLIT_STARTINTERS, StartInters.Id)
EgtSetInfo( nSplitId, WIN_SPLIT_ENDINTERS, EndInters.Id)
-- sistemo le info di intersezione
local dPar1 = EgtCurveParamAtPoint( StartInters.Id, StartInters.IntersPoint, 100 * GEO.EPS_SMALL)
local _, dParE1 = EgtCurveDomain( StartInters.Id)
if dPar1 < GEO.EPS_SMALL then
-- intersezione coinvolge anche curva precedente
local nOther = EgtGetPrev( StartInters.Id) or EgtGetLastInGroup( nOutlineLayerId)
EgtSetInfo( nSplitId, WIN_SPLIT_STARTINTERS, { nOther, StartInters.Id})
elseif abs( dPar1 - dParE1) < GEO.EPS_SMALL then
-- intersezione coinvolge anche curva successiva
local nOther = EgtGetNext( StartInters.Id) or EgtGetFirstInGroup( nOutlineLayerId)
EgtSetInfo( nSplitId, WIN_SPLIT_STARTINTERS, { StartInters.Id, nOther})
else
EgtSetInfo( nSplitId, WIN_SPLIT_STARTINTERS, { StartInters.Id})
end
local dPar2 = EgtCurveParamAtPoint( EndInters.Id, EndInters.IntersPoint, 100 * GEO.EPS_SMALL)
local _, dParE2 = EgtCurveDomain( EndInters.Id)
if dPar2 < GEO.EPS_SMALL then
-- intersezione coinvolge anche curva precedente
local nOther = EgtGetPrev( EndInters.Id) or EgtGetLastInGroup( nOutlineLayerId)
EgtSetInfo( nSplitId, WIN_SPLIT_ENDINTERS, { nOther, EndInters.Id})
elseif abs( dPar2 - dParE2) < GEO.EPS_SMALL then
-- intersezione coinvolge anche curva successiva
local nOther = EgtGetNext( EndInters.Id) or EgtGetFirstInGroup( nOutlineLayerId)
EgtSetInfo( nSplitId, WIN_SPLIT_ENDINTERS, { EndInters.Id, nOther})
else
EgtSetInfo( nSplitId, WIN_SPLIT_ENDINTERS, { EndInters.Id})
end
-- assegno nome profilo
EgtSetName( nSplitId, WIN_SPLIT)
-- creo aree
@@ -356,6 +454,7 @@ function WinCreate.AddGenSplit( nAreaLayerId, nSplitId, nSplitType)
return nArea1Id, nArea2Id
end
----------------------------------------------------------------------------------
-- funzione che crea tagli split da curve generiche
function WinCreate.AddGenSplits( nAreaLayerId, SplitList)
for nIndex = 1, #SplitList do
@@ -363,6 +462,7 @@ function WinCreate.AddGenSplits( nAreaLayerId, SplitList)
end
end
----------------------------------------------------------------------------------
-- funzione che crea le aree da un taglio split
function WinCreate.CreateAreaFromSplit( nAreaLayerId, nSplitId)
-- creo layer per le due aree
@@ -386,13 +486,18 @@ function WinCreate.CreateAreaFromSplit( nAreaLayerId, nSplitId)
if ptInters then
if nInters == 0 then
-- trovato primo punto di intersezione - inizio area 2
nInters = 1
local nCopyId = EgtCopy( nOutlineId, nArea2OutlineLayerId)
EgtSetInfo( nCopyId, WIN_SOU, nOutlineId)
EgtRemoveInfo( nCopyId, WIN_CHILD)
AddInfo( nOutlineId, WIN_CHILD, nCopyId)
local dStartIntersParam = EgtCurveParamAtPoint( nCopyId, ptInters)
EgtTrimCurveStartAtParam( nCopyId, dStartIntersParam)
local dStartIntersParam = EgtCurveParamAtPoint( nOutlineId, ptInters)
local _, dParE = EgtCurveDomain( nOutlineId)
if abs( dStartIntersParam - dParE) < GEO.EPS_SMALL then
-- se intersezione nel punto finale della curva la ignoro, la ritroverò analizzando l'outline successivo
else
nInters = 1
local nCopyId = EgtCopy( nOutlineId, nArea2OutlineLayerId)
EgtSetInfo( nCopyId, WIN_SOU, nOutlineId)
EgtRemoveInfo( nCopyId, WIN_CHILD)
AddInfo( nOutlineId, WIN_CHILD, nCopyId)
EgtTrimCurveStartAtParam( nCopyId, dStartIntersParam)
end
elseif nInters == 1 then
-- trovato secondo punto di intersezione - fine area 2
nInters = 2
@@ -423,6 +528,11 @@ function WinCreate.CreateAreaFromSplit( nAreaLayerId, nSplitId)
EgtSetName( nSplitCopyId, WIN_LEFT)
end
-- inizio area 1
local _, dEnd = EgtCurveDomain( nOutlineId)
if abs( dEndIntersParam - dEnd) < GEO.EPS_SMALL then
-- l'intersezione è sul punto finale della curva di outline, quindi è la curva successiva che dà inizio all'area 1
nOutlineId = EgtGetNext( nOutlineId) or EgtGetFirstInGroup( nOutlineLayerId)
end
nCopyId = EgtCopy( nOutlineId, nArea1OutlineLayerId)
EgtSetInfo( nCopyId, WIN_SOU, nOutlineId)
EgtRemoveInfo( nCopyId, WIN_CHILD)
@@ -495,10 +605,12 @@ function WinCreate.CreateAreaFromSplit( nAreaLayerId, nSplitId)
nFirstInAreaId = EgtGetFirstInGroup( nArea2OutlineLayerId)
sFirstInAreaName = EgtGetName( nFirstInAreaId)
end
-- error('qqq')
return nArea1Id, nArea2Id
end
----------------------------------------------------------------------------------
---------------------------------- BOTTOMRAIL ------------------------------------
----------------------------------------------------------------------------------
-- funzione che aggiunge uno zoccolo
function WinCreate.AddBottomRail( nAreaId)
local nAreaType = EgtGetInfo( nAreaId, WIN_AREATYPE, 'i')
@@ -510,8 +622,12 @@ function WinCreate.AddBottomRail( nAreaId)
end
end
function WinCreate.AddHardware( nFrameId, sFavourite)
EgtSetInfo( nFrameId, WIN_HDW_FAVOURITE, sFavourite )
----------------------------------------------------------------------------------
---------------------------------- FERRAMENTA ------------------------------------
----------------------------------------------------------------------------------
function WinCreate.AddHardware( nFrameId, sFavourite, sHandle)
EgtSetInfo( nFrameId, WIN_HDW_FAVOURITE, sFavourite)
EgtSetInfo( nFrameId, WIN_HDW_HANDLE, sHandle)
end
---------------------------------------------------------------------
+7 -2
View File
@@ -160,11 +160,15 @@ local function ConvertTableToGeometry( AreaTable, nAreaId)
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])
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
@@ -185,7 +189,8 @@ local function ConvertTableToGeometry( AreaTable, nAreaId)
EgtSetName( nDrawFramePartId, 'DrawFrame')
local nDrawFrameLayerId = EgtGroup( nDrawFramePartId)
ConvertCurveTableToEntity( nDrawFrameLayerId, AreaTable[JWD_SPLIT][1])
local nArea1Id, nArea2Id = WinCreate.AddGenSplit( nAreaId, EgtGetFirstInGroup(nDrawFrameLayerId)) --, nSplitType)
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)
+11 -1
View File
@@ -43,7 +43,7 @@ end
_G.WinCreate_ImportProfile = WinCreate_ImportProfile
local function WinCreate_CreateFrame()
WDG.AREAID = WinCreate.CreateFrame(WDG.WIDTH, WDG.HEIGHT, WDG.JOINTBL, WDG.JOINTBR, WDG.JOINTTR, WDG.JOINTTL)
WDG.AREAID = WinCreate.CreateFrame(WDG.FRAMETYPE, WDG.JOINTBL, WDG.JOINTBR, WDG.JOINTTR, WDG.JOINTTL, WDG.WIDTH, WDG.HEIGHT, WDG.HEIGHT2)
end
_G.WinCreate_CreateFrame = WinCreate_CreateFrame
@@ -52,6 +52,11 @@ local function WinCreate_AddSash()
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
@@ -96,4 +101,9 @@ local function WinCalculate_CreatePartFromArea()
end
_G.WinCalculate_CreatePartFromArea = WinCalculate_CreatePartFromArea
local function WinCalculate_AddHardware()
WinCalculate.AddHardware(WDG.FRAMEID)
end
_G.WinCalculate_AddHardware = WinCalculate_AddHardware
---------------------------------------------------------------------