Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fb3a5ec0be | |||
| e3e7537f8f | |||
| eec6b50985 | |||
| b5cb706ad5 | |||
| 053755e583 | |||
| c7045499f4 | |||
| 44478b91f0 | |||
| 1f4aa15af4 |
@@ -388,6 +388,15 @@ if bToProcess then
|
|||||||
else
|
else
|
||||||
PARTS[i].b3PartOriginal = b3Solid
|
PARTS[i].b3PartOriginal = b3Solid
|
||||||
end
|
end
|
||||||
|
if BeamData.MAX_LENGTH and BeamData.MAX_LENGTH > 10 and b3Solid:getDimX() > BeamData.MAX_LENGTH then
|
||||||
|
local sOut = 'Piece-Length (' .. EgtNumToString( b3Solid:getDimX(), 2) .. ') ' ..
|
||||||
|
'out of machine limits (' .. EgtNumToString( BeamData.MAX_LENGTH, 2) .. ') '
|
||||||
|
BEAM.ERR = 17
|
||||||
|
BEAM.MSG = sOut
|
||||||
|
WriteErrToLogFile( BEAM.ERR, BEAM.MSG)
|
||||||
|
PostErrView( BEAM.ERR, BEAM.MSG)
|
||||||
|
return
|
||||||
|
end
|
||||||
end
|
end
|
||||||
-- Assegno lunghezza della barra
|
-- Assegno lunghezza della barra
|
||||||
dBarLen = PARTS[1].b3PartOriginal:getDimX() + 10
|
dBarLen = PARTS[1].b3PartOriginal:getDimX() + 10
|
||||||
@@ -447,6 +456,15 @@ if bToProcess then
|
|||||||
else
|
else
|
||||||
PARTS[i].b3PartOriginal = b3Solid
|
PARTS[i].b3PartOriginal = b3Solid
|
||||||
end
|
end
|
||||||
|
if BeamData.MAX_LENGTH and BeamData.MAX_LENGTH > 10 and b3Solid:getDimX() > BeamData.MAX_LENGTH then
|
||||||
|
local sOut = 'Piece-Length (' .. EgtNumToString( b3Solid:getDimX(), 2) .. ') ' ..
|
||||||
|
'out of machine limits (' .. EgtNumToString( BeamData.MAX_LENGTH, 2) .. ') '
|
||||||
|
BEAM.ERR = 17
|
||||||
|
BEAM.MSG = sOut
|
||||||
|
WriteErrToLogFile( BEAM.ERR, BEAM.MSG)
|
||||||
|
PostErrView( BEAM.ERR, BEAM.MSG)
|
||||||
|
return
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -131,6 +131,14 @@ local function MyProcessInputData()
|
|||||||
else
|
else
|
||||||
PARTS[i].b3PartOriginal = b3Solid
|
PARTS[i].b3PartOriginal = b3Solid
|
||||||
end
|
end
|
||||||
|
if BeamData.MAX_LENGTH and BeamData.MAX_LENGTH > 10 and b3Solid:getDimX() > BeamData.MAX_LENGTH then
|
||||||
|
local sOut = 'Lunghezza (' .. EgtNumToString( b3Solid:getDimX(), 2) .. ') ' ..
|
||||||
|
'oltre i limiti della macchina (' .. EgtNumToString( BeamData.MAX_LENGTH, 2) .. ') '
|
||||||
|
EgtOutLog( sOut)
|
||||||
|
EgtOutBox( sOut, 'Lavora Travi', 'WARNING')
|
||||||
|
EgtDraw()
|
||||||
|
return false
|
||||||
|
end
|
||||||
end
|
end
|
||||||
dRawW = PARTS[1].b3PartOriginal:getDimY()
|
dRawW = PARTS[1].b3PartOriginal:getDimY()
|
||||||
dRawH = PARTS[1].b3PartOriginal:getDimZ()
|
dRawH = PARTS[1].b3PartOriginal:getDimZ()
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|
||||||
|
|||||||
@@ -782,6 +782,46 @@ local function CutWholeWaste( Proc, Part, OptionalParameters)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
local function UpdateDiceRaw( idRaw, idParallelTm, idPerpendicularTm, Part, MainFace, OtherFace)
|
||||||
|
|
||||||
|
-- frame solidale alla feature
|
||||||
|
local vtZ = MainFace.vtN
|
||||||
|
local vtX = OtherFace and OtherFace.vtN or nil
|
||||||
|
local frMainFace = Frame3d( MainFace.ptCenter, vtZ, vtX)
|
||||||
|
|
||||||
|
-- box del cubetto in riferimento feature
|
||||||
|
local b3Surf = EgtGetBBoxRef( idParallelTm, GDB_BB.STANDARD, frMainFace)
|
||||||
|
local b3SurfPerpendicular = EgtGetBBoxRef( idPerpendicularTm, GDB_BB.STANDARD, frMainFace)
|
||||||
|
b3Surf:Add( b3SurfPerpendicular)
|
||||||
|
|
||||||
|
-- estensione box per non avere problemi nella sottrazione booleana
|
||||||
|
if OtherFace then
|
||||||
|
local vtY = vtZ ^ vtX
|
||||||
|
local ptDeltaX = b3Surf:getMax() + vtX * 1
|
||||||
|
local ptDeltaZ = b3Surf:getMax() + vtZ * 1
|
||||||
|
local ptDeltaYplus = b3Surf:getMax() + vtY * 1
|
||||||
|
local ptDeltaYminus = b3Surf:getMin() - vtY * 1
|
||||||
|
b3Surf:Add( ptDeltaX)
|
||||||
|
b3Surf:Add( ptDeltaZ)
|
||||||
|
b3Surf:Add( ptDeltaYplus)
|
||||||
|
b3Surf:Add( ptDeltaYminus)
|
||||||
|
else
|
||||||
|
b3Surf:expand( 1)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- si porta il box in riferimento globale
|
||||||
|
b3Surf:toGlob( frMainFace)
|
||||||
|
|
||||||
|
-- conversione box cubetto in superficie
|
||||||
|
local idSurfTmToSubtract = EgtSurfTmBBox( Part.idTempGroup, b3Surf, false, GDB_RT.GLOB)
|
||||||
|
|
||||||
|
-- sottrazione del cubetto dal grezzo
|
||||||
|
EgtSurfTmSubtract( idRaw, idSurfTmToSubtract)
|
||||||
|
|
||||||
|
return idRaw
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
local function CalculateDiceMachinings( vCuts, Parameters)
|
local function CalculateDiceMachinings( vCuts, Parameters)
|
||||||
local Machinings = {}
|
local Machinings = {}
|
||||||
local bMoveAfterSplit = false
|
local bMoveAfterSplit = false
|
||||||
@@ -789,6 +829,7 @@ local function CalculateDiceMachinings( vCuts, Parameters)
|
|||||||
local Proc = Parameters.Proc
|
local Proc = Parameters.Proc
|
||||||
local Part = Parameters.Part
|
local Part = Parameters.Part
|
||||||
local MainFace = Parameters.MainFace
|
local MainFace = Parameters.MainFace
|
||||||
|
local OtherFace = next( Parameters.OtherFace) and Parameters.OtherFace or nil
|
||||||
local Tool = Parameters.Tool
|
local Tool = Parameters.Tool
|
||||||
local sChosenBladeType = Parameters.sChosenBladeType
|
local sChosenBladeType = Parameters.sChosenBladeType
|
||||||
local dExtendAfterTail = Parameters.dExtendAfterTail
|
local dExtendAfterTail = Parameters.dExtendAfterTail
|
||||||
@@ -797,21 +838,15 @@ 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
|
||||||
for j = 1, #vCuts[i] do
|
for j = 1, #vCuts[i] do
|
||||||
SetDiceFaceInfo( Proc, vCuts[i][j])
|
SetDiceFaceInfo( Proc, vCuts[i][j])
|
||||||
-- TODO vedere se questa parte serve ancora; in teoria no perchè il taglio è girato automaticamente nella FaceByBlade
|
|
||||||
-- if ( i % 2) == 1 then
|
|
||||||
-- local vtO = EgtSurfTmFacetNormVersor( vCuts[i][j], 0, GDB_ID.ROOT)
|
|
||||||
-- if MachiningLib.IsFaceZOutOfRange( vtO, Tool) then
|
|
||||||
-- EgtInvertSurf( vCuts[i][j])
|
|
||||||
-- local vtCurrentFaceNormal = EgtSurfTmFacetNormVersor( vCuts[i][j], 0, GDB_ID.ROOT)
|
|
||||||
-- EgtMove( vCuts[i][j], -vtCurrentFaceNormal * Tool.dThickness, GDB_RT.GLOB)
|
|
||||||
-- bAreOrthogonalCutsInverted = true
|
|
||||||
-- end
|
|
||||||
-- end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- calcolo lavorazioni
|
-- calcolo lavorazioni
|
||||||
@@ -857,8 +892,8 @@ local function CalculateDiceMachinings( vCuts, Parameters)
|
|||||||
local bIsDicingOk = true
|
local bIsDicingOk = true
|
||||||
if bCanMergeParallelCuts then
|
if bCanMergeParallelCuts then
|
||||||
local nAddGrpId = BeamLib.GetAddGroup( Part.id)
|
local nAddGrpId = BeamLib.GetAddGroup( Part.id)
|
||||||
local nSurfToCut = EgtSurfTmBySewing( nAddGrpId, vCuts[i], false)
|
local idSurfToCut = EgtSurfTmBySewing( nAddGrpId, vCuts[i], false)
|
||||||
local ProcTrimesh = FeatureLib.GetProcFromTrimesh( nSurfToCut, Part)
|
local ProcTrimesh = FeatureLib.GetProcFromTrimesh( idSurfToCut, Part)
|
||||||
|
|
||||||
local OptionalParametersCutWholeWaste = {
|
local OptionalParametersCutWholeWaste = {
|
||||||
nToolIndex = Tool.nIndex,
|
nToolIndex = Tool.nIndex,
|
||||||
@@ -877,8 +912,12 @@ local function CalculateDiceMachinings( vCuts, Parameters)
|
|||||||
bMoveAfterSplit = true
|
bMoveAfterSplit = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
-- aggiornamento grezzo dinamico
|
||||||
|
if i % 2 == 0 then
|
||||||
|
UpdateDiceRaw( idCheckCollisionTm, idSurfToCut, vCuts[i-1][#vCuts[i-1]], Part, MainFace, OtherFace)
|
||||||
|
end
|
||||||
else
|
else
|
||||||
EgtErase( nSurfToCut)
|
EgtErase( idSurfToCut)
|
||||||
bIsDicingOk = false
|
bIsDicingOk = false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -936,6 +975,10 @@ local function CalculateDiceMachinings( vCuts, Parameters)
|
|||||||
if Cutting.sStage == 'AfterTail' then
|
if Cutting.sStage == 'AfterTail' then
|
||||||
bMoveAfterSplit = true
|
bMoveAfterSplit = true
|
||||||
end
|
end
|
||||||
|
-- aggiornamento grezzo dinamico
|
||||||
|
if i % 2 == 0 then
|
||||||
|
UpdateDiceRaw( idCheckCollisionTm, vCuts[i][j], vCuts[i-1][j], Part, MainFace, OtherFace)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -1013,6 +1056,7 @@ local function CutWithDicing( Proc, Part, OptionalParameters)
|
|||||||
Proc = Proc,
|
Proc = Proc,
|
||||||
Part = Part,
|
Part = Part,
|
||||||
MainFace = Face1,
|
MainFace = Face1,
|
||||||
|
OtherFace = Face2,
|
||||||
Tool = TOOLS[nToolIndex],
|
Tool = TOOLS[nToolIndex],
|
||||||
sChosenBladeType = sChosenBladeType,
|
sChosenBladeType = sChosenBladeType,
|
||||||
dExtendAfterTail = dExtendAfterTail,
|
dExtendAfterTail = dExtendAfterTail,
|
||||||
|
|||||||
+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