This commit is contained in:
Emmanuele Sassi
2024-06-18 15:49:54 +02:00
8 changed files with 903 additions and 615 deletions
+74
View File
@@ -382,6 +382,80 @@ local nFillId = WinCreate.AddFill( nSashId, WIN_FILLTYPES.GLASS)
-- -- 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 SashJointType = WIN_JNT.FULL_V
-- local nSash1Id = WinCreate.AddSash( nArea1Id, SashJointType, SashJointType, SashJointType, SashJointType, WIN_SASHTYPES.ACTIVE)
-- -- 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_IN)
-- -- aggiungo vetro
-- local nFill2Id = WinCreate.AddFill( nSash2Id, WIN_FILLTYPES.GLASS)
--
-- -- aggiungo terza anta
-- local nSash3Id = WinCreate.AddSash( nArea3Id, SashJointType, SashJointType, SashJointType, SashJointType, 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 SashJointType = WIN_JNT.FULL_V
-- local nSash1Id = WinCreate.AddSash( nArea1Id, SashJointType, SashJointType, SashJointType, SashJointType, WIN_SASHTYPES.ACTIVE_OUT)
-- -- 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_IN)
-- -- aggiungo vetro
-- local nFill2Id = WinCreate.AddFill( nSash2Id, WIN_FILLTYPES.GLASS)
--
-- -- aggiungo terza anta
-- local nSash3Id = WinCreate.AddSash( nArea3Id, SashJointType, SashJointType, SashJointType, SashJointType, 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 SashJointType = WIN_JNT.FULL_V
-- local nSash1Id = WinCreate.AddSash( nArea1Id, SashJointType, SashJointType, SashJointType, SashJointType, WIN_SASHTYPES.ACTIVE_OUT)
-- -- 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_IN)
-- -- aggiungo vetro
-- local nFill2Id = WinCreate.AddFill( nSash2Id, WIN_FILLTYPES.GLASS)
--
-- -- aggiungo terza anta
-- local nSash3Id = WinCreate.AddSash( nArea3Id, SashJointType, SashJointType, SashJointType, SashJointType, WIN_SASHTYPES.INACTIVE_IN)
-- -- aggiungo vetro
-- local nFill3Id = WinCreate.AddFill( nSash3Id, WIN_FILLTYPES.GLASS)
--
-- -- aggiungo quarta anta
-- local nSash4Id = WinCreate.AddSash( nArea4Id, SashJointType, SashJointType, SashJointType, SashJointType, WIN_SASHTYPES.INACTIVE_OUT)
-- -- aggiungo vetro
-- local nFill4Id = WinCreate.AddFill( nSash4Id, WIN_FILLTYPES.GLASS)
------------------------ Finestra sei ante con montanti verticali e orizzontale ------------------------
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+26
View File
@@ -88,6 +88,10 @@ WIN_SASHTYPES = {
NULL = 0,
ACTIVE = 1,
INACTIVE = 2,
ACTIVE_IN = 3,
ACTIVE_OUT = 4,
INACTIVE_IN = 5,
INACTIVE_OUT = 6,
}
WIN_SURF_APPROX = 0.05
@@ -140,6 +144,8 @@ 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'
@@ -149,6 +155,7 @@ WIN_STRIP = 'Strip'
WIN_ALU = 'Alu'
WIN_CTRIN = 'CtrIn'
WIN_OUT = 'Out'
WIN_IN = 'In'
WIN_OUTOFST = 'OfstOut'
WIN_CTRINOFST = 'OfstCtrIn'
WIN_OFST = 'Ofst'
@@ -160,6 +167,7 @@ WIN_STARTCPDELTA = 'StartCPDelta'
WIN_ENDCPDELTA = 'EndCPDelta'
WIN_GEOWIDTH = 'GeoWidth'
WIN_GLASSTHICKNESS = 'GlassThickness'
WIN_SEMI_PROFILE = 'SemiProfileId'
WIN_GEOOUTLINEBOTTOM = 'GeoOutlineBottom'
@@ -201,6 +209,15 @@ WIN_GAPDELTAZ = 'GapDeltaZ'
WIN_GAPDELTAIN = 'GapDeltaIn'
WIN_GAPDELTAOUT = 'GapDeltaOut'
WIN_PRC_PHASE = 'PHASE'
WIN_PRC_PROFILE_TYPE = 'PROFILE_TYPE'
WIN_PRC_NTOOLS = 'NTOOLS'
WIN_PRC_TOOL_NAME = 'TOOL_NAME'
WIN_PRC_OFFL = 'OFFL'
WIN_PRC_OFFR = 'OFFR'
WIN_CRV_ON_FRENCH_SPLIT = 'OutlineOnFrenchSplit'
WIN_MAINGUIDE = 'MainGuide'
WIN_STARTGUIDE = 'StartGuide'
WIN_ENDGUIDE = 'EndGuide'
@@ -211,6 +228,15 @@ WIN_SRF_END = 'EndSurface'
WIN_BOTTOMRAIL = 'BottomRail'
WIN_PRC = 'Processings'
WIN_PRC_FEATURE_TYPE = 'FEATURE_TYPE'
WIN_PRC_TYPE = {
HOLE = 'Hole',
PROFILING = 'Profiling',
POCKET = 'Pocket',
CUT = 'Cut'
}
WIN_DOWEL = 'Dowel'
WIN_DWL_TOPPERPSTART = 'TopPerpStart'
WIN_DWL_TOPPERPEND = 'TopPerpEnd'
File diff suppressed because it is too large Load Diff
+26 -10
View File
@@ -22,6 +22,12 @@ 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
@@ -136,7 +142,8 @@ function WinCreate.AddSash( nAreaId, nJointBL, nJointBR, nJointTR, nJointTL, nSa
while nAreaOutlineId do
local nOutlineId = EgtCopy( nAreaOutlineId, nAreaOutlineLayerId)
EgtSetInfo( nOutlineId, WIN_SOU, nAreaOutlineId)
EgtSetInfo( nAreaOutlineId, WIN_CHILD, nOutlineId)
EgtRemoveInfo( nOutlineId, WIN_CHILD)
AddInfo( nAreaOutlineId, WIN_CHILD, nOutlineId)
nAreaOutlineId = EgtGetNext( nAreaOutlineId)
end
-- imposto tipo giunzioni
@@ -167,7 +174,8 @@ function WinCreate.AddFill( nAreaId, FillType)
while nAreaOutlineId do
local nOutlineId = EgtCopy( nAreaOutlineId, nAreaOutlineLayerId)
EgtSetInfo( nOutlineId, WIN_SOU, nAreaOutlineId)
EgtSetInfo( nAreaOutlineId, WIN_CHILD, nOutlineId)
EgtRemoveInfo( nOutlineId, WIN_CHILD)
AddInfo( nAreaOutlineId, WIN_CHILD, nOutlineId)
EgtRemoveInfo( nAreaOutlineLayerId, WIN_JOINT_BL)
EgtRemoveInfo( nAreaOutlineLayerId, WIN_JOINT_BR)
EgtRemoveInfo( nAreaOutlineLayerId, WIN_JOINT_TL)
@@ -381,7 +389,8 @@ function WinCreate.CreateAreaFromSplit( nAreaLayerId, nSplitId)
nInters = 1
local nCopyId = EgtCopy( nOutlineId, nArea2OutlineLayerId)
EgtSetInfo( nCopyId, WIN_SOU, nOutlineId)
EgtSetInfo( nOutlineId, WIN_CHILD, nCopyId)
EgtRemoveInfo( nCopyId, WIN_CHILD)
AddInfo( nOutlineId, WIN_CHILD, nCopyId)
local dStartIntersParam = EgtCurveParamAtPoint( nCopyId, ptInters)
EgtTrimCurveStartAtParam( nCopyId, dStartIntersParam)
elseif nInters == 1 then
@@ -389,13 +398,15 @@ function WinCreate.CreateAreaFromSplit( nAreaLayerId, nSplitId)
nInters = 2
local nCopyId = EgtCopy( nOutlineId, nArea2OutlineLayerId)
EgtSetInfo( nCopyId, WIN_SOU, nOutlineId)
EgtSetInfo( nOutlineId, WIN_CHILD, nCopyId)
EgtRemoveInfo( nCopyId, WIN_CHILD)
AddInfo( nOutlineId, WIN_CHILD, nCopyId)
local dEndIntersParam = EgtCurveParamAtPoint( nCopyId, ptInters)
EgtTrimCurveEndAtParam( nCopyId, dEndIntersParam)
-- copio anche split
local nSplitCopyId = EgtCopy( nSplitId, nArea2OutlineLayerId)
EgtSetInfo( nSplitCopyId, WIN_SOU, nSplitId)
EgtSetInfo( nSplitId, WIN_CHILD, nSplitCopyId)
EgtRemoveInfo( nSplitCopyId, WIN_CHILD)
AddInfo( nSplitId, WIN_CHILD, nSplitCopyId)
EgtRemoveInfo( nSplitCopyId, WIN_SPLIT_STARTINTERS)
EgtRemoveInfo( nSplitCopyId, WIN_SPLIT_ENDINTERS)
if not AreSamePointExact( EgtEP( nCopyId), EgtSP( nSplitCopyId)) then
@@ -414,7 +425,8 @@ function WinCreate.CreateAreaFromSplit( nAreaLayerId, nSplitId)
-- inizio area 1
nCopyId = EgtCopy( nOutlineId, nArea1OutlineLayerId)
EgtSetInfo( nCopyId, WIN_SOU, nOutlineId)
EgtSetInfo( nOutlineId, WIN_CHILD, nCopyId)
EgtRemoveInfo( nCopyId, WIN_CHILD)
AddInfo( nOutlineId, WIN_CHILD, nCopyId)
local dStartIntersParam = EgtCurveParamAtPoint( nCopyId, ptInters)
EgtTrimCurveStartAtParam( nCopyId, dStartIntersParam)
elseif nInters == 2 then
@@ -422,14 +434,16 @@ function WinCreate.CreateAreaFromSplit( nAreaLayerId, nSplitId)
nInters = 3
local nCopyId = EgtCopy( nOutlineId, nArea1OutlineLayerId)
EgtSetInfo( nCopyId, WIN_SOU, nOutlineId)
EgtSetInfo( nOutlineId, WIN_CHILD, nCopyId)
EgtRemoveInfo( nCopyId, WIN_CHILD)
AddInfo( nOutlineId, WIN_CHILD, nCopyId)
local dEndIntersParam = EgtCurveParamAtPoint( nCopyId, ptInters)
EgtTrimCurveEndAtParam( nCopyId, dEndIntersParam)
-- copio anche split
local nSplitCopyId = EgtCopy( nSplitId, nArea1OutlineLayerId)
EgtRemoveName( nSplitCopyId)
EgtSetInfo( nSplitCopyId, WIN_SOU, nSplitId)
EgtSetInfo( nSplitId, WIN_CHILD, nSplitCopyId)
EgtRemoveInfo( nSplitCopyId, WIN_CHILD)
AddInfo( nSplitId, WIN_CHILD, nSplitCopyId)
EgtRemoveInfo( nSplitCopyId, WIN_SPLIT_STARTINTERS)
EgtRemoveInfo( nSplitCopyId, WIN_SPLIT_ENDINTERS)
if not AreSamePointExact( EgtEP( nCopyId), EgtSP( nSplitCopyId)) then
@@ -450,12 +464,14 @@ function WinCreate.CreateAreaFromSplit( nAreaLayerId, nSplitId)
-- copio nel profilo 2
local nCopyId = EgtCopy( nOutlineId, nArea2OutlineLayerId)
EgtSetInfo( nCopyId, WIN_SOU, nOutlineId)
EgtSetInfo( nOutlineId, WIN_CHILD, nCopyId)
EgtRemoveInfo( nCopyId, WIN_CHILD)
AddInfo( nOutlineId, WIN_CHILD, nCopyId)
elseif nInters == 2 then
-- copio nel profilo 1
local nCopyId = EgtCopy( nOutlineId, nArea1OutlineLayerId)
EgtSetInfo( nCopyId, WIN_SOU, nOutlineId)
EgtSetInfo( nOutlineId, WIN_CHILD, nCopyId)
EgtRemoveInfo( nCopyId, WIN_CHILD)
AddInfo( nOutlineId, WIN_CHILD, nCopyId)
end
-- aggiorno indice
nOutlineId = EgtGetNext( nOutlineId)