Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| beedbc71f1 | |||
| 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 dPartWidth = CurrentPart.b3PartOriginal:getDimY( )
|
||||||
local dPartHeight = CurrentPart.b3PartOriginal:getDimZ( )
|
local dPartHeight = CurrentPart.b3PartOriginal:getDimZ( )
|
||||||
|
|
||||||
local dStartOffset = dNextStartOffset
|
-- Se il pezzo corrente non ha coordinata, si calcola da OvmMid
|
||||||
local dEndOffset = dOvmMid
|
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
|
if ( i < #PARTS ) then
|
||||||
local dTotalGap = PARTS[i + 1].dPosX - CurrentPart.dPosX - dPartLen
|
local dTotalGap = PARTS[i + 1].dPosX - CurrentPart.dPosX - dPartLen
|
||||||
if ( dTotalGap > dOvmMid ) then
|
if ( dTotalGap > dOvmMid ) then
|
||||||
dEndOffset = dOvmMid -- Max 5.4mm sulla coda (lato sinistro del grezzo)
|
dEndOffset = dOvmMid
|
||||||
dNextStartOffset = dTotalGap - dOvmMid -- Il residuo sulla testa del prossimo (lato destro)
|
dNextStartOffset = dTotalGap - dOvmMid
|
||||||
else
|
else
|
||||||
-- Gestione automatica sotto-soglia o compenetrazione geometrica (Nesting Obliquo)
|
-- Gap minore dello spessore lama (compenetrazione per nesting obliqui)
|
||||||
dEndOffset = dTotalGap
|
dEndOffset = dTotalGap
|
||||||
dNextStartOffset = 0
|
dNextStartOffset = 0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- MATEMATICA CORRETTA PER X CAD INVERTITA:
|
local dCurrentRawLen = dPartLen + dStartOffset + dEndOffset
|
||||||
-- 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 dDelta = dEndOffset
|
local dDelta = dEndOffset
|
||||||
local dStartPos = CurrentPart.dPosX - dStartOffset
|
local dStartPos = CurrentPart.dPosX - dStartOffset
|
||||||
|
|
||||||
local bIsSectionOk = ( ( abs( dPartWidth - dRawW ) < 100 * GEO.EPS_SMALL and abs( dPartHeight - dRawH ) < 100 * GEO.EPS_SMALL ) or
|
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 ) )
|
( 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
|
-- 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 )
|
EgtMoveToCornerRawPart( CurrentPart.idRaw, BeamData.ptOriXR, BeamData.dPosXR )
|
||||||
EgtMoveRawPart( CurrentPart.idRaw, Vector3d( -dStartPos, 0, 0 ) )
|
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 )
|
CurrentPart.CombinationList = BeamExec.GetAvailableCombinations( CurrentPart, bIsFlipRot )
|
||||||
|
|
||||||
-- Avanzamento calcolato sulla coordinata reale di fine RawPart (estremità sinistra sulla barra)
|
-- 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
|
CurrentPart.dRestLength = dRawL - dMaxX
|
||||||
idPrevRaw = CurrentPart.idRaw
|
idPrevRaw = CurrentPart.idRaw
|
||||||
else
|
else
|
||||||
@@ -849,7 +860,7 @@ local function GetFeatureInfoAndDependency( vProcSingleRot, Part)
|
|||||||
ProcB.nFlg = 0
|
ProcB.nFlg = 0
|
||||||
end
|
end
|
||||||
-- il secondo taglio è più verso il centro della trave
|
-- 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
|
HeadProc = ProcB
|
||||||
local idProcCopy = EgtCopyGlob( Proc.id, idTempGroup)
|
local idProcCopy = EgtCopyGlob( Proc.id, idTempGroup)
|
||||||
local idProcBCopy = EgtCopyGlob( ProcB.id, idTempGroup)
|
local idProcBCopy = EgtCopyGlob( ProcB.id, idTempGroup)
|
||||||
@@ -884,7 +895,7 @@ local function GetFeatureInfoAndDependency( vProcSingleRot, Part)
|
|||||||
ProcB.nFlg = 0
|
ProcB.nFlg = 0
|
||||||
end
|
end
|
||||||
-- il secondo taglio è più verso il centro della trave
|
-- 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
|
TailProc = ProcB
|
||||||
local idProcCopy = EgtCopyGlob( Proc.id, idTempGroup)
|
local idProcCopy = EgtCopyGlob( Proc.id, idTempGroup)
|
||||||
local idProcBCopy = EgtCopyGlob( ProcB.id, idTempGroup)
|
local idProcBCopy = EgtCopyGlob( ProcB.id, idTempGroup)
|
||||||
@@ -968,7 +979,7 @@ local function GetFeatureInfoAndDependency( vProcSingleRot, Part)
|
|||||||
local PtSortedTail = BeamLib.GetSortedVertices( TailProc)
|
local PtSortedTail = BeamLib.GetSortedVertices( TailProc)
|
||||||
if PtSortedTail then
|
if PtSortedTail then
|
||||||
TailcutInfo.OffsetX = {}
|
TailcutInfo.OffsetX = {}
|
||||||
for i = 1, #PtSortedHead do
|
for i = 1, #PtSortedTail do
|
||||||
table.insert( TailcutInfo.OffsetX, Part.b3Part:getMin():getX() - PtSortedTail[i]:getX())
|
table.insert( TailcutInfo.OffsetX, Part.b3Part:getMin():getX() - PtSortedTail[i]:getX())
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ local function GetTenonStrategy( Proc, Part)
|
|||||||
ToolSearchParameters.dElevation = EgtSurfTmFacetElevationInBBox( Strategy.idTenonCutPlane, 0, Part.b3Part, true, GDB_ID.ROOT)
|
ToolSearchParameters.dElevation = EgtSurfTmFacetElevationInBBox( Strategy.idTenonCutPlane, 0, Part.b3Part, true, GDB_ID.ROOT)
|
||||||
|
|
||||||
ToolSearchParameters.vtToolDirection = Proc.FeatureInfo.vtTenonN
|
ToolSearchParameters.vtToolDirection = Proc.FeatureInfo.vtTenonN
|
||||||
|
ToolSearchParameters.sMillShape = 'STANDARD'
|
||||||
ToolSearchParameters.AvailableToolList = MachiningLib.GetAvailableToolList( Proc, Strategy.Parameters.sPocketingList, 'Pocketing')
|
ToolSearchParameters.AvailableToolList = MachiningLib.GetAvailableToolList( Proc, Strategy.Parameters.sPocketingList, 'Pocketing')
|
||||||
Machining.Cutting.ToolInfo = MachiningLib.FindMill( Proc, ToolSearchParameters)
|
Machining.Cutting.ToolInfo = MachiningLib.FindMill( Proc, ToolSearchParameters)
|
||||||
|
|
||||||
|
|||||||
@@ -797,6 +797,10 @@ local function CalculateDiceMachinings( vCuts, Parameters)
|
|||||||
local bCannotSplitRestLength = Parameters.bCannotSplitRestLength
|
local bCannotSplitRestLength = Parameters.bCannotSplitRestLength
|
||||||
local bReduceDiceDepth = Parameters.bReduceDiceDepth
|
local bReduceDiceDepth = Parameters.bReduceDiceDepth
|
||||||
|
|
||||||
|
-- trimesh con RestLength
|
||||||
|
local b3CheckCollision = BeamLib.GetPartBoxWithHeadTail( Part, sRestLengthSideForPreSimulation)
|
||||||
|
local idCheckCollisionTm = EgtSurfTmBBox( Part.idTempGroup, b3CheckCollision, false, GDB_RT.GLOB)
|
||||||
|
|
||||||
-- eventuale inversione tagli ortogonali e aggiunta informazioni alla geometria
|
-- eventuale inversione tagli ortogonali e aggiunta informazioni alla geometria
|
||||||
local bAreOrthogonalCutsInverted = false
|
local bAreOrthogonalCutsInverted = false
|
||||||
for i = 1, #vCuts do
|
for i = 1, #vCuts do
|
||||||
@@ -877,6 +881,15 @@ local function CalculateDiceMachinings( vCuts, Parameters)
|
|||||||
bMoveAfterSplit = true
|
bMoveAfterSplit = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- aggiornamento grezzo dinamico
|
||||||
|
-- TODO
|
||||||
|
if ( i >= 3) and ( i % 2) > 0 then
|
||||||
|
local idMergedParallelCutsSurf = EgtSurfTmBySewing( nAddGrpId, vCuts[i], false)
|
||||||
|
idCheckCollisionTm = nil
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
else
|
else
|
||||||
EgtErase( nSurfToCut)
|
EgtErase( nSurfToCut)
|
||||||
bIsDicingOk = false
|
bIsDicingOk = false
|
||||||
@@ -936,6 +949,15 @@ local function CalculateDiceMachinings( vCuts, Parameters)
|
|||||||
if Cutting.sStage == 'AfterTail' then
|
if Cutting.sStage == 'AfterTail' then
|
||||||
bMoveAfterSplit = true
|
bMoveAfterSplit = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- aggiornamento grezzo dinamico
|
||||||
|
-- TODO
|
||||||
|
if ( i >= 3) and ( i % 2) > 0 then
|
||||||
|
local nAddGrpId = BeamLib.GetAddGroup( Part.id)
|
||||||
|
local idMergedParallelCutsSurf = EgtSurfTmBySewing( nAddGrpId, vCuts[i], false)
|
||||||
|
idCheckCollisionTm = nil
|
||||||
|
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
==== Beam Update Log ====
|
==== Beam Update Log ====
|
||||||
|
|
||||||
Versione 2.6-- (--/--/2024)
|
Versione 3.1e1 (29/05/2026)
|
||||||
- Primo commit creazione nuovo automatismo BEAM con strategie
|
- Primo commit nuovo automatismo a strategie
|
||||||
+2
-2
@@ -2,5 +2,5 @@
|
|||||||
-- Gestione della versione di Beam
|
-- Gestione della versione di Beam
|
||||||
|
|
||||||
NAME = 'Beam'
|
NAME = 'Beam'
|
||||||
VERSION = '2.8a1'
|
VERSION = '3.1e1'
|
||||||
MIN_EXE = '2.7j2'
|
MIN_EXE = '3.1e1'
|
||||||
|
|||||||
Reference in New Issue
Block a user