Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8da693817d | |||
| 19f35ccd61 | |||
| 0806e1bab8 | |||
| 387eda8b4a | |||
| c7045499f4 | |||
| 44478b91f0 | |||
| 1f4aa15af4 |
+27
-16
@@ -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 - 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
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
+2
-2
@@ -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
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user