DataWindow :

- riorganizzato file delle costanti.
This commit is contained in:
SaraP
2025-03-28 09:08:18 +01:00
parent 5b7258aaf8
commit a2c1032e81
6 changed files with 174 additions and 168 deletions
+167 -160
View File
@@ -29,48 +29,41 @@ WIN_FRAME_TYPE = {
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,
BOTTOMRAIL_FINAL = 9,
}
-- Tipi di split
-- direzioni di split
WIN_SPLITORIENTATION = {
VERTICAL = 1,
HORIZONTAL = 2,
}
-- Tipi di misure
-- tipi di misure
WIN_MEASURE = {
ABSOLUT = 1,
PROPORTIONAL = 2,
PERCENTAGE = 3,
}
-- tipologia di figli
WIN_CHILDREN_TYPES = {
NULL = 0,
SASH = 1,
FILL = 2,
MIXED = 3,
}
WIN_SURF_APPROX = 0.05
-- AREE
WIN_AREA = 'Area'
WIN_AREA_NAME = 'AreaName'
WIN_FRAME = 'Frame'
WIN_SASH = 'Sash'
WIN_FILL = 'Fill'
WIN_SPLIT = 'Split'
-- tipo di Area
WIN_AREATYPE = 'AreaType'
WIN_AREATYPES = {
NULL = 0,
FRAME = 1,
@@ -79,46 +72,43 @@ WIN_AREATYPES = {
SPLIT = 4,
}
-- tipo di split:
-- mullion = montante
-- french = battente / ricevente
-- mixed = cambio profilo
-- tipi di split
WIN_SPLITTYPE = 'SplitType'
WIN_SPLITTYPES = {
NULL = 0,
MULLION = 1,
FRENCH = 2,
MIXED = 3,
MULLION = 1, -- montante
FRENCH = 2, -- battente / ricevente
MIXED = 3, -- cambio profilo
}
-- tipi di riempimento interno
WIN_FILLTYPE = 'FillType'
WIN_FILLTYPES = {
NULL = 0,
GLASS = 1,
WOOD = 2,
}
WIN_GLASS = 'GLASS'
WIN_WOOD = 'WOOD'
-- tipi di sash battente e ricevente
-- tipi di anta
WIN_SASHTYPE = 'SashType'
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,
ACTIVE = 1, -- battente
INACTIVE = 2, -- ricevente
ACTIVE_IN = 3, -- battente contro ricevente ( nel caso di più ante battenti)
ACTIVE_OUT = 4, -- battente contro battente ( nel caso di più ante battenti)
INACTIVE_IN = 5, -- ricevente contro battente ( nel caso di più ante riceventi)
INACTIVE_OUT = 6, -- ricevente contro ricevente ( nel caso di più ante riceventi)
SLIDE_MOVABLE = 7, -- mobile in alzante scorrevole
SLIDE_FIXED = 8, -- fissa in alzante scorrevole
SLIDE_MOVABLE_BACK = 9, -- mobile più esterna in alzante scorrevole con tutte ante mobili
}
WIN_INACTIVE = 'INACTIVE'
-- tipi di apertura ante
WIN_OPENING_TYPE = 'OpeningType'
WIN_OPENING_TYPES = {
NULL = 0,
TURNONLY_LEFT = 1,
@@ -135,67 +125,66 @@ WIN_OPENING_TYPES = {
LIFTSLIDE_RIGHT = 12,
}
WIN_SURF_APPROX = 0.05
WIN_PROFILE = 'Profile'
WIN_PROFILEPATH = 'ProfilePath'
WIN_FRAME = 'Frame'
WIN_AREAOUTLINE = 'BaseOutline'
WIN_OUTLINE = 'Outline'
WIN_BASESPLIT = 'BaseSplit'
WIN_SELECTION = 'Selection'
WIN_SPLITSELECTION = 'SplitSelection'
WIN_ORIGOUTLINE = 'OrigOutline'
WIN_GEO = 'Geo'
WIN_SOLID = 'Solid'
WIN_SASH_OPENING = 'Opening'
WIN_AUX = 'Aux'
WIN_BOTTOM = 'Bottom'
WIN_BOTTOMRAIL = 'BottomRail'
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'
-- info varie su aree e curve
WIN_SOU = 'SOU'
WIN_CHILD = 'CHILD'
WIN_COPY = 'COPY'
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_AUX = 'Aux'
WIN_PREV_OUTLINES = 'PrevOutlines'
WIN_NEXT_OUTLINES = 'NextOutlines'
WIN_REF_SPLIT = 'RefSplit'
WIN_PRJ_ORIGSPLIT = 'OrigSplit'
WIN_CRV_ON_FRENCH_SPLIT = 'OutlineOnFrenchSplit'
WIN_SPLIT_STARTINTERS = 'SplitStartInters'
WIN_SPLIT_ENDINTERS = 'SplitEndInters'
WIN_SASH_CHILDREN = 'SashChildren'
WIN_FILL_CHILDREN = 'FillChildren'
-- PROFILI
WIN_PROFILE = 'Profile'
WIN_PROFILEPATH = 'ProfilePath'
WIN_INFO_GRP = 'Info'
-- nomi dei profili
WIN_SASH_TOP = 'Sash_Top'
WIN_SASH_BOTTOM = 'Sash_Bottom'
WIN_SASH_VERTICAL = 'Sash_Vertical'
WIN_SASH_HORIZONTAL = 'Sash_Horizontal'
WIN_FRAME_TOP = 'Frame_Top'
WIN_FRAME_BOTTOM = 'Frame_Bottom'
WIN_FIXED_TOP = 'Fixed_Top'
WIN_FIXED_BOTTOM = 'Fixed_Bottom'
WIN_RAIL_BOTTOM = 'Rail_Bottom'
WIN_RAIL = 'Rail'
WIN_FILL_RAIL = 'Fill_Rail'
WIN_FRAME_SPLIT = 'Frame_Split'
WIN_SASH_VERTICAL = 'Sash_Vertical'
WIN_SASH_HORIZONTAL = 'Sash_Horizontal'
WIN_MIXED_BOTTOM = 'Mixed_Bottom'
WIN_MIXED_TOP = 'Mixed_Top'
WIN_MIXED_SPLIT = 'Mixed_Split'
WIN_FRAME_TOP = 'Frame_Top'
WIN_FRAME_BOTTOM = 'Frame_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'
@@ -210,79 +199,50 @@ 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'
-- elementi dei profili
WIN_REF = 'Ref'
WIN_SECTIONFRAME = 'SectionFrame'
WIN_SECTION = 'Section'
WIN_STRIP = 'Strip'
WIN_ALU = 'Alu'
WIN_IN = 'In'
WIN_CTRIN = 'CtrIn'
WIN_OUT = 'Out'
WIN_IN = 'In'
WIN_OUTOFST = 'OfstOut'
WIN_CTRINOFST = 'OfstCtrIn'
WIN_OFST = 'Ofst'
WIN_SECTIONFRAME = 'SectionFrame'
WIN_CTRINOFST = 'OfstCtrIn'
WIN_OUTOFST = 'OfstOut'
WIN_MIXED_COMMON = 'Common'
WIN_SIMPLIFIED = 'Simplified'
WIN_STRIP = 'Strip'
WIN_ALU = 'Alu'
WIN_GASKET = 'Gasket'
WIN_MINIZINKEN = 'MiniZinken'
-- WIN_STARTCPDELTA = 'StartCPDelta'
-- WIN_ENDCPDELTA = 'EndCPDelta'
WIN_GEOWIDTH = 'GeoWidth'
WIN_GEOHEIGHT = 'GeoHeight'
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'
-- info sui profili
WIN_SASH_TOP_OVERLAP = 'SashTopOverlap'
WIN_SASH_BOTTOM_OVERLAP = 'SashBottomOverlap'
WIN_DELTA = 'Delta'
WIN_FILLOVERLAP = 'FillOverlap'
WIN_FILLDELTA = 'FillDelta'
WIN_GLASSTHICKNESS = 'GlassThickness'
WIN_RAILDELTA = 'RailDelta'
-- per ferramenta
WIN_GAPDELTA = 'GapDelta'
WIN_GAPDELTAZ = 'GapDeltaZ'
WIN_GAPDELTAIN = 'GapDeltaIn'
WIN_GAPDELTAOUT = 'GapDeltaOut'
-- per accessori
WIN_STRIP_DIST = 'StripDistance'
WIN_TRIM = 'Trim'
-- per cambio profilo
WIN_FIXED_REF = 'FixedRef'
WIN_SASH_REF = 'SashRef'
WIN_SASH_DEPTH = 'SashDepth'
WIN_RAD_REF = 'RefRad'
WIN_EXTRA_DIST = 'ExtraDist'
-- per lavorazioni
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_PHASE = 'PHASE'
WIN_PRC_NTOOLS = 'NTOOLS'
WIN_PRC_TOOL_NAME = 'TOOL_NAME'
@@ -294,27 +254,76 @@ 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'
-- Profili pezzo
WIN_PRF_MAIN = 'Main'
WIN_PRF_START = 'Start'
WIN_PRF_END = 'End'
WIN_PRF_SPLIT = 'Split'
WIN_PRF_TYPE = 'Type'
WIN_PROFILETYPE = 'ProfileType'
WIN_REF_SPLIT = 'RefSplit'
WIN_CRV_ON_FRENCH_SPLIT = 'OutlineOnFrenchSplit'
WIN_PREV_OUTLINES = 'PrevOutlines'
WIN_NEXT_OUTLINES = 'NextOutlines'
-- tipi di profilo
WIN_PRF = {
NULL = 0,
TOP = 1,
BOTTOM = 2,
LEFT = 3,
RIGHT = 4,
SPLIT = 5,
BOTTOMRAIL = 6,
BOTTOMRAIL_FINAL = 7,
}
-- GIUNZIONI
WIN_JOINTS = 'Joints'
WIN_JOINT_BL = 'JointBL'
WIN_JOINT_BR = 'JointBR'
WIN_JOINT_TL = 'JointTL'
WIN_JOINT_TR = 'JointTR'
WIN_STARTJOINT = 'StartJoint'
-- tipi di giunzioni
WIN_JNT = {
ANGLED = 1,
FULL_H = 2,
FULL_V = 3,
}
-- tipi di giunzione pezzo
WIN_PART_JNT = {
ANGLED = 1,
FULL = 2,
SHORT = 3,
}
-- GEO
WIN_GEO = 'Geo'
WIN_GEO_RAW = 'GeoRaw'
WIN_GEO_IN = 'In'
WIN_GEO_OUT = 'Out'
WIN_GEO_LEFT = 'Left'
WIN_GEO_RIGHT = 'Right'
WIN_PRC_FRAME = 'AuxFrame'
WIN_GEOWIDTH = 'GeoWidth'
WIN_GEOHEIGHT = 'GeoHeight'
WIN_SEMI_PROFILE = 'SemiProfileId'
-- CAMBIO PROFILO
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'
-- SOLIDI
WIN_SOLID = 'Solid'
WIN_MAINGUIDE = 'MainGuide'
WIN_SRF_MAIN = 'MainSurface'
WIN_SRF_ORIGMAIN = 'OrigMainSurface'
@@ -322,10 +331,9 @@ WIN_SRF_START = 'StartSurface'
WIN_SRF_END = 'EndSurface'
WIN_SRF_STRIP = 'StripSurface'
WIN_BOTTOMRAIL = 'BottomRail'
-- LAVORAZIONI
WIN_PRC = 'Processings'
WIN_PRC_FRAME = 'AuxFrame'
WIN_PRC_FEATURE_TYPE = 'FEATURE_TYPE'
WIN_PRC_TYPE = {
HOLE = 'Hole',
@@ -341,10 +349,6 @@ WIN_PRC_PROFILE_TYPE = {
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',
@@ -353,6 +357,8 @@ WIN_PRC_SIDETYPE = {
RIGHT = 'Right'
}
-- SPINE
WIN_DOWEL = 'Dowel'
WIN_DWL_DIAM = 'DowelsDiam'
WIN_DWL_TOP_PERP_LEN = 'TopPerpLen'
@@ -365,17 +371,18 @@ WIN_DWL_SPLIT_PERP_LEN = 'SplitPerpLen'
WIN_DWL_SPLIT_PARA_LEN = 'SplitParaLen'
WIN_DWL_LOG_LEN = 'DowelsLogLen'
-- TRONCHETTI
WIN_LOGS = 'Log'
WIN_PRJ_ORIGSPLIT = 'OrigSplit'
WIN_GASKET = 'Gasket'
-- ACCESSORI
WIN_GASKET_LEN = 'GasketLen'
WIN_WATERDRIP = 'Waterdrip'
WIN_WATERDRIP_LEN = 'WaterdripLen'
WIN_TRIM = 'Trim'
WIN_HARDWARE = 'Hardware'
-- FERRAMENTA
WIN_HDW_FAVOURITE = 'HdwFavourite'
WIN_HDW_HANDLE = 'HdwHandle'
WIN_HDW_FRAME = 'HdwFrame'
+1 -1
View File
@@ -3490,7 +3490,7 @@ local function CalculateAreaParts( nAreaId)
elseif nAreaType ~= WIN_AREATYPES.FILL then
if s_bCalcSolid then
--- verifico se area successiva e' un fill
local nChildAreaId = EgtGetFirstNameInGroup( nAreaId, WIN_AREAASTERISK)
local nChildAreaId = EgtGetFirstNameInGroup( nAreaId, WIN_AREA .. '*')
local nChildAreaType = EgtGetInfo( nChildAreaId or GDB_ID.NULL, WIN_AREATYPE, "i")
if nChildAreaType == WIN_AREATYPES.FILL then
-- se lo e', vuol dire che e' un vetro fisso, quindi calcolo strip dell'outline
+2 -3
View File
@@ -274,7 +274,6 @@ end
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)
@@ -391,12 +390,12 @@ local function CreateAreaFromSplit( nAreaLayerId, nCompo, nSplitId, dPar1, dPar2
-- creo layer per le due sottoaree
local nArea1Id = EgtGroup( nAreaLayerId)
EgtSetName( nArea1Id , WIN_AREA1)
EgtSetName( nArea1Id , WIN_AREA .. '1')
EgtSetInfo( nArea1Id, WIN_AREATYPE, WIN_AREATYPES.NULL)
local nArea1OutlineLayerId = EgtGroup( nArea1Id)
EgtSetName( nArea1OutlineLayerId , WIN_AREAOUTLINE)
local nArea2Id = EgtGroup( nAreaLayerId)
EgtSetName( nArea2Id , WIN_AREA2)
EgtSetName( nArea2Id , WIN_AREA .. '2')
EgtSetInfo( nArea2Id, WIN_AREATYPE, WIN_AREATYPES.NULL)
local nArea2OutlineLayerId = EgtGroup( nArea2Id)
EgtSetName( nArea2OutlineLayerId , WIN_AREAOUTLINE)
+2 -2
View File
@@ -120,14 +120,14 @@ local function ConvertAreaToTable( nAreaId)
AreaTable[JWD_SPLIT] = SplitTable
end
-- ciclo sulle aree contenute
local nChildAreaId = EgtGetFirstNameInGroup( nAreaId, WIN_AREAASTERISK)
local nChildAreaId = EgtGetFirstNameInGroup( nAreaId, WIN_AREA .. '*')
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)
nChildAreaId = EgtGetNextName( nChildAreaId, WIN_AREA .. '*')
end
return AreaTable
end
+1 -1
View File
@@ -67,7 +67,7 @@ end
WinCalculate.SetCalcSolid( true)
-- creo i pezzi
local nFrameId = EgtGetFirstNameInGroup( GDB_ID.ROOT, WIN_AREAASTERISK)
local nFrameId = EgtGetFirstNameInGroup( GDB_ID.ROOT, WIN_AREA .. '*')
WinCalculate.CreatePartFromArea( nFrameId)
-- preparo per automatismo lavorazioni
+1 -1
View File
@@ -574,7 +574,7 @@ local nFill6Id = WinCreate.AddFill( nSash6Id, WIN_FILLTYPES.GLASS)
WinCalculate.SetCalcSolid( true)
-- creo i pezzi
local nFrameId = EgtGetFirstNameInGroup( GDB_ID.ROOT, WIN_AREAASTERISK)
local nFrameId = EgtGetFirstNameInGroup( GDB_ID.ROOT, WIN_AREA .. '*')
WinCalculate.CreatePartFromArea( nFrameId)
-- salvo progetto su file