- in LapJoint -> MakeStaircaseStep aggiunta riduzione profondità lama in caso di angolo inferiore a 90deg

This commit is contained in:
luca.mazzoleni
2023-11-03 09:42:12 +01:00
parent a5a8a0e98b
commit 54fcc27c49
+13 -6
View File
@@ -5673,7 +5673,6 @@ end
local function MakeStaircaseStep( Proc, nRawId, b3Raw, b3Solid)
-- angolo tra le facce
local _, _, _, dAng = EgtSurfTmFacetsContact( Proc.Id, 0, 1, GDB_ID.ROOT)
local _, _, _, dAng2 = EgtSurfTmFacetsContact( Proc.Id, 1, 0, GDB_ID.ROOT)
-- l'angolo tra le facce deve essere compreso tra 80 e 90.5 deg
if ( dAng > -89.5 + 10 * GEO.EPS_ANG_SMALL) or ( dAng < -100 - 10 * GEO.EPS_ANG_SMALL) then return false end
-- normali delle facce
@@ -5721,16 +5720,24 @@ local function MakeStaircaseStep( Proc, nRawId, b3Raw, b3Solid)
local dSawMaxDepth = 0
local dSawDiam = 400
local dSawRotationSpeed = 0
local dSawThick = 5
if sCutting then
if EgtMdbSetCurrMachining( sCutting) then
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
dSawMaxDepth = EgtTdbGetCurrToolMaxDepth() or dSawMaxDepth
dSawRotationSpeed = EgtMdbGetCurrMachiningParam( MCH_MP.SPEED)or dSawRotationSpeed
dSawRotationSpeed = EgtTdbGetCurrToolParam( MCH_MP.SPEED) or dSawRotationSpeed
dSawThick = EgtTdbGetCurrToolParam( MCH_TP.THICK) or dSawThick
end
end
end
-- calcolo riduzione profondità lama in caso di angolo inferiore a 90deg
local dCutExtraSaw = 0
if dAng < -91 and dAng > -179 then
dCutExtraSaw = - dSawThick / tan( 180 + dAng)
end
-- fresatura della pedata per fare spazio alla lama
local dMillingDepth = dVTread - dSawMaxDepth + 10
-- divido in passate orizzontali
@@ -5809,10 +5816,10 @@ local function MakeStaircaseStep( Proc, nRawId, b3Raw, b3Solid)
end
for i = 2, 1, -1 do
-- inserisco la lavorazione della faccia
local dCutRadialOffsetTread = ( i - 1) * dSawMaxDepth / 2
local dCutRadialOffsetTread = - dSawMaxDepth / 2 * ( i - 1)
-- componente limite del vettore Z per lama downUp; impostata a -2 per non farla mai rientrare in quel caso
local dVzLimDwnUp = -2
local bOkSawTread, sErr = Fbs.MakeOne( Proc.Id, nFacetTread, sCutting, dSawDiam, nFaceUseTread, dVzLimDwnUp, -dCutRadialOffsetTread, 0, 0, 0, 0, nil, b3Raw)
local bOkSawTread, sErr = Fbs.MakeOne( Proc.Id, nFacetTread, sCutting, dSawDiam, nFaceUseTread, dVzLimDwnUp, dCutRadialOffsetTread + dCutExtraSaw, 0, 0, 0, 0, nil, b3Raw)
end
-- taglio di lama dell'alzata
@@ -5826,10 +5833,10 @@ local function MakeStaircaseStep( Proc, nRawId, b3Raw, b3Solid)
end
for i = nSawStepsRiser, 1, -1 do
-- inserisco la lavorazione della faccia
local dCutRadialOffsetRiser = ( i - 1) * dSawStepRiser
local dCutRadialOffsetRiser = - dSawStepRiser * ( i - 1)
-- componente limite del vettore Z per lama downUp; impostata a -2 per non farla mai rientrare in quel caso
local dVzLimDwnUp = -2
local bOkSawRiser, sErr = Fbs.MakeOne( Proc.Id, nFacetRiser, sCutting, dSawDiam, nFaceUseRiser, dVzLimDwnUp, -dCutRadialOffsetRiser, 0, 0, 0, 0, nil, b3Raw)
local bOkSawRiser, sErr = Fbs.MakeOne( Proc.Id, nFacetRiser, sCutting, dSawDiam, nFaceUseRiser, dVzLimDwnUp, dCutRadialOffsetRiser + dCutExtraSaw, 0, 0, 0, 0, nil, b3Raw)
end
end