3dPrinting :
- modificata definizione e gestione delle partenze sui layer.
This commit is contained in:
@@ -70,9 +70,6 @@ function RunPartPositioning.Exec()
|
||||
-- Rimuovo eventuale frame
|
||||
local nFrameId = EgtGetFirstNameInGroup( nAuxId, FRAME_PART)
|
||||
if nFrameId then EgtErase( nFrameId) end
|
||||
-- Rimuovo eventuale start point
|
||||
local nPtStartId = EgtGetFirstNameInGroup( nAuxId, KEY_START_POINT)
|
||||
if nPtStartId then EgtErase( nPtStartId) end
|
||||
|
||||
-- Recupero dati tavola (creando gruppo di lavoro temporaneo)
|
||||
local nQqqId = EgtAddMachGroup( 'qqq')
|
||||
@@ -164,13 +161,23 @@ function RunPartPositioning.Exec()
|
||||
|
||||
EgtResetCurrMachGroup()
|
||||
|
||||
-- Creo lo start point
|
||||
local ptStart = b3Solid:getCenter() - 0.6 * b3Solid:getDimY() * Y_AX() - 0.5 * b3Solid:getDimZ() * Z_AX()
|
||||
nPtStartId = EgtPoint( nAuxId, ptStart, GDB_RT.GLOB)
|
||||
if nPtStartId then
|
||||
EgtSetName( nPtStartId, START_POINT)
|
||||
EgtSetColor( nPtStartId, EgtStdColor( "RED"))
|
||||
end
|
||||
-- Porto punti/curve di inizio nel gruppo aux
|
||||
local vStartId = EgtGetNameInGroup( nLayerId, START_GEOM)
|
||||
if vStartId then
|
||||
for j = 1, #vStartId do
|
||||
EgtRelocateGlob( vStartId[j], nAuxId)
|
||||
EgtSetColor( vStartId[j], EgtStdColor( "RED"))
|
||||
end
|
||||
else
|
||||
-- se non ci sono punti/curve di inizio definiti e non ve ne sono nemmeno in aux, creo un punto
|
||||
local vOldStart = EgtGetNameInGroup( nAuxId, START_GEOM)
|
||||
if not vOldStart then
|
||||
local ptStart = b3Solid:getCenter() - 0.6 * b3Solid:getDimY() * Y_AX() - 0.5 * b3Solid:getDimZ() * Z_AX()
|
||||
nPtStartId = EgtPoint( nAuxId, ptStart, GDB_RT.GLOB)
|
||||
EgtSetName( nPtStartId, START_GEOM)
|
||||
EgtSetColor( nPtStartId, EgtStdColor( "RED"))
|
||||
end
|
||||
end
|
||||
|
||||
-- Dichiaro pezzo posizionato
|
||||
EgtSetInfo( nPartId, KEY_PART_ON_TABLE, 1)
|
||||
|
||||
Reference in New Issue
Block a user