Compare commits

..

30 Commits

Author SHA1 Message Date
luca.mazzoleni 3ac752861b Merge branch 'hotfix/NestingSilhouetteTolerance' 2024-11-19 12:19:52 +01:00
luca.mazzoleni d690906180 - in NestProcess tolleranza silhouette riportata al valore pre modifiche DLL 2024-11-19 12:19:27 +01:00
luca.mazzoleni e5a2a7e5a9 - modificato compile per contemplare Squaring.lua 2024-11-15 18:05:38 +01:00
luca.mazzoleni 0771665282 Merge branch 'release/2.6k1' 2024-11-14 15:21:43 +01:00
luca.mazzoleni 6ba42d19e9 update version e log 2024-11-14 15:21:12 +01:00
luca.mazzoleni 374021ad13 - in NestProcess corretta creazione outline che in precedenza funzionava (modificata la gestione tolleranza nella funzione EgtGetSurfTmSilhouette con aggiornamenti DLL recenti) 2024-11-14 14:49:36 +01:00
luca.mazzoleni dfe405f3b0 - in NestProcess corretta indentazione 2024-11-13 17:17:12 +01:00
andrea.villa bd7885d245 Se feature taglio, si controlla solo interferenza altri pezzi e non lunghezza minima 2024-11-08 12:32:31 +01:00
luca.mazzoleni 1c19c48e55 Merge branch 'SquaringMasterPanel' into develop 2024-11-04 16:57:12 +01:00
luca.mazzoleni 9a40887d05 Merge branch 'develop' into SquaringMasterPanel 2024-11-04 15:40:23 +01:00
luca.mazzoleni 02e1bc7881 Merge branch 'master' into develop 2024-11-04 15:40:12 +01:00
luca.mazzoleni 5791bea4b5 in Squaring modifiche a lettura parametri utensili 2024-11-04 15:35:15 +01:00
andrea.villa 5b39d1a4ac Update Version 2024-11-04 15:23:04 +01:00
andrea.villa 62e00e8854 Update Version e Log 2024-11-04 15:22:35 +01:00
andrea.villa 349f0cb879 Merge branch 'hotfix/SideGrooveBladeLimitWidth' 2024-11-04 15:19:12 +01:00
luca.mazzoleni 4f2ffec3ab - in Squaring migliorie varie
- aggiunta rimozione lavorazioni fuori dall'area di squadratura
- in WallExec squadratura suddivisa prima e dopo le altre lavorazioni
- in FreeContour aggiunta funzione IsFaceOutsideSquaring per evitare di lavorare le facce che finiscono fuori dall'area di squadratura
2024-10-31 16:04:15 +01:00
luca.mazzoleni b1dd887899 - in Squaring implementata modalità ShrinkToParts; manca la rimozione delle lavorazioni fuori dall'area squadrata 2024-10-29 17:38:31 +01:00
luca.mazzoleni b325ebcd32 - in MachiningLib aggiunta funzione GetMachiningSteps per il calcolo degli stepdi lavorazione
- in Squaring aggiunti step verticali con lavorazioni aggiuntive
- in WallExec gestito default per parametro di squadratura TOOL
2024-10-29 13:14:00 +01:00
luca.mazzoleni f17411326b Merge branch 'develop' into SquaringMasterPanel 2024-10-29 09:17:58 +01:00
luca.mazzoleni 4752ffcfb4 Merge tag '2.6j1' into develop
release
2024-10-29 09:16:42 +01:00
luca.mazzoleni d2b3c32b61 - in Squaring aggiunt creazione lavorazione al momento e settaggio parametri
- in Squaring gestito allungamento e attacco verticale per contemplare overmaterial e altezza pezzo
2024-10-29 09:09:19 +01:00
luca.mazzoleni b4b3df0f5e - in Squaring modifiche a GetTools e CreateGeometry per contemplare tutti i casi specifici 2024-10-23 12:13:39 +02:00
luca.mazzoleni fdd114a8cd - in WallExec -> squadratura aggiunta funzione AddSquaring che verifica e aggiunge la squadratura in base al caso specifico
- in Squaring aggiunte funzioni per ricerca e controllo correttezza utensili in base al caso specifico
2024-10-21 12:43:28 +02:00
luca.mazzoleni d5e47c06fa Merge branch 'develop' into SquaringMasterPanel 2024-10-16 17:22:58 +02:00
luca.mazzoleni 6e7c4ffda1 - modifiche parziali a squadratura per contemplare casi in doppio 2024-10-16 16:59:17 +02:00
luca.mazzoleni bfaa85bbf2 - in squadratura aggiunta gestione truciolatore e ritorno errori 2024-10-14 14:26:58 +02:00
luca.mazzoleni 5c9e199c5a - in squadratura aggiunta gestione della direzione di percorrenza delle geometrie in base a rotazione utensile e riferimento; altri miglioramenti 2024-10-11 11:36:24 +02:00
luca.mazzoleni 09127ce576 - in WallExec aggiunta squadratura, da completare 2024-10-09 18:09:02 +02:00
luca.mazzoleni 87cd31bef7 Merge branch 'develop' into SquaringMasterPanel 2024-09-30 12:38:22 +02:00
luca.mazzoleni 896c0296a4 Merge branch 'develop' into SquaringMasterPanel 2024-09-25 12:35:10 +02:00
8 changed files with 696 additions and 50 deletions
+1
View File
@@ -4,6 +4,7 @@ REM Per togliere info di debug aggiungere flag -s prima del nome del file di inp
REM Compilazione 32 e 64 bit
\EgtProg\Dll32\luac54 -o bin\LuaLibs\Squaring.lua -s LuaLibs\Squaring.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\WallExec.lua -s LuaLibs\WallExec.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\WallLib.lua -s LuaLibs\WallLib.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\WMachiningLib.lua -s LuaLibs\WMachiningLib.lua
+491
View File
@@ -0,0 +1,491 @@
-- Squaring.lua by Egaltech s.r.l. 2024/10/15
-- Libreria squadratura pareti
-- Tabella per definizione modulo
local Squaring = {}
-- Include
require( 'EgtBase')
EgtOutLog( ' Squaring started', 1)
-- Dati
local WD = require( 'WallData')
local WM = require( 'WMachiningLib')
-------------------------------------------------------------------------------------------------------------
local function IsToolOk( Tool, dRawPartHeight)
local bIsToolOk = false
local bToolExists = false
local bToolCanReachDepth = false
local dMaxOvermaterial = 0
if type( WD.SQUARING_MAX_OVERMATERIAL) == "number" then
dMaxOvermaterial = WD.SQUARING_MAX_OVERMATERIAL
end
bToolExists = ( next( Tool) ~= nil)
if bToolExists then
if Tool.nType == MCH_TY.MILL_NOTIP then
bToolCanReachDepth = ( Tool.dThickness > dMaxOvermaterial - 10 * GEO.EPS_SMALL)
and ( Tool.dSideDepth > dRawPartHeight - 10 * GEO.EPS_SMALL)
else
bToolCanReachDepth = Tool.dMaxDepth > dRawPartHeight - 10 * GEO.EPS_SMALL
end
end
bIsToolOk = bToolExists and bToolCanReachDepth
return bIsToolOk
end
-------------------------------------------------------------------------------------------------------------
function Squaring.GetTools()
-- TODO vedere se questo valore è coerente sulle diverse macchine
local dHeadEncumberance = 130
local Tool = {}
local SquaringTools = {}
SquaringTools.Blade = {}
SquaringTools.Diskmill = {}
SquaringTools.Mill = {}
SquaringTools.Blade.H1 = {}
SquaringTools.Blade.H2 = {}
SquaringTools.Blade.H7 = {}
SquaringTools.Diskmill.H1 = {}
SquaringTools.Diskmill.H7 = {}
SquaringTools.Mill.H1 = {}
SquaringTools.Mill.H7 = {}
Tool.sName = EgtTdbGetFirstTool( MCH_TF.SAWBLADE + MCH_TF.MILL + MCH_TF.MORTISE)
while Tool.sName ~= '' do
EgtTdbSetCurrTool( Tool.sName)
local bIsToolLoadedOnSetup = EgtFindToolInCurrSetup( Tool.sName)
local bIsSquaringTool = EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'SQUARING', 'b') or false
Tool.nType = EgtTdbGetCurrToolParam( MCH_TP.TYPE)
Tool.dDiameter = EgtTdbGetCurrToolParam( MCH_TP.DIAM)
Tool.dMaxMaterial = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT)
Tool.dThickness = EgtIf( ( Tool.nType == MCH_TY.SAW_FLAT or Tool.nType == MCH_TY.SAW_STD), EgtTdbGetCurrToolParam( MCH_TP.THICK), Tool.dMaxMaterial)
Tool.dMaxDepth = EgtTdbGetCurrToolMaxDepth() or Tool.dMaxMaterial
Tool.sHead = EgtTdbGetCurrToolParam( MCH_TP.HEAD)
Tool.bIsCcw = EgtTdbGetCurrToolParam( MCH_TP.SPEED) < 0
Tool.dFeed = EgtTdbGetCurrToolParam( MCH_TP.FEED)
Tool.dStartFeed = EgtTdbGetCurrToolParam( MCH_TP.STARTFEED)
Tool.dEndFeed = EgtTdbGetCurrToolParam( MCH_TP.ENDFEED)
Tool.dTipFeed = EgtTdbGetCurrToolParam( MCH_TP.TIPFEED)
Tool.dMinFeed = EgtTdbGetCurrToolParam( MCH_TP.MINFEED)
Tool.dStep = EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'STEP', 'd') or EgtIf( ( Tool.nType == MCH_TY.SAW_FLAT or Tool.nType == MCH_TY.SAW_STD), ( Tool.dDiameter / 3), ( Tool.dMaxMaterial / 3))
Tool.dSideStep = EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'SIDESTEP', 'd') or ( Tool.dDiameter / 3)
Tool.dSideDepth = Tool.dDiameter / 2 - dHeadEncumberance
if bIsToolLoadedOnSetup and Tool.nType and bIsSquaringTool then
-- lame
if Tool.nType == MCH_TY.SAW_FLAT or Tool.nType == MCH_TY.SAW_STD then
SquaringTools.Blade[Tool.sHead] = Tool
Tool.bIsPathCw = Tool.bIsCcw
Tool.dSideStep = Tool.dStep
Tool.dStep = Tool.dThickness
-- frese standard
elseif Tool.nType == MCH_TY.MILL_STD then
SquaringTools.Mill[Tool.sHead] = Tool
Tool.bIsPathCw = not Tool.bIsCcw
-- truciolatori
elseif Tool.nType == MCH_TY.MILL_NOTIP then
SquaringTools.Diskmill[Tool.sHead] = Tool
Tool.bIsPathCw = Tool.bIsCcw
end
end
Tool = {}
Tool.sName = EgtTdbGetNextTool( MCH_TF.SAWBLADE + MCH_TF.MILL + MCH_TF.MORTISE)
end
return SquaringTools
end
-------------------------------------------------------------------------------------------------------------
function Squaring.AreToolsOk( sSquaringTool, SquaringTools, dRawPartHeight)
local bAreToolsOk = false
if sSquaringTool == 'DoubleDiskmill' then
bAreToolsOk = ( IsToolOk( SquaringTools.Blade.H2, dRawPartHeight)
and IsToolOk( SquaringTools.Diskmill.H1, dRawPartHeight)
and IsToolOk( SquaringTools.Diskmill.H7, dRawPartHeight))
elseif sSquaringTool == 'DoubleDiskmillAndBlade' then
bAreToolsOk = ( IsToolOk( SquaringTools.Blade.H2, dRawPartHeight)
and ( IsToolOk( SquaringTools.Diskmill.H1, dRawPartHeight) or IsToolOk( SquaringTools.Diskmill.H7, dRawPartHeight)))
elseif sSquaringTool == 'DoubleBlade' then
bAreToolsOk = ( IsToolOk( SquaringTools.Blade.H2, dRawPartHeight)
and ( IsToolOk( SquaringTools.Blade.H1, dRawPartHeight) or IsToolOk( SquaringTools.Blade.H7, dRawPartHeight)))
elseif sSquaringTool == 'Diskmill' then
bAreToolsOk = IsToolOk( SquaringTools.Diskmill.H1, dRawPartHeight) or IsToolOk( SquaringTools.Diskmill.H7, dRawPartHeight)
elseif sSquaringTool == 'Blade' then
bAreToolsOk = IsToolOk( SquaringTools.Blade.H2, dRawPartHeight)
elseif sSquaringTool == 'DoubleMill' then
bAreToolsOk = IsToolOk( SquaringTools.Mill.H1, dRawPartHeight) and IsToolOk( SquaringTools.Mill.H7, dRawPartHeight)
elseif sSquaringTool == 'Mill' then
bAreToolsOk = IsToolOk( SquaringTools.Mill.H1, dRawPartHeight) or IsToolOk( SquaringTools.Mill.H7, dRawPartHeight)
else
error( 'Squaring Tool not recognized')
end
return bAreToolsOk
end
-------------------------------------------------------------------------------------------------------------
function Squaring.CalculateParameters( sSquaringTool, SquaringTools, RawPart, vPart)
local SquaringParameters = {}
local sOrigCorner = EgtGetInfo( RawPart.nId, 'ORIGCORNER')
local bShrinkToParts = ( WD.SQUARING_TYPE == 2)
local bSquaringStartsOnReference = ( type( WD.SQUARING_STARTS_ON_REFERENCE) == "boolean") and ( WD.SQUARING_STARTS_ON_REFERENCE == true)
local dOffsetXY = 0
local dExtendZ = 0
if type( WD.SQUARING_OFFSET_XY) == "number" and ( WD.SQUARING_TYPE < 2) then
dOffsetXY = WD.SQUARING_OFFSET_XY
end
if type( WD.SQUARING_EXTEND_Z) == "number" then
dExtendZ = WD.SQUARING_EXTEND_Z
end
local Front = { sSide = 'Front'}
local Right = { sSide = 'Right'}
local Back = { sSide = 'Back'}
local Left = { sSide = 'Left'}
local b3Squaring = BBox3d( RawPart.b3)
-- se squadratura sui pezzi invece che sul master panel, si costruisce il box minimo che contiene tutti i pezzi
if bShrinkToParts then
b3Squaring = BBox3d( vPart[1].Box:getCenter())
for i = 1, #vPart do
b3Squaring:Add( vPart[i].Box)
end
end
local dDimX = b3Squaring:getDimX()
local dDimY = b3Squaring:getDimY()
local pt1 = b3Squaring:getMin() + Point3d( -dOffsetXY, -dOffsetXY, -dExtendZ)
local pt2 = pt1 + Point3d( dDimX + 2 * dOffsetXY, 0, 0)
local pt3 = pt2 + Point3d( 0, dDimY + 2 * dOffsetXY,0 )
local pt4 = pt3 + Point3d( -dDimX - 2 * dOffsetXY, 0, 0)
b3Squaring:Add( pt1)
b3Squaring:Add( pt2)
b3Squaring:Add( pt3)
b3Squaring:Add( pt4)
Front.nId = EgtLine( RawPart.nId, pt1, pt2, GDB_RT.GLOB)
Right.nId = EgtLine( RawPart.nId, pt2, pt3, GDB_RT.GLOB)
Back.nId = EgtLine( RawPart.nId, pt3, pt4, GDB_RT.GLOB)
Left.nId = EgtLine( RawPart.nId, pt4, pt1, GDB_RT.GLOB)
if not ( sSquaringTool == 'DoubleMill') and not ( sSquaringTool == 'Mill') then
EgtModifyCurveExtrusion( Front.nId, -Y_AX(), GDB_RT.GLOB)
EgtModifyCurveExtrusion( Right.nId, X_AX(), GDB_RT.GLOB)
EgtModifyCurveExtrusion( Back.nId, Y_AX(), GDB_RT.GLOB)
EgtModifyCurveExtrusion( Left.nId, -X_AX(), GDB_RT.GLOB)
end
EgtSetName( Front.nId, 'SquaringGeometry')
EgtSetName( Right.nId, 'SquaringGeometry')
EgtSetName( Back.nId, 'SquaringGeometry')
EgtSetName( Left.nId, 'SquaringGeometry')
-- in base al caso si assegna l'utensile al lato
if sSquaringTool == 'DoubleDiskmill' then
Left.Tool = SquaringTools.Diskmill.H1
Right.Tool = SquaringTools.Blade.H2
Front.Tool = SquaringTools.Diskmill.H1
Front.ToolDouble = SquaringTools.Diskmill.H7
Front.sSide = 'Front+Back'
elseif sSquaringTool == 'DoubleDiskmillAndBlade' then
Left.Tool = SquaringTools.Diskmill.H1 or SquaringTools.Diskmill.H7
Right.Tool = SquaringTools.Blade.H2
Front.Tool = SquaringTools.Blade.H2
Front.ToolDouble = SquaringTools.Diskmill.H1 or SquaringTools.Diskmill.H7
Front.sSide = 'Front+Back'
elseif sSquaringTool == 'DoubleBlade' then
Left.Tool = SquaringTools.Blade.H2
Right.Tool = SquaringTools.Blade.H2
Front.Tool = SquaringTools.Blade.H2
Front.ToolDouble = SquaringTools.Blade.H1 or SquaringTools.Blade.H7
Front.sSide = 'Front+Back'
elseif sSquaringTool == 'Diskmill' then
Left.Tool = SquaringTools.Diskmill.H1 or SquaringTools.Diskmill.H7
Back.Tool = SquaringTools.Diskmill.H1 or SquaringTools.Diskmill.H7
Right.Tool = SquaringTools.Blade.H2
Front.Tool = SquaringTools.Diskmill.H1 or SquaringTools.Diskmill.H7
elseif sSquaringTool == 'Blade' then
Left.Tool = SquaringTools.Blade.H2
Back.Tool = SquaringTools.Blade.H2
Right.Tool = SquaringTools.Blade.H2
Front.Tool = SquaringTools.Blade.H2
elseif sSquaringTool == 'DoubleMill' then
Left.Tool = SquaringTools.Mill.H1
Right.Tool = SquaringTools.Mill.H1
Front.Tool = SquaringTools.Mill.H1
Front.ToolDouble = SquaringTools.Mill.H7
Front.sSide = 'Front+Back'
elseif sSquaringTool == 'Mill' then
Left.Tool = SquaringTools.Mill.H1 or SquaringTools.Mill.H7
Back.Tool = SquaringTools.Mill.H1 or SquaringTools.Mill.H7
Right.Tool = SquaringTools.Mill.H1 or SquaringTools.Mill.H7
Front.Tool = SquaringTools.Mill.H1 or SquaringTools.Mill.H7
end
-- l'ordinamento delle linee dipende dal verso di percorrenza e, se attivato, dal riferimento utilizzato
-- con doppio l'ordine cambia
-- lato lungo lavorato in doppio
if not Back.Tool then
for i = 1, 3 do
SquaringParameters[i] = {}
end
if Front.Tool.bIsPathCw then
if bSquaringStartsOnReference and ( sOrigCorner == 'BL' or sOrigCorner == 'BM') then
SquaringParameters[1] = Front
SquaringParameters[2] = Left
SquaringParameters[3] = Right
elseif bSquaringStartsOnReference and ( sOrigCorner == 'TR' or sOrigCorner == 'TN') then
SquaringParameters[1] = Right
SquaringParameters[2] = Front
SquaringParameters[3] = Left
elseif bSquaringStartsOnReference and ( sOrigCorner == 'BR' or sOrigCorner == 'BN') then
SquaringParameters[1] = Right
SquaringParameters[2] = Front
SquaringParameters[3] = Left
elseif bSquaringStartsOnReference and ( sOrigCorner == 'TL' or sOrigCorner == 'TM') then
SquaringParameters[1] = Left
SquaringParameters[2] = Front
SquaringParameters[3] = Right
else
SquaringParameters[1] = Right
SquaringParameters[2] = Front
SquaringParameters[3] = Left
end
else
if bSquaringStartsOnReference and ( sOrigCorner == 'BL' or sOrigCorner == 'BM') then
SquaringParameters[1] = Left
SquaringParameters[2] = Front
SquaringParameters[3] = Right
elseif bSquaringStartsOnReference and ( sOrigCorner == 'TR' or sOrigCorner == 'TN') then
SquaringParameters[1] = Front
SquaringParameters[2] = Right
SquaringParameters[3] = Left
elseif bSquaringStartsOnReference and ( sOrigCorner == 'BR' or sOrigCorner == 'BN') then
SquaringParameters[1] = Front
SquaringParameters[2] = Right
SquaringParameters[3] = Left
elseif bSquaringStartsOnReference and ( sOrigCorner == 'TL' or sOrigCorner == 'TM') then
SquaringParameters[1] = Left
SquaringParameters[2] = Front
SquaringParameters[3] = Right
else
SquaringParameters[1] = Left
SquaringParameters[2] = Front
SquaringParameters[3] = Right
end
end
-- doppio non attivo
else
for i = 1, 4 do
SquaringParameters[i] = {}
end
if Front.Tool.bIsPathCw then
if bSquaringStartsOnReference and ( sOrigCorner == 'BL' or sOrigCorner == 'BM') then
SquaringParameters[1] = Front
SquaringParameters[2] = Left
SquaringParameters[3] = Back
SquaringParameters[4] = Right
elseif bSquaringStartsOnReference and ( sOrigCorner == 'TR' or sOrigCorner == 'TN') then
SquaringParameters[1] = Back
SquaringParameters[2] = Right
SquaringParameters[3] = Front
SquaringParameters[4] = Left
elseif bSquaringStartsOnReference and ( sOrigCorner == 'BR' or sOrigCorner == 'BN') then
SquaringParameters[1] = Right
SquaringParameters[2] = Front
SquaringParameters[3] = Left
SquaringParameters[4] = Back
else
SquaringParameters[1] = Left
SquaringParameters[2] = Back
SquaringParameters[3] = Right
SquaringParameters[4] = Front
end
else
if bSquaringStartsOnReference and ( sOrigCorner == 'TL' or sOrigCorner == 'TM') then
SquaringParameters[1] = Back
SquaringParameters[2] = Left
SquaringParameters[3] = Front
SquaringParameters[4] = Right
elseif bSquaringStartsOnReference and ( sOrigCorner == 'TR' or sOrigCorner == 'TN') then
SquaringParameters[1] = Right
SquaringParameters[2] = Back
SquaringParameters[3] = Left
SquaringParameters[4] = Front
elseif bSquaringStartsOnReference and ( sOrigCorner == 'BR' or sOrigCorner == 'BN') then
SquaringParameters[1] = Front
SquaringParameters[2] = Right
SquaringParameters[3] = Back
SquaringParameters[4] = Left
else
SquaringParameters[1] = Left
SquaringParameters[2] = Front
SquaringParameters[3] = Right
SquaringParameters[4] = Back
end
end
end
return SquaringParameters, b3Squaring
end
-------------------------------------------------------------------------------------------------------------
function Squaring.AddMachinings( SquaringParameters, b3Squaring, nFirstOperationId)
local nNotOkCount = 0
local sMsgTotal = ''
local dSquaringHeight = b3Squaring:getDimZ()
local dExtendPath = 0
local dMaxOvermaterial = 0
if type( WD.SQUARING_MAX_OVERMATERIAL) == "number" then
dMaxOvermaterial = WD.SQUARING_MAX_OVERMATERIAL
end
local bUseZigZagStep = ( type( WD.SQUARING_USE_ZIGZAG) == "boolean") and ( WD.SQUARING_USE_ZIGZAG == true)
for i = 1, #SquaringParameters do
local dToolRadius = SquaringParameters[i].Tool.dDiameter / 2
local vtExtr = EgtCurveExtrusion( SquaringParameters[i].nId, GDB_RT.GLOB)
local bIsVerticalMilling = false
if AreSameVectorApprox( vtExtr, Z_AX()) then
bIsVerticalMilling = true
end
-- calcolo step laterale
local MachiningSteps = { nCount = 1, dStep = 0}
if not bIsVerticalMilling then
MachiningSteps = WM.GetMachiningSteps( dSquaringHeight, SquaringParameters[i].Tool.dSideStep)
end
for j = 1, MachiningSteps.nCount do
local nOperationId = EgtCreateMachining( 'SQUARING_' .. SquaringParameters[i].sSide, MCH_OY.MILLING, SquaringParameters[i].Tool.sName)
-- geometria
EgtSetMachiningGeometry( SquaringParameters[i].nId)
-- profondità di lavoro
EgtSetMachiningParam( MCH_MP.DEPTH_STR, 0)
-- workside e inversione
if SquaringParameters[i].Tool.bIsPathCw then
if SquaringParameters[i].Tool.nType == MCH_TY.MILL_STD then
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
else
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT)
end
EgtSetMachiningParam( MCH_MP.INVERT, true)
else
if SquaringParameters[i].Tool.nType == MCH_TY.MILL_STD then
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT)
else
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
end
EgtSetMachiningParam( MCH_MP.INVERT, false)
end
-- distanza di sicurezza
if bIsVerticalMilling then
EgtSetMachiningParam( MCH_MP.STARTPOS, WD.CUT_SIC + dSquaringHeight)
else
EgtSetMachiningParam( MCH_MP.STARTPOS, WD.CUT_SIC)
end
-- overlap
EgtSetMachiningParam( MCH_MP.OVERL, 0)
-- tipo di step
if bIsVerticalMilling and bUseZigZagStep then
EgtSetMachiningParam( MCH_MP.STEPTYPE, MCH_MILL_ST.ZIGZAG)
else
EgtSetMachiningParam( MCH_MP.STEPTYPE, MCH_MILL_ST.ONEWAY)
end
-- step
if bIsVerticalMilling then
EgtSetMachiningParam( MCH_MP.STEP, SquaringParameters[i].Tool.dStep)
else
EgtSetMachiningParam( MCH_MP.STEP, 0)
end
-- offset radiale
local dRadialOffset = 0
if not bIsVerticalMilling then
dRadialOffset = ( MachiningSteps.nCount - j) * MachiningSteps.dStep
end
EgtSetMachiningParam( MCH_MP.OFFSR, dRadialOffset)
-- offset longitudinale
EgtSetMachiningParam( MCH_MP.OFFSL, 0)
-- inversione utensile
EgtSetMachiningParam( MCH_MP.TOOLINVERT, false)
-- faceuse
EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.NONE)
-- angoli suggeriti
EgtSetMachiningParam( MCH_MP.INITANGS, '')
-- asse bloccato
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, '')
-- SCC
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.NONE)
-- calcolo estensione percorso
if bIsVerticalMilling then
-- per utensili che lavorano di fianco, si deve partire fuori dall'altezza del grezzo
dExtendPath = dMaxOvermaterial + dToolRadius + WD.COLL_SIC
else
-- si calcola l'impronta utensile per uscire quanto basta a garantire il maxOvermaterial, con una distanza di sicurezza
dExtendPath = dMaxOvermaterial + WD.COLL_SIC + dToolRadius - ( dToolRadius - sqrt( dToolRadius * dToolRadius - ( ( dToolRadius - dSquaringHeight) * ( dToolRadius - dSquaringHeight))))
end
-- approccio
EgtSetMachiningParam( MCH_MP.LEADINTYPE, MCH_MILL_LI.LINEAR)
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dExtendPath)
EgtSetMachiningParam( MCH_MP.LITANG, 0)
if bIsVerticalMilling then
EgtSetMachiningParam( MCH_MP.LIPERP, 0)
else
-- per utensili che lavorano di fianco, si deve partire fuori dall'altezza del grezzo
EgtSetMachiningParam( MCH_MP.LIPERP, WD.CUT_SIC + dSquaringHeight)
end
EgtSetMachiningParam( MCH_MP.LIELEV, 0)
EgtSetMachiningParam( MCH_MP.LICOMPLEN, 0)
-- retrazione
EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, MCH_MILL_LO.LINEAR)
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dExtendPath)
EgtSetMachiningParam( MCH_MP.LOTANG, 0)
if bIsVerticalMilling then
EgtSetMachiningParam( MCH_MP.LOPERP, 0)
else
-- per utensili che lavorano di fianco, si deve partire fuori dall'altezza del grezzo
EgtSetMachiningParam( MCH_MP.LOPERP, WD.CUT_SIC + dSquaringHeight)
end
EgtSetMachiningParam( MCH_MP.LOELEV, 0)
EgtSetMachiningParam( MCH_MP.LOCOMPLEN, 0)
-- note utente
local sUserNotes = ''
sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES)
if SquaringParameters[i].ToolDouble then
local dYMirrorAx
local b3Tab = EgtGetTableArea()
dYMirrorAx = b3Squaring:getCenter():getY() - b3Tab:getMin():getY()
sUserNotes = EgtSetValInNotes( sUserNotes, 'DOUBLE', 2)
sUserNotes = EgtSetValInNotes( sUserNotes, 'MirrorAx', dYMirrorAx)
sUserNotes = EgtSetValInNotes( sUserNotes, 'TOOLDOUBLE', SquaringParameters[i].ToolDouble.sName)
end
if not bIsVerticalMilling then
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', 0)
end
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
local bOk = EgtApplyMachining( true, false)
EgtRelocateGlob( nOperationId, nFirstOperationId, GDB_IN.BEFORE)
if not bOk then
local _, sMsg = EgtGetLastMachMgrError()
nNotOkCount = nNotOkCount + 1
sMsgTotal = sMsgTotal ..'\n' .. ( sMsg or '')
end
end
end
return ( nNotOkCount < 1), sMsgTotal
end
-------------------------------------------------------------------------------------------------------------
function Squaring.AddScrapRemoval( nFirstOperationId)
-- pulizia sfridi alla prima lavorazione dopo la squadratura
EgtSetCurrMachining( nFirstOperationId)
local sMachiningNotes = EgtGetMachiningParam( MCH_MP.USERNOTES)
sMachiningNotes = sMachiningNotes .. 'ScrapRemove=1;'
EgtSetMachiningParam( MCH_MP.USERNOTES, sMachiningNotes)
end
-------------------------------------------------------------------------------------------------------------
return Squaring
+12
View File
@@ -266,5 +266,17 @@ function WMachiningLib.IsMachiningOkForDouble( sMachining)
return bDoubleOk
end
-------------------------------------------------------------------------------------------------------------
function WMachiningLib.GetMachiningSteps( dMachiningDepth, dStep)
local MachiningSteps = {}
MachiningSteps.dStep = 0
MachiningSteps.nCount = ceil( ( dMachiningDepth - 10 * GEO.EPS_SMALL) / dStep)
if MachiningSteps.nCount > 1 then
MachiningSteps.dStep = ( dMachiningDepth - dStep) / ( MachiningSteps.nCount - 1)
end
return MachiningSteps
end
-------------------------------------------------------------------------------------------------------------
return WMachiningLib
+31 -12
View File
@@ -175,6 +175,22 @@ local function IsPointOnRawLongEdges( ptCen, b3Raw)
return ( abs( ptCen:getY() - b3Raw:getMin():getY()) < 0.1 or abs( ptCen:getY() - b3Raw:getMax():getY()) < 0.1)
end
---------------------------------------------------------------------
local function IsFaceOutsideSquaring( Proc, Face, b3Squaring)
-- faccia esterna al box di squadratura
if b3Squaring then
local b3SquaringReduced = BBox3d( b3Squaring)
b3SquaringReduced:expand( -0.1)
local b3Face = EgtSurfTmGetFacetBBoxGlob( Proc.Id, Face.Fac, GDB_BB.STANDARD)
if not OverlapsXY( b3SquaringReduced, b3Face) then
EgtOutLog( 'Proc ' .. Proc.Id .. ': skipped face ' .. Face.Fac .. ' outside squaring' )
return true
end
else
return false
end
end
---------------------------------------------------------------------
local function GetOtherRegions( nPartId)
local vOthers = {}
@@ -388,9 +404,12 @@ local function GetFacesData( Proc, bOpposite, bCalclForBlade, dToolDiam, dToolMa
dLen = dLen - EgtIf( bCalclForBlade, dWhisk, 0)
nType = nType + 2
end
-- se lunghezza non significativa, non va inserito il taglio
if dLen < MIN_LEN_CUT then
nType = 4
-- se feature taglio esteremità o longitudinale ed è 1 faccia, non controllo lunghezza minima. Si controlla solo interferenza altri pezzi
if not( Proc.Prc == 10 and Proc.Fct == 1) then
-- se lunghezza non significativa, non va inserito il taglio
if dLen < MIN_LEN_CUT then
nType = 4
end
end
-- numero dei lati
local nEdges = #(EgtSurfTmFacetAdjacencies( nNewProc, i - 1)[1])
@@ -1705,13 +1724,13 @@ local function AddSawings( sSawing, vFace, Proc, nRawId, b3Raw)
end
---------------------------------------------------------------------
local function AddCuts( sCutting, vFace, Proc, nRawId, b3Raw, dSawThick)
local function AddCuts( sCutting, vFace, Proc, nRawId, b3Raw, dSawThick, b3Squaring)
-- verifico se ciclo chiuso
local bClosed = ( abs( vFace[1].PrevAng) > 0.1)
-- ciclo di inserimento dei tagli sulle facce del contorno in esame
for i = 1, #vFace do
-- verifico se faccia da saltare, perchè macchina travi e faccia su bordo longitudinale esterno già finito
local bToSkip = ( WD.BEAM_MACHINE and IsPointOnRawLongEdges( vFace[i].Cen, b3Raw))
-- verifico se faccia da saltare, perchè macchina travi e faccia su bordo longitudinale esterno già finito oppure se faccia fuori dal box di squadratura
local bToSkip = ( WD.BEAM_MACHINE and IsPointOnRawLongEdges( vFace[i].Cen, b3Raw)) or IsFaceOutsideSquaring( Proc, vFace[i], b3Squaring)
-- se non è faccia da saltare, inserisco il taglio di lama
if not bToSkip and vFace[i].Type ~= 4 then
-- indice del successivo
@@ -1841,7 +1860,7 @@ local function AddCuts( sCutting, vFace, Proc, nRawId, b3Raw, dSawThick)
end
---------------------------------------------------------------------
local function MakeByCut( Proc, nRawId, b3Raw)
local function MakeByCut( Proc, nRawId, b3Raw, b3Squaring)
local sWarn = ''
-- ingombro del pezzo
local Ls = EgtGetFirstNameInGroup( Proc.PartId, 'Box')
@@ -1887,9 +1906,9 @@ local function MakeByCut( Proc, nRawId, b3Raw)
-- gruppo ausiliario
local nAddGrpId = WL.GetAddGroup( Proc.PartId)
-- recupero i dati di tutte le facce
local vFace, dMaxWidth, nNewProc = GetFacesData( Proc, bOpposite, true, dSawDiam, dSawMaxDepth, dSawThick, nAddGrpId, b3Raw, nil)
local vFace, dMaxWidth, nNewProc = GetFacesData( Proc, bOpposite, true, dSawDiam, dSawMaxDepth, dSawThick, nAddGrpId, b3Raw)
-- inserimento dei tagli di lama
local bCtOk, sCtErr = AddCuts( sCutting, vFace, Proc, nRawId, b3Raw, dSawThick)
local bCtOk, sCtErr = AddCuts( sCutting, vFace, Proc, nRawId, b3Raw, dSawThick, b3Squaring)
if not bCtOk then return bCtOk, sCtErr end
-- se richiesta solo lama, esco
local nCntType = EgtGetInfo( Proc.Id, 'CNT_TYPE', 'i') or 0
@@ -2426,7 +2445,7 @@ local function MakeByPocket( Proc, nRawId, b3Raw)
EgtErase( nAddedBottomSurface)
end
if not nFacet then
return MakeByMill( Proc, nRawId, b3Raw)
return MakeByMill( Proc, nRawId, b3Raw, b3Squaring)
end
-- se ho creato la faccia di fondo utilizzo quella
local nSurfId = nProcTmWithAddedBottomSurfaceId or Proc.Id
@@ -2573,7 +2592,7 @@ end
---------------------------------------------------------------------
-- Applicazione della lavorazione
function WPF.Make( Proc, nRawId, b3Raw, vNLO)
function WPF.Make( Proc, nRawId, b3Raw, vNLO, b3Squaring)
-- recupero la tipologia (contorno o tasca)
local bPocket = ( EgtGetInfo( Proc.Id, 'PCKT', 'i') == 1)
-- se svuotatura
@@ -2596,7 +2615,7 @@ function WPF.Make( Proc, nRawId, b3Raw, vNLO)
return MakeByNail( Proc, nRawId, b3Raw, vNLO)
-- altrimenti, taglio con lama e pulizia angoli con fresa
else
return MakeByCut( Proc, nRawId, b3Raw)
return MakeByCut( Proc, nRawId, b3Raw, b3Squaring)
end
end
end
+119 -6
View File
@@ -45,6 +45,7 @@ _G.package.loaded.WProcessVariant = nil
local WM = require( 'WMachiningLib')
local WL = require( 'WallLib')
local Topology = require( 'WFeatureTopology')
local Squaring = require( 'Squaring')
local Cut = require( 'WProcessCut')
local DoubleCut = require( 'WProcessDoubleCut')
local SawCut = require( 'WProcessSawCut')
@@ -57,7 +58,6 @@ local Text = require( 'WProcessText')
local FreeContour = require( 'WProcessFreeContour')
local Variant = require( 'WProcessVariant')
-------------------------------------------------------------------------------------------------------------
-- *** Inserimento delle pareti nel pannello ***
-------------------------------------------------------------------------------------------------------------
@@ -132,6 +132,7 @@ function WallExec.ProcessWalls( dRawL, dRawW, dRawH, vWall, bMachGroupOk, bNewPr
nRaw = EgtAddRawPart( Point3d( 0, 0, 0), dRawL, dRawW, dRawH, WD.RAWCOL)
end
EgtMoveToCornerRawPart( nRaw, OrigOnTab, nCorner)
EgtSetInfo( nRaw, 'ORIGCORNER', sOrigCorner)
EgtSetInfo( nRaw, 'ORD', 1)
-- Inserimento dei pezzi nel grezzo
for i = 1, #vWall do
@@ -177,7 +178,7 @@ end
-------------------------------------------------------------------------------------------------------------
-- *** Inserimento delle lavorazioni nelle pareti ***
-------------------------------------------------------------------------------------------------------------
function WallExec.CollectFeatures( PartId, b3Raw)
function WallExec.CollectFeatures( PartId, b3Raw, b3Squaring)
-- recupero le feature
local vProc = {}
local LayerId = {}
@@ -226,6 +227,14 @@ function WallExec.CollectFeatures( PartId, b3Raw)
end
if Proc.Box and not Proc.Box:isEmpty() then
table.insert( vProc, Proc)
-- se squadratura sui pezzi, si annullano le lavorazioni esterne al box di squadratura
if b3Squaring then
local b3SquaringReduced = BBox3d( b3Squaring)
b3SquaringReduced:expand( -0.1)
if not OverlapsXY( Proc.Box, b3SquaringReduced) then
Proc.Flag = 0
end
end
-- se foro
if Drill.Identify( Proc) then
-- assegno diametro e facce di ingresso e uscita (dati tabelle sempre per riferimento)
@@ -351,7 +360,7 @@ local function PrintFeatures( vProc)
end
-------------------------------------------------------------------------------------------------------------
local function AddFeatureMachining( Proc, nRawId, b3Raw, vNLO)
local function AddFeatureMachining( Proc, nRawId, b3Raw, vNLO, b3Squaring)
local bOk = true
local sErr = ''
EgtOutLog( ' * Process ' .. tostring( Proc.Id) .. ' *', 1)
@@ -394,7 +403,7 @@ local function AddFeatureMachining( Proc, nRawId, b3Raw, vNLO)
-- se contorno libero, outline o apertura ( 0/3/4-250/251/252-X)
elseif FreeContour.Identify( Proc) then
-- esecuzione contorno libero
bOk, sErr = FreeContour.Make( Proc, nRawId, b3Raw, vNLO)
bOk, sErr = FreeContour.Make( Proc, nRawId, b3Raw, vNLO, b3Squaring)
-- se feature custom (Variant)
elseif Variant.Identify( Proc) then
-- esecuzione
@@ -1077,6 +1086,52 @@ local function SetMirroredOperations()
end
end
-------------------------------------------------------------------------------------------------------------
local function CalculateSquaring( sSquaringTool, RawPart, vPart)
local dRawPartHeight = RawPart.b3:getDimZ()
local bOk
local sMsg = ''
local SquaringTools = {}
local SquaringParameters = {}
local b3Squaring
SquaringTools = Squaring.GetTools()
bOk = Squaring.AreToolsOk( sSquaringTool, SquaringTools, dRawPartHeight)
if not bOk then
sMsg = 'Squaring failed: cannot find matching tools'
return false, {}, nil, sMsg
end
SquaringParameters, b3Squaring = Squaring.CalculateParameters( sSquaringTool, SquaringTools, RawPart, vPart)
if not SquaringParameters or next( SquaringParameters) == nil then
sMsg = 'Squaring failed: cannot calculate parameters'
return false, {}, nil, sMsg
end
return true, SquaringParameters, b3Squaring, sMsg
end
-------------------------------------------------------------------------------------------------------------
local function AddSquaring( SquaringParameters, b3Squaring)
local nFirstOperationId = EgtGetNextOperation( EgtGetPhaseDisposition( 1))
local bOk
local sMsg = ''
local OperationsId = {}
bOk, sMsg, OperationsId = Squaring.AddMachinings( SquaringParameters, b3Squaring, nFirstOperationId)
if not bOk then
for i = 1, #OperationsId do
EgtRemoveOperation( i)
end
sMsg = 'Squaring failed: cannot apply machinings'
return false, sMsg
end
Squaring.AddScrapRemoval( nFirstOperationId)
return true, sMsg
end
-------------------------------------------------------------------------------------------------------------
function WallExec.ProcessFeatures()
-- errori e stato
@@ -1094,11 +1149,57 @@ function WallExec.ProcessFeatures()
table.insert( vPart, {Id=nPartId, Box=b3Solid})
nPartId = EgtGetNextPartInRawPart( nPartId)
end
-- calcolo i parametri della squadratura, se richiesta
local SquaringParameters = {}
local b3Squaring
if WD.SQUARING_TYPE and WD.SQUARING_TYPE > 0 then
local RawPart = { nId = nRawId, b3 = b3Raw}
local bOk, sMsg
if type( WD.SQUARING_TOOL) ~= "number" then
WD.SQUARING_TOOL = 0
end
if WD.SQUARING_TOOL == 0 or WD.SQUARING_TOOL == 1 then
bOk, SquaringParameters, b3Squaring, sMsg = CalculateSquaring( 'DoubleDiskmill', RawPart, vPart)
end
if not bOk and ( WD.SQUARING_TOOL == 0 or WD.SQUARING_TOOL == 2) then
-- attualmente non gestito, va modificata la configurazione macchina e non si sa se sia gestito in macchina (PLC)
bOk = false
sMsg = 'Squaring not possible : double blade + diskmill not supported'
--SquaringParameters, b3Squaring, sMsg = CalculateSquaring( 'DoubleDiskmillAndBlade', RawPart)
end
if not bOk and ( WD.SQUARING_TOOL == 0 or WD.SQUARING_TOOL == 3) then
bOk, SquaringParameters, b3Squaring, sMsg = CalculateSquaring( 'DoubleBlade', RawPart, vPart)
end
if not bOk and ( WD.SQUARING_TOOL == 0 or WD.SQUARING_TOOL == 4) then
bOk, SquaringParameters, b3Squaring, sMsg = CalculateSquaring( 'Diskmill', RawPart, vPart)
end
if not bOk and ( WD.SQUARING_TOOL == 0 or WD.SQUARING_TOOL == 5) then
bOk, SquaringParameters, b3Squaring, sMsg = CalculateSquaring( 'Blade', RawPart, vPart)
end
if not bOk and ( WD.SQUARING_TOOL == 0 or WD.SQUARING_TOOL == 6) then
bOk, SquaringParameters, b3Squaring, sMsg = CalculateSquaring( 'DoubleMill', RawPart, vPart)
end
if not bOk and ( WD.SQUARING_TOOL == 0 or WD.SQUARING_TOOL == 7) then
bOk, SquaringParameters, b3Squaring, sMsg = CalculateSquaring( 'Mill', RawPart, vPart)
end
if not bOk then
nTotErr = nTotErr + 1
table.insert( Stats, {Err=1, Msg=sMsg, Rot=0, CutId=0, TaskId=0})
elseif sMsg and #sMsg > 0 then
table.insert( Stats, {Err=-1, Msg=sMsg, Rot=0, CutId=0, TaskId=0})
else
table.insert( Stats, {Err=0, Msg='', Rot=0, CutId=0, TaskId=0})
end
end
-- raccolgo l'elenco delle feature da lavorare, ciclando sui pezzi
local vProc = {}
for i = 1, #vPart do
-- recupero le feature di lavorazione della parete
local vPartProc = WallExec.CollectFeatures( vPart[i].Id, b3Raw)
local vPartProc = WallExec.CollectFeatures( vPart[i].Id, b3Raw, b3Squaring)
vProc = EgtJoinTables( vProc, vPartProc)
end
-- classifico topologicamente le feature
@@ -1125,7 +1226,7 @@ function WallExec.ProcessFeatures()
-- creo la lavorazione
local Proc = vProc[i]
if Proc.Flg ~= 0 then
local bOk, sMsg = AddFeatureMachining( Proc, nRawId, b3Raw, vNLO)
local bOk, sMsg = AddFeatureMachining( Proc, nRawId, b3Raw, vNLO, b3Squaring)
if not bOk then
nTotErr = nTotErr + 1
table.insert( Stats, {Err=1, Msg=sMsg, Rot=0, CutId=Proc.CutId, TaskId=Proc.TaskId})
@@ -1225,7 +1326,19 @@ function WallExec.ProcessFeatures()
end
-- ordinamento standard
SortMachinings( nPhase, PrevMch)
-- squadratura, se richiesta
if SquaringParameters and next( SquaringParameters) ~= nil then
local bOk, sMsg = AddSquaring( SquaringParameters, b3Squaring)
if not bOk then
nTotErr = nTotErr + 1
table.insert( Stats, {Err=1, Msg=sMsg, Rot=0, CutId=0, TaskId=0})
elseif sMsg and #sMsg > 0 then
table.insert( Stats, {Err=-1, Msg=sMsg, Rot=0, CutId=0, TaskId=0})
else
table.insert( Stats, {Err=0, Msg='', Rot=0, CutId=0, TaskId=0})
end
end
-- Aggiornamento finale di tutto
if nGetPriorityFromBtl > 0 then
InsertScrapRemoval( nPhase)
+29 -30
View File
@@ -1629,7 +1629,7 @@ local function AddParts(RawParts, vPartsDoneManually)
if bOnEdge or bOnAngle then
local nBoxLayerId = EgtGetFirstNameInGroup( nPartId, "Box")
local nBoxId = EgtGetFirstNameInGroup( nBoxLayerId, "Box")
local b3Part = EgtGetBBoxGlob(nBoxId, GDB_BB.STANDARD)
local b3Part = EgtGetBBoxGlob(nBoxId, GDB_BB.STANDARD)
-- punto di riferimento sul pezzo
local ptRef
@@ -1807,40 +1807,39 @@ if bNestingOk then
end
end
-- aggiungo pezzi nestati a mano
nPartCount = 0
for nInd = 1, #vDoneManually do
if vDoneManually[nInd].SheetId == nId then
vDoneManually[nInd].Done = 1
for nInd2 = 1, #(vDoneManually[nInd].Parts) do
nPartCount = nPartCount + 1
local nPartDuploId = EgtDuploNew( vDoneManually[nInd].Parts[nInd2].Id)
-- aggiungo le curve corrispondenti alle aree di lavorazione del pezzo
local sToolOutlines = EgtGetInfo( vDoneManually[nInd].Parts[nInd2].Id, "ToolOutlines", 's')
if sToolOutlines then
-- recupero o creo il gruppo per gli outlines
local nToolOutlinesGrp = EgtGetFirstNameInGroup( nPartDuploId, "ToolOutlines")
if not nToolOutlinesGrp then
nToolOutlinesGrp = EgtGroup( nPartDuploId)
EgtSetName( nToolOutlinesGrp, "ToolOutlines")
EgtSetStatus( nToolOutlinesGrp, GDB_ST.ON)
end
for str in string.gmatch(sToolOutlines, "([^"..",".."]+)") do
EgtCopyGlob( tonumber(str), nToolOutlinesGrp)
-- aggiungo pezzi nestati a mano
nPartCount = 0
for nInd = 1, #vDoneManually do
if vDoneManually[nInd].SheetId == nId then
vDoneManually[nInd].Done = 1
for nInd2 = 1, #(vDoneManually[nInd].Parts) do
nPartCount = nPartCount + 1
local nPartDuploId = EgtDuploNew( vDoneManually[nInd].Parts[nInd2].Id)
-- aggiungo le curve corrispondenti alle aree di lavorazione del pezzo
local sToolOutlines = EgtGetInfo( vDoneManually[nInd].Parts[nInd2].Id, "ToolOutlines", 's')
if sToolOutlines then
-- recupero o creo il gruppo per gli outlines
local nToolOutlinesGrp = EgtGetFirstNameInGroup( nPartDuploId, "ToolOutlines")
if not nToolOutlinesGrp then
nToolOutlinesGrp = EgtGroup( nPartDuploId)
EgtSetName( nToolOutlinesGrp, "ToolOutlines")
EgtSetStatus( nToolOutlinesGrp, GDB_ST.ON)
end
for str in string.gmatch(sToolOutlines, "([^"..",".."]+)") do
EgtCopyGlob( tonumber(str), nToolOutlinesGrp)
end
end
-- applico flip, rotazione e traslazione pezzo e box da nesting
EgtSetInfo( nMachGroup, "PART" .. nPartCount, nPartDuploId .. "," .. EgtNumToString( vDoneManually[nInd].Parts[nInd2].posX, 3) .. "," .. EgtNumToString( vDoneManually[nInd].Parts[nInd2].posY, 3) .. "," .. 0 .."," .. 0)
EgtSetInfo( nPartDuploId, "POSX", vDoneManually[nInd].Parts[nInd2].posX)
EgtSetInfo( nPartDuploId, "POSY", vDoneManually[nInd].Parts[nInd2].posY)
end
-- applico flip, rotazione e traslazione pezzo e box da nesting
EgtSetInfo( nMachGroup, "PART" .. nPartCount, nPartDuploId .. "," .. EgtNumToString( vDoneManually[nInd].Parts[nInd2].posX, 3) .. "," .. EgtNumToString( vDoneManually[nInd].Parts[nInd2].posY, 3) .. "," .. 0 .."," .. 0)
EgtSetInfo( nPartDuploId, "POSX", vDoneManually[nInd].Parts[nInd2].posX)
EgtSetInfo( nPartDuploId, "POSY", vDoneManually[nInd].Parts[nInd2].posY)
end
end
end
end
-- altrimenti pezzo
else
+11
View File
@@ -1,5 +1,16 @@
==== Wall Update Log ====
Versione 2.6k2 (19/11/2024)
- Modif : in Nesting riportata allo stato precedente la tolleranza posizionamento pannelli sul bordo
Versione 2.6k1 (14/11/2024)
- Added : aggiunta squadratura master panel
- Modif : L010 si inseriscono con lama anche se il percorso è breve
- Fixed : in Nesting corretto errore in posizionamento pannelli che devono stare necessariamente sul bordo della tavola
Versione 2.6j2 (04/11/2024)
- Modif : Modificato limite dimensione tasca per utilizzo lama come SideGroove
Versione 2.6j1 (29/10/2024)
- Fixed : in Nesting e Flip/Rot corretto problema in rotazione pezzi che causava ribaltamenti non voluti nella copia grezzo
+2 -2
View File
@@ -2,5 +2,5 @@
-- Gestione della versione di Wall
NAME = 'Wall'
VERSION = '2.6j1'
MIN_EXE = '2.6h1'
VERSION = '2.6k2'
MIN_EXE = '2.6k1'