- a Topology aggiunta groove 2 facce (tipo birdsmouth passante)

- prima aggiunta di MakeStaircaseStep
This commit is contained in:
luca.mazzoleni
2023-10-23 12:39:15 +02:00
parent f147f77133
commit 869683c99a
2 changed files with 28 additions and 2 deletions
+24 -1
View File
@@ -151,6 +151,7 @@ local function AssignQIdent( Proc)
Q_SIDE_ROUGH_TOOL = ''
Q_ANTISPLINT_TYPE = ''
Q_MAX_ELEVATION = 'Q10'
Q_STAIRCASE = ''
if ( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 16 then
Q_FORCE_BLADE = 'Q01' -- i
@@ -164,7 +165,8 @@ local function AssignQIdent( Proc)
Q_USE_MILL = 'Q02' -- i
Q_USE_ROUGH_TOOL = 'Q03' -- i
Q_SIDE_ROUGH_TOOL = 'Q04' -- i
Q_BORE_ON_CORNER = 'Q06' -- i
Q_BORE_ON_CORNER = 'Q06' -- i
Q_STAIRCASE = 'Q09' -- i
elseif ( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 25 then
Q_BORE_ON_CORNER = 'Q01' -- i
elseif ( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 30 then
@@ -5665,6 +5667,23 @@ local function TestTwoFacesDownHead( Proc)
return bDownHead
end
---------------------------------------------------------------------
local function MakeStaircaseStep( Proc)
-- angolo tra le facce
local _, _, _, dAng = EgtSurfTmFacetsContact( Proc.Id, 0, 1, GDB_ID.ROOT)
-- se l'angolo tra le facce è maggiore di 90.5 o minore di 80 esco
if ( dAng > -80 + 10 * GEO.EPS_ANG_SMALL) or ( dAng < -90.5 - 10 * GEO.EPS_ANG_SMALL) then return false end
-- normali delle facce
local vtNRiser = EgtSurfTmFacetNormVersor( Proc.Id, 0, GDB_ID.ROOT)
local vtNTread = EgtSurfTmFacetNormVersor( Proc.Id, 1, GDB_ID.ROOT)
-- identifico quale faccia è l'alzata e quale la pedata
local nFaceRiser, nFaceTread = 0, 1
if vtNRiser:getZ() > vtNTread:getZ() then
nFaceRiser, nFaceTread = 1, 0
end
end
---------------------------------------------------------------------
-- Applicazione della lavorazione
---------------------------------------------------------------------
@@ -5821,6 +5840,10 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
end
-- due facce
elseif Proc.Fct == 2 then
-- se V passante e attiva Q per lavorazione speciale scala
if Q_STAIRCASE == 1 and Proc.Topology == 'Groove' and Proc.IsThrough == true then
return MakeStaircaseStep( Proc)
end
-- se praticamente è lunga come la trave e sono due facce lunghe
local b3Fac1 = EgtSurfTmGetFacetBBoxGlob( Proc.Id, 0, GDB_BB.STANDARD)
local b3Fac2 = EgtSurfTmGetFacetBBoxGlob( Proc.Id, 1, GDB_BB.STANDARD)