- Corretto posizionamento pezzi in tavola
This commit is contained in:
+7
-12
@@ -58,7 +58,7 @@ for i = 1, 99 do
|
||||
end
|
||||
|
||||
local WinExec = require( 'WinExec')
|
||||
local WinExec = require( 'WinLib')
|
||||
local WinLib = require( 'WinLib')
|
||||
|
||||
-- Carico i dati globali
|
||||
local WinData = require( 'WinData')
|
||||
@@ -115,7 +115,7 @@ end
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
local function GetDataConfig()
|
||||
-- recupero utensili dal magazzino
|
||||
WinExec.GetToolsFromDB()
|
||||
-- WinExec.GetToolsFromDB()
|
||||
|
||||
-- TODO da gestire eventuali errori bloccanti
|
||||
return true
|
||||
@@ -172,7 +172,7 @@ local function AddOverMaterialToRaw( PARTS)
|
||||
for i = 1, #PARTS do
|
||||
|
||||
-- prima di aggiungere sovramateriale al grezzo, calcolo dimensioni del finito
|
||||
local b3FinishedPart = EgtGetBBoxGlob( PARTS[i].idRaw or GDB_ID.NULL, GDB_BB.STANDARD)
|
||||
local b3FinishedPart = EgtGetBBoxGlob( PARTS[i].id or GDB_ID.NULL, GDB_BB.STANDARD)
|
||||
PARTS[i].b3FinishedPart = b3FinishedPart
|
||||
PARTS[i].dPartLength = PARTS[i].b3FinishedPart:getDimX()
|
||||
PARTS[i].dPartWidth = PARTS[i].b3FinishedPart:getDimY()
|
||||
@@ -190,21 +190,15 @@ local function AddOverMaterialToRaw( PARTS)
|
||||
PARTS[i].dRawWidth = PARTS[i].RawOffset.dOverMatOut + PARTS[i].dPartWidth + PARTS[i].RawOffset.dOverMatIn
|
||||
PARTS[i].dRawHeight = PARTS[i].dPartHeight
|
||||
|
||||
EgtDraw() --TODO rimuovere
|
||||
|
||||
EgtModifyRawPartSize( PARTS[i].idRaw, PARTS[i].dRawLength, PARTS[i].dRawWidth, PARTS[i].dRawHeight)
|
||||
EgtDraw() --TODO rimuovere
|
||||
EgtModifyRawPartSize( PARTS[i].idRaw, PARTS[i].dRawLength, PARTS[i].dRawWidth, PARTS[i].dPartHeight)
|
||||
|
||||
local vtMove = Vector3d( PARTS[i].RawOffset.dOverMatLeft, PARTS[i].RawOffset.dOverMatOut, 0)
|
||||
EgtMovePartInRawPart( PARTS[i].id, vtMove)
|
||||
|
||||
EgtDraw() --TODO rimuovere
|
||||
|
||||
-- TODO da controllare, se ruotato di 180° bisognerebbe prendere dOverMatIn. Lo stesso per la X
|
||||
PARTS[i].OffsetPartToRaw = {}
|
||||
PARTS[i].OffsetPartToRaw.X = PARTS[i].RawOffset.dOverMatLeft
|
||||
PARTS[i].OffsetPartToRaw.Y = PARTS[i].RawOffset.dOverMatOut
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@@ -213,8 +207,9 @@ end
|
||||
---------------------------------------------------------------------
|
||||
local function CreateRaws( PARTS)
|
||||
for i = 1, #PARTS do
|
||||
-- si crea il grezzo nell'origine del pezzo
|
||||
PARTS[i].idRaw = EgtAddRawPartWithPart( PARTS[i].id, EgtGetFirstNameInGroup( PARTS[i].id, 'Geo'), 0, ColA)
|
||||
-- si crea un grezzo "finto" (un cubo da 100mm) nell'origine del pezzo, verrà poi dimensionato uan volta adeguato con i vari sovramateriali
|
||||
PARTS[i].idRaw = EgtAddRawPart( PARTS[i].frame:getOrigin(), 100, 100, 100, ColA)
|
||||
EgtAddPartToRawPart( PARTS[i].id, ORIG(), PARTS[i].idRaw)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user