- correzioni.
This commit is contained in:
+22
-6
@@ -4,7 +4,7 @@
|
||||
-- Intestazioni
|
||||
require( 'EgtBase')
|
||||
_ENV = EgtProtectGlobal()
|
||||
EgtEnableDebug( true)
|
||||
EgtEnableDebug( false)
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------------------
|
||||
-- FUNZIONI BASE PER GENERARE I COMPO SOLID INIZIO
|
||||
@@ -80,7 +80,7 @@ local function FillInfoTable()
|
||||
if TOOL.nPrevId then TOOL.tbInfo.nPrevId = TOOL.nPrevId end
|
||||
if TOOL.nNextId then TOOL.tbInfo.nNextId = TOOL.nNextId end
|
||||
if TOOL.nJunctionType then TOOL.tbInfo.nJunctionType = TOOL.nJunctionType end
|
||||
if TOOL.bOnLoop then TOOL.tbInfo.bOnLoop = TOOL.bOnLoop end
|
||||
if TOOL.bOnLoop ~= nil then TOOL.tbInfo.bOnLoop = TOOL.bOnLoop end
|
||||
if TOOL.dAngBR then TOOL.tbInfo.dAngBR = TOOL.dAngBR end
|
||||
if TOOL.dSideAngR then TOOL.tbInfo.dSideAngR = TOOL.dSideAngR end
|
||||
if TOOL.dAngBL then TOOL.tbInfo.dAngBL = TOOL.dAngBL end
|
||||
@@ -125,7 +125,7 @@ function TOOL.WriteDataToChildPart(tbInfo)
|
||||
if tbInfo.dLen then EgtSetInfo(tbInfo.nId, 'Len', tbInfo.dLen) end
|
||||
if tbInfo.dAngDx then EgtSetInfo(tbInfo.nId, 'AngDx', tbInfo.dAngDx) end
|
||||
if tbInfo.dAgnSx then EgtSetInfo(tbInfo.nId, 'AngSx', tbInfo.dAngSx) end
|
||||
if tbInfo.bOnLoop then EgtSetInfo(tbInfo.nId, "OnLoop", tbInfo.bOnLoop) end
|
||||
if tbInfo.bOnLoop ~= nil then EgtSetInfo(tbInfo.nId, "OnLoop", tbInfo.bOnLoop) end
|
||||
if tbInfo.dH then EgtSetInfo(tbInfo.nId, 'H', tbInfo.dH) end
|
||||
if tbInfo.dTh then EgtSetInfo(tbInfo.nId, 'Th', tbInfo.dTh) end
|
||||
-- if tbInfo.dBeta1 then EgtSetInfo(tbInfo.nId, 'Beta1', tbInfo.dBeta1) end
|
||||
@@ -826,10 +826,21 @@ end
|
||||
|
||||
local function ClearPart(nPartId)
|
||||
local tbLayer = TOOL.FindLayers(nPartId)
|
||||
-- svuoto i layer con gli elementi principali
|
||||
EgtEmptyGroup(tbLayer["OutLoop"])
|
||||
EgtEmptyGroup(tbLayer["Region"])
|
||||
-- rimetto il frame del part nell'origine
|
||||
EgtChangeGroupFrame(nPartId, GLOB_FRM())
|
||||
-- resetto il gruppo di accoppiati
|
||||
ASS.bActiveHistory = false
|
||||
ASS.nPartId = nPartId
|
||||
ASS.Unpair()
|
||||
ASS.bActiveHistory = true
|
||||
-- cancello il solido
|
||||
local PartSolid = EgtGetInfo(TOOL.tbInfo.nId, "Child")
|
||||
EgtErase(PartSolid)
|
||||
-- resetto l'id del part del solido
|
||||
EgtSetInfo(nPartId, "Child", "")
|
||||
end
|
||||
|
||||
-- local function AdaptNeighbour(nPartNeigh)
|
||||
@@ -852,6 +863,7 @@ local function UpdateNeighInfo()
|
||||
end
|
||||
-- al successivo setto il curr come Prev
|
||||
-- al corrente setto il next
|
||||
local nNext = TOOL.tbInfo.nEdge == nEdges and 1 or TOOL.tbInfo.nEdge + 1
|
||||
local sNameNext = "A"..tostring(nNext)
|
||||
TOOL.tbInfo.nNextId = EgtGetInfo(TOOL.tbInfo.nParent, sNameNext, "i")
|
||||
if TOOL.tbInfo.nNextId then
|
||||
@@ -888,6 +900,10 @@ function TOOL.CreateParetinaFull(bPrev, bNext)
|
||||
else
|
||||
-- se esisteva già ripulisco i layer della regione e del loop ed elimino il solido
|
||||
ClearPart(nChildPart)
|
||||
--debug
|
||||
TOOL.SaveMePlease()
|
||||
return
|
||||
--debug
|
||||
TOOL.tbInfo.nId = nChildPart
|
||||
-- recupero l'id di eventuali vicini
|
||||
TOOL.tbInfo.nPrevId = EgtGetInfo(TOOL.tbInfo.nId, "Prev", "i") or GDB_ID.NULL
|
||||
@@ -935,18 +951,18 @@ function TOOL.CreateParetinaFull(bPrev, bNext)
|
||||
-- TOOL.CreateParetinaFull(false, false)
|
||||
-- end
|
||||
-- -- modifico anche la paretina successiva(se esiste)
|
||||
-- if bNext and TOOL.tbInfo.nNextId and TOOL.tbInfo.nNextId ~= GDB_ID.NULL then
|
||||
-- if bNext and nNextId and nNextId ~= GDB_ID.NULL then
|
||||
-- FillInfoTableFromPart(nNextId)
|
||||
-- TOOL.CreateParetinaFull(false, false)
|
||||
-- end
|
||||
|
||||
-- creo il solido e lo accoppio
|
||||
local nCurr = TOOL.tbInfo.nId -- debug -- SARà DA TOGLIERE quando scommento la parte di aggiornamento prev e next
|
||||
--local nCurr = TOOL.tbInfo.nId -- debug -- SARà DA TOGLIERE quando scommento la parte di aggiornamento prev e next
|
||||
if SLD then
|
||||
SLD.CurrId = nCurr
|
||||
SLD.Main()
|
||||
end
|
||||
|
||||
|
||||
if ASS then
|
||||
ASS.nVeinCtx = EgtGetContext()
|
||||
ASS.nPartId = nCurr
|
||||
|
||||
Reference in New Issue
Block a user