- corretta la numerazione delle ante nei nomi dei pezzi
- lettura dei sovramateriali dal profilo.
This commit is contained in:
@@ -21,6 +21,7 @@ require( 'EgtBase')
|
||||
require( 'WinConst')
|
||||
|
||||
local s_dDowelTol = 1
|
||||
local s_nSashNbr = 0 -- contatore delle ante per assegnare nomi
|
||||
|
||||
local s_bCalcSolid = false
|
||||
function WinCalculate.GetCalcSolid()
|
||||
@@ -1861,6 +1862,12 @@ local function CalcProfilingProcessings( nPartId, nOutlineId)
|
||||
local nProfileLayerId = EgtGetFirstNameInGroup( nPartId, WIN_PROFILE)
|
||||
local nMainProfileId = EgtGetFirstNameInGroup( nProfileLayerId, WIN_PRF_MAIN)
|
||||
|
||||
-- recupero le info di sovramateriale dal profilo
|
||||
CopyInfo( nPartId, nMainProfileId, WIN_PRC_OVERMAT_IN, 0)
|
||||
CopyInfo( nPartId, nMainProfileId, WIN_PRC_OVERMAT_OUT, 0)
|
||||
CopyInfo( nPartId, nMainProfileId, WIN_PRC_OVERMAT_LEFT, 0)
|
||||
CopyInfo( nPartId, nMainProfileId, WIN_PRC_OVERMAT_RIGHT, 0)
|
||||
|
||||
-- calcolo lavorazioni dei profili
|
||||
local bChangeProfile = EgtGetInfo( nOutlineId, WIN_PRF_CHANGE, 'b') or false
|
||||
if bChangeProfile then
|
||||
@@ -3053,20 +3060,11 @@ local function CalcPartName( nAreaId, nAreaType)
|
||||
|
||||
local sName = ''
|
||||
if nAreaType == WIN_AREATYPES.FRAME then
|
||||
sName = WIN_FRAME .. '_'
|
||||
sName = WIN_FRAME
|
||||
EgtSetInfo( nAreaId, WIN_AREA_NAME, sName)
|
||||
elseif nAreaType == WIN_AREATYPES.SASH then
|
||||
-- risalgo nella gerarchia per individuare la catena di sottoaree
|
||||
local nParentId = EgtGetParent( nAreaId)
|
||||
local nParentType = EgtGetInfo( nParentId, WIN_AREATYPE, 'i')
|
||||
while nParentType ~= WIN_AREATYPES.FRAME do
|
||||
local sParentName = EgtGetName( nParentId)
|
||||
local _, sParentNbr = EgtStartsWith( sParentName, WIN_AREA)
|
||||
sName = sParentNbr .. '_'.. sName
|
||||
nParentId = EgtGetParent( nParentId)
|
||||
nParentType = EgtGetInfo( nParentId, WIN_AREATYPE, 'i')
|
||||
end
|
||||
sName = WIN_SASH .. '_'.. sName
|
||||
s_nSashNbr = s_nSashNbr + 1
|
||||
sName = WIN_SASH .. '_'.. tostring( s_nSashNbr)
|
||||
EgtSetInfo( nAreaId, WIN_AREA_NAME, sName)
|
||||
else
|
||||
-- per split o riempimento devo ricavare il nome del parent che lo contiene
|
||||
@@ -3107,7 +3105,7 @@ local function CreatePartFromOutline( nAreaLayerId, sName, nOutlineId, nOutlineC
|
||||
|
||||
-- imposto nome del pezzo
|
||||
local sOutlineName = EgtIf( bBottomRail, WIN_BOTTOMRAIL, EgtGetName( nOutlineId))
|
||||
local sPartName = sName .. sOutlineName
|
||||
local sPartName = sName .. '_' .. sOutlineName
|
||||
EgtSetName( nPartId, sPartName)
|
||||
|
||||
-- imposto il colore
|
||||
@@ -3119,12 +3117,6 @@ local function CreatePartFromOutline( nAreaLayerId, sName, nOutlineId, nOutlineC
|
||||
EgtSetColor( nPartId, Color3d( 255, 159, 57))
|
||||
end
|
||||
|
||||
-- setto le info di sovramateriale ( TO DO : capire da dove devono essere ricavate)
|
||||
EgtSetInfo( nPartId, WIN_PRC_OVERMAT_IN, 0)
|
||||
EgtSetInfo( nPartId, WIN_PRC_OVERMAT_OUT, 0)
|
||||
EgtSetInfo( nPartId, WIN_PRC_OVERMAT_LEFT, 0)
|
||||
EgtSetInfo( nPartId, WIN_PRC_OVERMAT_RIGHT, 0)
|
||||
|
||||
-- ricavo il tipo di profilo
|
||||
local nProfileType = GetOutlineProfileType( nOutlineId, bBottomRail)
|
||||
-- disegno ingombro
|
||||
@@ -3146,7 +3138,7 @@ local function CreatePartFromOutline( nAreaLayerId, sName, nOutlineId, nOutlineC
|
||||
-- b) Fill
|
||||
elseif nAreaType == WIN_AREATYPES.FILL then
|
||||
-- imposto nome del pezzo
|
||||
EgtSetName( nPartId, sName .. WIN_FILL)
|
||||
EgtSetName( nPartId, sName .. '_' .. WIN_FILL)
|
||||
|
||||
-- ricavo tipo
|
||||
local nFillType = EgtGetInfo( nAreaLayerId, WIN_FILLTYPE, 'i')
|
||||
@@ -3860,6 +3852,7 @@ function WinCalculate.CreatePartFromArea( nFrameId)
|
||||
-- calcolo outline a partire dal base outline
|
||||
CalculateAreaOutline( nFrameId)
|
||||
-- creo pezzi
|
||||
s_nSashNbr = 0 -- resetto il numero di ante del progetto
|
||||
CalculateAreaParts( nFrameId)
|
||||
-- calcolo le spine
|
||||
CalculateAreaDowels( nFrameId)
|
||||
|
||||
Reference in New Issue
Block a user