- modifiche per interfaccia progettazione finestre
This commit is contained in:
+9
-9
@@ -39,7 +39,7 @@ local DebugCode = false
|
||||
local HoleWidth = 1835
|
||||
local HoleHeight = 1516
|
||||
|
||||
local WindowWidth = 1800
|
||||
local WindowWidth = 900
|
||||
local WindowHeight = 1500
|
||||
|
||||
local WindowTree
|
||||
@@ -122,12 +122,12 @@ local nFrameId = WinCreate.CreateFrame( WindowWidth, WindowHeight, FrameJointTyp
|
||||
|
||||
-- ------------------------ 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 ------------------------
|
||||
|
||||
@@ -280,7 +280,7 @@ local nFrameId = WinCreate.CreateFrame( WindowWidth, WindowHeight, FrameJointTyp
|
||||
-- definisco prima divisione
|
||||
--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}, 3)
|
||||
local nAreaList = WinCreate.AddSplits( nFrameId, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.PERCENTAGE, { 0.33})
|
||||
--local nAreaList = WinCreate.AddSplits( nFrameId, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.PERCENTAGE, { 0.33})
|
||||
|
||||
-- definisco seconda divisione
|
||||
--local nArea2Id, nArea3Id = WinCreate.AddSplit( nArea2Id, WIN_SPLITORIENTATION.VERTICAL, WIN_MEASURE.ABSOLUT, WindowWidth / 3)
|
||||
@@ -649,7 +649,7 @@ local nAreaList = WinCreate.AddSplits( nFrameId, WIN_SPLITORIENTATION.VERTICAL,
|
||||
-- WinLib.CreatePartFromOutline( nFrameLayerId, nCurrOutlineId)
|
||||
|
||||
-- imposto se calcolare i solidi o meno
|
||||
WinCalculate.SetCalcSolid( false)
|
||||
WinCalculate.SetCalcSolid( true)
|
||||
|
||||
-- -- creo i pezzi
|
||||
WinCalculate.CreatePartFromArea( nFrameId)
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -98,6 +98,7 @@ WIN_PROFILEPATH = 'ProfilePath'
|
||||
WIN_FRAME = 'Frame'
|
||||
WIN_AREAOUTLINE = 'BaseOutline'
|
||||
WIN_OUTLINE = 'Outline'
|
||||
WIN_SELECTION = 'Selection'
|
||||
WIN_ORIGOUTLINE = 'OrigOutline'
|
||||
WIN_GEO = 'Geo'
|
||||
WIN_SOLID = 'Solid'
|
||||
|
||||
@@ -307,6 +307,7 @@ function WinCalculate.CalculateOutlineFromAreaOutline( nAreaId)
|
||||
local nAreaOutlineLayerId = EgtGetFirstNameInGroup( nAreaId, WIN_AREAOUTLINE)
|
||||
local nOutlineLayerId = EgtCopy( nAreaOutlineLayerId, nAreaId)
|
||||
EgtSetName( nOutlineLayerId, WIN_OUTLINE)
|
||||
EgtSetStatus( nOutlineLayerId, GDB_ST.OFF)
|
||||
local nAreaOutlineId = EgtGetFirstInGroup( nAreaOutlineLayerId)
|
||||
local nOutlineId = EgtGetFirstInGroup( nOutlineLayerId)
|
||||
while nAreaOutlineId do
|
||||
@@ -320,6 +321,7 @@ function WinCalculate.CalculateOutlineFromAreaOutline( nAreaId)
|
||||
if nBaseSplitLayerId then
|
||||
local nSplitLayerId = EgtCopy( nBaseSplitLayerId, nAreaId)
|
||||
EgtSetName( nSplitLayerId, WIN_SPLIT)
|
||||
EgtSetStatus( nSplitLayerId, GDB_ST.OFF)
|
||||
local nBaseSplitId = EgtGetFirstInGroup( nBaseSplitLayerId)
|
||||
local nSplitId = EgtGetFirstInGroup( nSplitLayerId)
|
||||
EgtSetInfo( nBaseSplitId, WIN_COPY, nSplitId)
|
||||
@@ -331,6 +333,7 @@ function WinCalculate.CalculateOutlineFromAreaOutline( nAreaId)
|
||||
local nOutlineLayerId = EgtCopy( nAreaOutlineLayerId, nAreaId)
|
||||
EgtSetName( nOutlineLayerId, WIN_OUTLINE)
|
||||
EgtEmptyGroup( nOutlineLayerId)
|
||||
EgtSetStatus( nOutlineLayerId, GDB_ST.OFF)
|
||||
-- recupero outline di livello precedente e lo copio pezzo per pezzo
|
||||
local nSplitId
|
||||
local nBaseOutlineId = EgtGetFirstInGroup( nAreaOutlineLayerId)
|
||||
@@ -345,6 +348,7 @@ function WinCalculate.CalculateOutlineFromAreaOutline( nAreaId)
|
||||
if sSouParentName == WIN_BASESPLIT then
|
||||
-- aggiorno nome
|
||||
EgtSetName( nNewOutlineId, sBaseName)
|
||||
EgtSetStatus( nNewOutlineId, GDB_ST.OFF)
|
||||
nSplitId = nNewOutlineId
|
||||
end
|
||||
EgtSetInfo( nNewOutlineId, WIN_SOU, nBaseOutlineId)
|
||||
@@ -368,6 +372,7 @@ function WinCalculate.CalculateOutlineFromAreaOutline( nAreaId)
|
||||
if nBaseSplitLayerId then
|
||||
local nSplitLayerId = EgtCopy( nBaseSplitLayerId, nAreaId)
|
||||
EgtSetName( nSplitLayerId, WIN_SPLIT)
|
||||
EgtSetStatus( nSplitLayerId, GDB_ST.OFF)
|
||||
local nBaseSplitId = EgtGetFirstInGroup( nBaseSplitLayerId)
|
||||
local nSplitId = EgtGetFirstInGroup( nSplitLayerId)
|
||||
EgtSetInfo( nBaseSplitId, WIN_COPY, nSplitId)
|
||||
@@ -402,6 +407,7 @@ function WinCalculate.CalculateOutlineFromAreaOutline( nAreaId)
|
||||
local nSashOutlineLayerId = EgtCopy( nSashAreaOutlineLayerId, nAreaId)
|
||||
EgtSetName( nSashOutlineLayerId, WIN_OUTLINE)
|
||||
EgtEmptyGroup( nSashOutlineLayerId)
|
||||
EgtSetStatus( nSashOutlineLayerId, GDB_ST.OFF)
|
||||
-- recupero se anta battente ricevente
|
||||
local nSashType = EgtGetInfo( nAreaId, WIN_SASHTYPE, 'i')
|
||||
-- ciclo su profilo disegnato anta
|
||||
@@ -500,6 +506,7 @@ function WinCalculate.CalculateOutlineFromAreaOutline( nAreaId)
|
||||
-- creo copia
|
||||
local nSplitLayerId = EgtCopy( nBaseSplitLayerId, nAreaId)
|
||||
EgtSetName( nSplitLayerId, WIN_SPLIT)
|
||||
EgtSetStatus( nSplitLayerId, GDB_ST.OFF)
|
||||
local nSplitId = EgtGetFirstInGroup( nSplitLayerId)
|
||||
-- la taglio con outline
|
||||
WinCalculate.TrimSplitWithOutline( nSplitId)
|
||||
@@ -515,6 +522,7 @@ function WinCalculate.CalculateOutlineFromAreaOutline( nAreaId)
|
||||
local nFillOutlineLayerId = EgtCopy( nFillBaseAreaLayerId, nAreaId)
|
||||
EgtSetName( nFillOutlineLayerId, WIN_OUTLINE)
|
||||
EgtEmptyGroup( nFillOutlineLayerId)
|
||||
EgtSetStatus( nFillOutlineLayerId, GDB_ST.OFF)
|
||||
-- ciclo su BaseArea riempimento
|
||||
local nFillAreaOutlineId = EgtGetFirstInGroup( nFillBaseAreaLayerId)
|
||||
while nFillAreaOutlineId do
|
||||
@@ -594,6 +602,23 @@ function WinCalculate.CalculateOutlineFromAreaOutline( nAreaId)
|
||||
-- elseif ...
|
||||
|
||||
end
|
||||
-- disegno area di selezione per programma
|
||||
local nSelectionLayerId = EgtGroup( nAreaId)
|
||||
EgtSetName( nSelectionLayerId, WIN_SELECTION)
|
||||
EgtSetStatus( nSelectionLayerId, GDB_ST.OFF)
|
||||
local OutlineList = {}
|
||||
local nOutlineLayerId = EgtGetFirstNameInGroup( nAreaId, WIN_OUTLINE)
|
||||
local nOutlineId = EgtGetFirstInGroup(nOutlineLayerId)
|
||||
while nOutlineId do
|
||||
table.insert( OutlineList, nOutlineId)
|
||||
nOutlineId = EgtGetNext(nOutlineId)
|
||||
end
|
||||
local nCompoId = EgtCurveCompo( nSelectionLayerId, OutlineList, false)
|
||||
local nSelectionArea = EgtSurfFlatRegion( nSelectionLayerId, nCompoId)
|
||||
EgtSetColor( nSelectionArea, 'YELLOW')
|
||||
EgtSetAlpha( nSelectionArea, 10)
|
||||
EgtMove( nSelectionArea, 10 * Z_AX())
|
||||
EgtErase( nCompoId)
|
||||
end
|
||||
|
||||
-- funzione che verifica se ci sono Sash dopo
|
||||
|
||||
@@ -57,12 +57,12 @@ end
|
||||
function WinCreate.CreateFrame( dWidth, dHeight, nJointBL, nJointBR, nJointTR, nJointTL)
|
||||
-- creo gruppo per telaio
|
||||
local nFrameAreaId = EgtGroup( GDB_ID.ROOT)
|
||||
EgtSetStatus( nFrameAreaId, GDB_ST.OFF)
|
||||
EgtSetName( nFrameAreaId, WIN_AREA .. '(' .. WIN_FRAME .. ')')
|
||||
-- imposto il tipo
|
||||
EgtSetInfo( nFrameAreaId, WIN_AREATYPE, WIN_AREATYPES.FRAME)
|
||||
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)
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
require( 'EgtBase')
|
||||
_ENV = EgtProtectGlobal()
|
||||
EgtEnableDebug( true)
|
||||
EgtEnableDebug( false)
|
||||
-- EgtEnableDebug( false)
|
||||
|
||||
-- Imposto direttorio per librerie
|
||||
|
||||
+16
-16
@@ -66,6 +66,22 @@
|
||||
},
|
||||
"Area2": {
|
||||
"Area1": {
|
||||
"Area1": {
|
||||
"Area1": {
|
||||
"AreaType": 3,
|
||||
"FillType": 1
|
||||
},
|
||||
"AreaType": 2,
|
||||
"Joint": {
|
||||
"JointBL": 3,
|
||||
"JointBR": 3,
|
||||
"JointTL": 3,
|
||||
"JointTR": 3
|
||||
}
|
||||
},
|
||||
"AreaType": 0
|
||||
},
|
||||
"Area2": {
|
||||
"Area1": {
|
||||
"Area1": {
|
||||
"Area1": {
|
||||
@@ -105,22 +121,6 @@
|
||||
"ptStart": [ 1200.0, 750.0, 0.0 ]
|
||||
} ]
|
||||
},
|
||||
"Area2": {
|
||||
"Area1": {
|
||||
"Area1": {
|
||||
"AreaType": 3,
|
||||
"FillType": 1
|
||||
},
|
||||
"AreaType": 2,
|
||||
"Joint": {
|
||||
"JointBL": 3,
|
||||
"JointBR": 3,
|
||||
"JointTL": 3,
|
||||
"JointTR": 3
|
||||
}
|
||||
},
|
||||
"AreaType": 0
|
||||
},
|
||||
"AreaType": 4,
|
||||
"Split": [ {
|
||||
"CurveType": 256,
|
||||
@@ -0,0 +1,78 @@
|
||||
{
|
||||
"ProfilePath": "c:\\EgtData\\EgwWindowLua\\Profiles\\Profilo78 - Offset.nge",
|
||||
"Area1": {
|
||||
"Area1": {
|
||||
"Area1": null,
|
||||
"Area2": null,
|
||||
"AreaType": 3,
|
||||
"FillType": 1,
|
||||
"BottomRail": false,
|
||||
"Outline": null,
|
||||
"Joint": null
|
||||
},
|
||||
"Area2": null,
|
||||
"AreaType": 1,
|
||||
"FillType": 0,
|
||||
"BottomRail": true,
|
||||
"Outline": [
|
||||
{
|
||||
"CurveType": 256,
|
||||
"ptStart": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
},
|
||||
"ptEnd": {
|
||||
"x": 1800.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
}
|
||||
},
|
||||
{
|
||||
"CurveType": 256,
|
||||
"ptStart": {
|
||||
"x": 1800.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
},
|
||||
"ptEnd": {
|
||||
"x": 1800.0,
|
||||
"y": 1500.0,
|
||||
"z": 0.0
|
||||
}
|
||||
},
|
||||
{
|
||||
"CurveType": 256,
|
||||
"ptStart": {
|
||||
"x": 1800.0,
|
||||
"y": 1500.0,
|
||||
"z": 0.0
|
||||
},
|
||||
"ptEnd": {
|
||||
"x": 0.0,
|
||||
"y": 1500.0,
|
||||
"z": 0.0
|
||||
}
|
||||
},
|
||||
{
|
||||
"CurveType": 256,
|
||||
"ptStart": {
|
||||
"x": 0.0,
|
||||
"y": 1500.0,
|
||||
"z": 0.0
|
||||
},
|
||||
"ptEnd": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
}
|
||||
}
|
||||
],
|
||||
"Joint": [
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user