Compare commits
7 Commits
ScarfJoint
...
3.1e1
| Author | SHA1 | Date | |
|---|---|---|---|
| c7045499f4 | |||
| 44478b91f0 | |||
| 1f4aa15af4 | |||
| a5d606b225 | |||
| c4697fbd6f | |||
| f58004dfeb | |||
| 7c485360de |
@@ -153,6 +153,11 @@ function BeamExec.GetToolsFromDB()
|
|||||||
Tool.nDouble = EgtGetValInNotes( Tool.sUserNotes, 'DOUBLE', 'd')
|
Tool.nDouble = EgtGetValInNotes( Tool.sUserNotes, 'DOUBLE', 'd')
|
||||||
Tool.bIsProfiledTool = not EgtTdbIsCurrToolStandardDraw()
|
Tool.bIsProfiledTool = not EgtTdbIsCurrToolStandardDraw()
|
||||||
|
|
||||||
|
-- TODO per capire se ToolHolder è flottante bisogna leggere nota TYPE='Float' su ToolHolder. Serve funzione
|
||||||
|
-- info per utensile su ToolHolder flottante
|
||||||
|
Tool.dOverHang = EgtGetValInNotes( Tool.sUserNotes, 'TOOL_OVERHANG', 'd') or 0
|
||||||
|
Tool.bToolOnFloatingTH = Tool.dOverHang > 0
|
||||||
|
|
||||||
-- lettura parametri non comuni ( famiglia DRILLBIT non ha parametri specifici)
|
-- lettura parametri non comuni ( famiglia DRILLBIT non ha parametri specifici)
|
||||||
if sToolFamily ~= 'DRILLBIT' then
|
if sToolFamily ~= 'DRILLBIT' then
|
||||||
Tool.dThickness = EgtTdbGetCurrToolParam( MCH_TP.THICK)
|
Tool.dThickness = EgtTdbGetCurrToolParam( MCH_TP.THICK)
|
||||||
|
|||||||
+11
-10
@@ -785,17 +785,18 @@ function BeamLib.BinaryToDecimal( dNumber)
|
|||||||
local sNumberToConvert = tostring( dNumber)
|
local sNumberToConvert = tostring( dNumber)
|
||||||
local dResult = 0
|
local dResult = 0
|
||||||
local k = 0
|
local k = 0
|
||||||
|
|
||||||
for i = #sNumberToConvert, 1, -1 do
|
for i = #sNumberToConvert, 1, -1 do
|
||||||
k = k + 1
|
k = k + 1
|
||||||
local n = string.sub(sNumberToConvert, k, k)
|
local n = string.sub( sNumberToConvert, k, k)
|
||||||
dResult = dResult + n*(2^(i-1))
|
dResult = dResult + n * ( 2^( i-1))
|
||||||
end
|
end
|
||||||
|
|
||||||
return dResult
|
return dResult
|
||||||
end
|
end
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
-- TODO si può sostituire con funzione EgtNumToBitString
|
||||||
function BeamLib.DecimalToBinary( dNumber)
|
function BeamLib.DecimalToBinary( dNumber)
|
||||||
local sNumberToConvert = tostring( dNumber)
|
local sNumberToConvert = tostring( dNumber)
|
||||||
local n = sNumberToConvert
|
local n = sNumberToConvert
|
||||||
@@ -803,12 +804,12 @@ function BeamLib.DecimalToBinary( dNumber)
|
|||||||
local sResult = ""
|
local sResult = ""
|
||||||
|
|
||||||
for i = sNumberToConvert, 0, -1 do
|
for i = sNumberToConvert, 0, -1 do
|
||||||
local q = math.modf(n)
|
local q = math.modf( n)
|
||||||
n = n/2
|
n = n / 2
|
||||||
local b = q%2
|
local b = q % 2
|
||||||
table.insert(tmp, b)
|
table.insert( tmp, b)
|
||||||
|
|
||||||
if (q == 1) then
|
if ( q == 1) then
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -816,7 +817,7 @@ function BeamLib.DecimalToBinary( dNumber)
|
|||||||
for i = #tmp, 1, -1 do
|
for i = #tmp, 1, -1 do
|
||||||
sResult = sResult..tmp[i]
|
sResult = sResult..tmp[i]
|
||||||
end
|
end
|
||||||
|
|
||||||
return tonumber( sResult)
|
return tonumber( sResult)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -301,16 +301,14 @@ local function MoveMachineAxesToPosition( ptOnToolTipCenter, vtHead, vtAux)
|
|||||||
EgtSetAxisPos( AxesNames[6], dRotative3)
|
EgtSetAxisPos( AxesNames[6], dRotative3)
|
||||||
end
|
end
|
||||||
|
|
||||||
return dTHome - dLinear1, AxesNames
|
return dLinear1 - dTHome
|
||||||
end
|
end
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
local function CheckCollisionPoint( sAxis, ptOnToolTipCenter, vtHead, vtAux, Part, bCannotSplitRestLength, sRestLengthSideForPreSimulation, bCheckOnlyRestlength)
|
local function CheckCollisionPoint( sAxis, ptOnToolTipCenter, vtHead, vtAux, Part, bCannotSplitRestLength, sRestLengthSideForPreSimulation, bCheckOnlyRestlength)
|
||||||
|
|
||||||
-- spostamento assi macchina in posizione
|
-- spostamento assi macchina in posizione
|
||||||
local dDeltaXBeamOffset = MoveMachineAxesToPosition( ptOnToolTipCenter, vtHead, vtAux)
|
local dDeltaXHeadOffset = MoveMachineAxesToPosition( ptOnToolTipCenter, vtHead, vtAux)
|
||||||
-- spostamento trave in posizione macchina (è da riportare in posizione originale prima di return)
|
|
||||||
EgtMove( Part.idRaw, Vector3d( dDeltaXBeamOffset, 0, 0), GDB_RT.GLOB)
|
|
||||||
|
|
||||||
-- si recuperano gli id delle geometrie dell'asse con cui controllare la collisione
|
-- si recuperano gli id delle geometrie dell'asse con cui controllare la collisione
|
||||||
local idCollisionGroup = EgtGetFirstNameInGroup( EgtGetAxisId( sAxis), 'COLLISION')
|
local idCollisionGroup = EgtGetFirstNameInGroup( EgtGetAxisId( sAxis), 'COLLISION')
|
||||||
@@ -321,14 +319,18 @@ local function CheckCollisionPoint( sAxis, ptOnToolTipCenter, vtHead, vtAux, Par
|
|||||||
local CollisionSurfTmId = {}
|
local CollisionSurfTmId = {}
|
||||||
for i = 1, #CollisionGroupEntitiesId do
|
for i = 1, #CollisionGroupEntitiesId do
|
||||||
if EgtGetType( CollisionGroupEntitiesId[i]) == GDB_TY.SRF_MESH then
|
if EgtGetType( CollisionGroupEntitiesId[i]) == GDB_TY.SRF_MESH then
|
||||||
table.insert( CollisionSurfTmId, CollisionGroupEntitiesId[i])
|
local idCollisionSurfTmCopy = EgtCopyGlob( CollisionGroupEntitiesId[i], Part.idTempGroup)
|
||||||
|
EgtMove( idCollisionSurfTmCopy, Vector3d( dDeltaXHeadOffset, 0, 0), GDB_RT.GLOB)
|
||||||
|
table.insert( CollisionSurfTmId, idCollisionSurfTmCopy)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- se presenti geometrie nel gruppo other si aggiungono anche quelle
|
-- se presenti geometrie nel gruppo other si aggiungono anche quelle
|
||||||
if CollisionGroupOtherEntitiesId and #CollisionGroupOtherEntitiesId > 0 then
|
if CollisionGroupOtherEntitiesId and #CollisionGroupOtherEntitiesId > 0 then
|
||||||
for i = 1, #CollisionGroupEntitiesId do
|
for i = 1, #CollisionGroupOtherEntitiesId do
|
||||||
if EgtGetType( CollisionGroupEntitiesId[i]) == GDB_TY.SRF_MESH then
|
if EgtGetType( CollisionGroupOtherEntitiesId[i]) == GDB_TY.SRF_MESH then
|
||||||
table.insert( CollisionSurfTmId, CollisionGroupEntitiesId[i])
|
local idCollisionOtherSurfTmCopy = EgtCopyGlob( CollisionGroupOtherEntitiesId[i], Part.idTempGroup)
|
||||||
|
EgtMove( idCollisionOtherSurfTmCopy, Vector3d( dDeltaXHeadOffset, 0, 0), GDB_RT.GLOB)
|
||||||
|
table.insert( CollisionSurfTmId, idCollisionOtherSurfTmCopy)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -357,8 +359,6 @@ local function CheckCollisionPoint( sAxis, ptOnToolTipCenter, vtHead, vtAux, Par
|
|||||||
|
|
||||||
-- se trovata collisione con pezzo è inutile procedere con il grezzo
|
-- se trovata collisione con pezzo è inutile procedere con il grezzo
|
||||||
if bCollisionFoundPiece then
|
if bCollisionFoundPiece then
|
||||||
-- si riporta la trave in posizione originale
|
|
||||||
EgtMove( Part.idRaw, Vector3d( -dDeltaXBeamOffset, 0, 0), GDB_RT.GLOB)
|
|
||||||
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
@@ -368,7 +368,6 @@ local function CheckCollisionPoint( sAxis, ptOnToolTipCenter, vtHead, vtAux, Par
|
|||||||
local bCollisionFoundRestLength = false
|
local bCollisionFoundRestLength = false
|
||||||
if not ( bCollisionFoundPiece or bCannotSplitRestLength) then
|
if not ( bCollisionFoundPiece or bCannotSplitRestLength) then
|
||||||
local idRestLengthSurfFr = GetRestlengthSurfTm( Part, sRestLengthSideForPreSimulation)
|
local idRestLengthSurfFr = GetRestlengthSurfTm( Part, sRestLengthSideForPreSimulation)
|
||||||
EgtMove( idRestLengthSurfFr, Vector3d( dDeltaXBeamOffset, 0, 0), GDB_RT.GLOB)
|
|
||||||
if idRestLengthSurfFr then
|
if idRestLengthSurfFr then
|
||||||
for i = 1, #CollisionSurfTmId do
|
for i = 1, #CollisionSurfTmId do
|
||||||
bCollisionFoundRestLength = EgtCDeSolidSolid( idRestLengthSurfFr, CollisionSurfTmId[i], BeamData.COLL_SIC)
|
bCollisionFoundRestLength = EgtCDeSolidSolid( idRestLengthSurfFr, CollisionSurfTmId[i], BeamData.COLL_SIC)
|
||||||
@@ -385,9 +384,6 @@ local function CheckCollisionPoint( sAxis, ptOnToolTipCenter, vtHead, vtAux, Par
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- si riporta la trave in posizione originale
|
|
||||||
EgtMove( Part.idRaw, Vector3d( -dDeltaXBeamOffset, 0, 0), GDB_RT.GLOB)
|
|
||||||
|
|
||||||
return false, bCollisionFoundRestLength
|
return false, bCollisionFoundRestLength
|
||||||
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)
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ local function GetSCC( Machining)
|
|||||||
|
|
||||||
if TOOLS[Machining.nToolIndex].SetupInfo.bToolOnAggregate then
|
if TOOLS[Machining.nToolIndex].SetupInfo.bToolOnAggregate then
|
||||||
nSCC = MCH_SCC.ADIR_NEAR
|
nSCC = MCH_SCC.ADIR_NEAR
|
||||||
|
elseif TOOLS[Machining.nToolIndex].SetupInfo.nBlockedSCC then
|
||||||
|
nSCC = TOOLS[Machining.nToolIndex].SetupInfo.nBlockedSCC
|
||||||
elseif Machining.vtToolDirection:getY() <= 0 then
|
elseif Machining.vtToolDirection:getY() <= 0 then
|
||||||
nSCC = MCH_SCC.ADIR_YM
|
nSCC = MCH_SCC.ADIR_YM
|
||||||
else
|
else
|
||||||
@@ -96,7 +98,7 @@ function STR0014.Make( bAddMachining, Proc, Part, CustomParameters)
|
|||||||
Strategy.Machining.nSCC = GetSCC( Strategy.Machining)
|
Strategy.Machining.nSCC = GetSCC( Strategy.Machining)
|
||||||
|
|
||||||
Strategy.Machining.nType = MCH_MY.MILLING
|
Strategy.Machining.nType = MCH_MY.MILLING
|
||||||
Strategy.Machining.sDepth = EgtClamp( Strategy.Parameters.dMachiningDepth, -1, 5)
|
Strategy.Machining.sDepth = EgtClamp( Strategy.Parameters.dMachiningDepth, -1, TOOLS[Strategy.Machining.nToolIndex].dMaxMaterial)
|
||||||
Strategy.Machining.nWorkside = MCH_MILL_WS.CENTER
|
Strategy.Machining.nWorkside = MCH_MILL_WS.CENTER
|
||||||
|
|
||||||
-- LeadIn / LeadOut
|
-- LeadIn / LeadOut
|
||||||
@@ -104,7 +106,19 @@ function STR0014.Make( bAddMachining, Proc, Part, CustomParameters)
|
|||||||
Strategy.Machining.LeadOut = {}
|
Strategy.Machining.LeadOut = {}
|
||||||
Strategy.Machining.LeadIn.nType = MCH_MILL_LI.NONE
|
Strategy.Machining.LeadIn.nType = MCH_MILL_LI.NONE
|
||||||
Strategy.Machining.LeadOut.nType = MCH_MILL_LI.NONE
|
Strategy.Machining.LeadOut.nType = MCH_MILL_LI.NONE
|
||||||
|
|
||||||
|
-- se è una penna, si limita la lavorazione per evitare di partire fuori dal grezzo
|
||||||
|
if ToolSearchParameters.sMillShape == 'PEN' then
|
||||||
|
Strategy.Machining.LeadIn.dStartAddLength = -20
|
||||||
|
Strategy.Machining.LeadOut.dEndAddLength = -20
|
||||||
|
end
|
||||||
|
|
||||||
|
-- TODO gestire meglio
|
||||||
|
-- se utensile montato su aggregato flottante
|
||||||
|
if TOOLS[Strategy.Machining.nToolIndex].bToolOnFloatingTH then
|
||||||
|
Strategy.Machining.dMaxElev = Strategy.Parameters.dMachiningDepth
|
||||||
|
Strategy.Machining.dLongitudinalOffset = -5
|
||||||
|
end
|
||||||
-- stessi parametri cambia solo al geometria
|
-- stessi parametri cambia solo al geometria
|
||||||
for i = 1, #Proc.FeatureInfo.AdditionalGeometries do
|
for i = 1, #Proc.FeatureInfo.AdditionalGeometries do
|
||||||
local AuxId = Proc.id + Proc.FeatureInfo.AdditionalGeometries[i]
|
local AuxId = Proc.id + Proc.FeatureInfo.AdditionalGeometries[i]
|
||||||
|
|||||||
@@ -232,6 +232,9 @@ function FACEBYBLADE.Make( Proc, Part, FaceToMachine, EdgeToMachine, OptionalPar
|
|||||||
Tool = TOOLS[Cutting.nToolIndex],
|
Tool = TOOLS[Cutting.nToolIndex],
|
||||||
dDepthToMachine = dDepthToMachine
|
dDepthToMachine = dDepthToMachine
|
||||||
}
|
}
|
||||||
|
if OppositeToolDirectionMode == 'Enabled' then
|
||||||
|
BladeEngagementParameters.Edge = EdgeToMachineOpposite
|
||||||
|
end
|
||||||
local BladeEngagementOptionalParameters = {
|
local BladeEngagementOptionalParameters = {
|
||||||
bIsDicing = bIsDicing,
|
bIsDicing = bIsDicing,
|
||||||
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
||||||
|
|||||||
+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