7 Commits

Author SHA1 Message Date
luca.mazzoleni 8da693817d - in BeamExec.GetFeatureInfoAndDependency correzione importante 2026-06-08 13:27:40 +02:00
luca.mazzoleni 19f35ccd61 - in BeamExec.ProcessBeams modifiche minori 2026-06-08 11:58:15 +02:00
luca.mazzoleni 0806e1bab8 Merge branch 'main' into ObliqueNesting 2026-06-08 11:17:04 +02:00
luca.mazzoleni 387eda8b4a - in BeamExec corretta ProcessBeams per i casi in cui dPosX non è definito 2026-06-08 11:16:50 +02:00
andrea.villa c7045499f4 Merge remote-tracking branch 'origin/develop' 2026-05-29 11:15:28 +02:00
andrea.villa 44478b91f0 Aggiornato log e versione 2026-05-29 11:15:09 +02:00
andrea.villa 1f4aa15af4 Aggiunto tipo fresa da cercare 2026-05-29 11:10:41 +02:00
6 changed files with 34 additions and 24 deletions
+1 -2
View File
@@ -390,8 +390,7 @@ if bToProcess then
end
end
-- Assegno lunghezza della barra
-- TODO nella ProcessBeams andava in errore con 10mm!!! CONTROLLARE
dBarLen = PARTS[1].b3PartOriginal:getDimX() + 20
dBarLen = PARTS[1].b3PartOriginal:getDimX() + 10
if dBarLen < 2200 then
dBarLen = dBarLen + 1800
end
+28 -17
View File
@@ -436,36 +436,47 @@ function BeamExec.ProcessBeams( dRawW, dRawH, dRawL, dOvmHead, dOvmMid, PARTS, b
local dPartWidth = CurrentPart.b3PartOriginal:getDimY( )
local dPartHeight = CurrentPart.b3PartOriginal:getDimZ( )
local dStartOffset = dNextStartOffset
local dEndOffset = dOvmMid
-- Se il pezzo corrente non ha coordinata, si calcola da OvmMid
if ( not CurrentPart.dPosX) then
if ( i == 1) then
CurrentPart.dPosX = dOvmHead
else
CurrentPart.dPosX = PARTS[i - 1].dPosX + PARTS[i - 1].b3PartOriginal:getDimX( ) + dOvmMid
end
end
-- LOGICA LOOK-AHEAD: Analisi del gap reale per la ripartizione specchiata
-- Se il pezzo SUCCESSIVO non ha coordinata, si calcola da OvmMid
if ( i < #PARTS and not PARTS[i + 1].dPosX) then
PARTS[i + 1].dPosX = CurrentPart.dPosX + dPartLen + dOvmMid
end
local dStartOffset = dNextStartOffset
local dEndOffset = ( i == #PARTS ) and 0 or dOvmMid
-- Gap reale tra i pezzi (può essere negativo in caso di compenetrazione nesting obliqui)
if ( i < #PARTS ) then
local dTotalGap = PARTS[i + 1].dPosX - CurrentPart.dPosX - dPartLen
if ( dTotalGap > dOvmMid ) then
dEndOffset = dOvmMid -- Max 5.4mm sulla coda (lato sinistro del grezzo)
dNextStartOffset = dTotalGap - dOvmMid -- Il residuo sulla testa del prossimo (lato destro)
dEndOffset = dOvmMid
dNextStartOffset = dTotalGap - dOvmMid
else
-- Gestione automatica sotto-soglia o compenetrazione geometrica (Nesting Obliquo)
-- Gap minore dello spessore lama (compenetrazione per nesting obliqui)
dEndOffset = dTotalGap
dNextStartOffset = 0
end
end
-- MATEMATICA CORRETTA PER X CAD INVERTITA:
-- Il grezzo idRaw si estende verso destra. Spostando il pezzo internamente di dEndOffset (dDelta),
-- lasciamo dEndOffset a sinistra (coda) e matematicamente dStartOffset a destra (testa).
local dCrawLen = dPartLen + dStartOffset + dEndOffset
local dCurrentRawLen = dPartLen + dStartOffset + dEndOffset
local dDelta = dEndOffset
local dStartPos = (CurrentPart.dPosX or 0) - dStartOffset
local dStartPos = CurrentPart.dPosX - dStartOffset
local bIsSectionOk = ( ( abs( dPartWidth - dRawW ) < 100 * GEO.EPS_SMALL and abs( dPartHeight - dRawH ) < 100 * GEO.EPS_SMALL ) or
( abs( dPartHeight - dRawW ) < 100 * GEO.EPS_SMALL and abs( dPartWidth - dRawH ) < 100 * GEO.EPS_SMALL ) )
if ( bIsSectionOk and ( dStartPos + dCrawLen <= dRawL + GEO.EPS_SMALL ) ) then
if ( bIsSectionOk and ( dStartPos + dCurrentRawLen <= dRawL + GEO.EPS_SMALL ) ) then
-- 5. Creazione e Posizionamento del Contenitore RawPart
CurrentPart.idRaw = EgtAddRawPart( Point3d( 0, 0, 0 ), dCrawLen, dRawW, dRawH, BeamData.RAWCOL )
CurrentPart.idRaw = EgtAddRawPart( Point3d( 0, 0, 0 ), dCurrentRawLen, dRawW, dRawH, BeamData.RAWCOL )
EgtMoveToCornerRawPart( CurrentPart.idRaw, BeamData.ptOriXR, BeamData.dPosXR )
EgtMoveRawPart( CurrentPart.idRaw, Vector3d( -dStartPos, 0, 0 ) )
@@ -530,7 +541,7 @@ function BeamExec.ProcessBeams( dRawW, dRawH, dRawL, dOvmHead, dOvmMid, PARTS, b
CurrentPart.CombinationList = BeamExec.GetAvailableCombinations( CurrentPart, bIsFlipRot )
-- Avanzamento calcolato sulla coordinata reale di fine RawPart (estremità sinistra sulla barra)
dMaxX = max( dMaxX, dStartPos + dCrawLen )
dMaxX = max( dMaxX, dStartPos + dCurrentRawLen )
CurrentPart.dRestLength = dRawL - dMaxX
idPrevRaw = CurrentPart.idRaw
else
@@ -849,7 +860,7 @@ local function GetFeatureInfoAndDependency( vProcSingleRot, Part)
ProcB.nFlg = 0
end
-- il secondo taglio è più verso il centro della trave
elseif Proc.b3Box:getMin():getX() >= ProcB.b3Box:getMin():getX() - 10 * GEO.EPS_SMALL then
else
HeadProc = ProcB
local idProcCopy = EgtCopyGlob( Proc.id, idTempGroup)
local idProcBCopy = EgtCopyGlob( ProcB.id, idTempGroup)
@@ -884,7 +895,7 @@ local function GetFeatureInfoAndDependency( vProcSingleRot, Part)
ProcB.nFlg = 0
end
-- il secondo taglio è più verso il centro della trave
elseif Proc.b3Box:getMax():getX() >= ProcB.b3Box:getMax():getX() - 10 * GEO.EPS_SMALL then
else
TailProc = ProcB
local idProcCopy = EgtCopyGlob( Proc.id, idTempGroup)
local idProcBCopy = EgtCopyGlob( ProcB.id, idTempGroup)
@@ -968,7 +979,7 @@ local function GetFeatureInfoAndDependency( vProcSingleRot, Part)
local PtSortedTail = BeamLib.GetSortedVertices( TailProc)
if PtSortedTail then
TailcutInfo.OffsetX = {}
for i = 1, #PtSortedHead do
for i = 1, #PtSortedTail do
table.insert( TailcutInfo.OffsetX, Part.b3Part:getMin():getX() - PtSortedTail[i]:getX())
end
end
+1
View File
@@ -87,6 +87,7 @@ local function GetTenonStrategy( Proc, Part)
ToolSearchParameters.dElevation = EgtSurfTmFacetElevationInBBox( Strategy.idTenonCutPlane, 0, Part.b3Part, true, GDB_ID.ROOT)
ToolSearchParameters.vtToolDirection = Proc.FeatureInfo.vtTenonN
ToolSearchParameters.sMillShape = 'STANDARD'
ToolSearchParameters.AvailableToolList = MachiningLib.GetAvailableToolList( Proc, Strategy.Parameters.sPocketingList, 'Pocketing')
Machining.Cutting.ToolInfo = MachiningLib.FindMill( Proc, ToolSearchParameters)
-1
View File
@@ -215,7 +215,6 @@ function STR0010.Make( bAddMachining, Proc, Part, CustomParameters)
end
-- se la lavorazione ostacola il pinzaggio, non posso farla, serve una lavorazioen che lasci il testimone
-- TODO Girando il pezzo trova sempre che limitano il pinzaggio se pezzo piccolo!! Il controllo non va bene. Da rifare
if MachiningLib.IsFeatureHinderingClamping( Proc, Part) then
local sErr = 'Feature '.. Proc.idFeature .. ' : strategy ' .. StrategyLib.Config.sStrategyId .. ' not applicable ( Feature hinders clamping)'
EgtOutLog( sErr)
+2 -2
View File
@@ -1,4 +1,4 @@
==== Beam Update Log ====
Versione 2.6-- (--/--/2024)
- Primo commit creazione nuovo automatismo BEAM con strategie
Versione 3.1e1 (29/05/2026)
- Primo commit nuovo automatismo a strategie
+2 -2
View File
@@ -2,5 +2,5 @@
-- Gestione della versione di Beam
NAME = 'Beam'
VERSION = '2.8a1'
MIN_EXE = '2.7j2'
VERSION = '3.1e1'
MIN_EXE = '3.1e1'