diff --git a/LuaLibs/FeatureTopology.lua b/LuaLibs/FeatureTopology.lua index 03dbd55..5a3a09d 100644 --- a/LuaLibs/FeatureTopology.lua +++ b/LuaLibs/FeatureTopology.lua @@ -199,9 +199,12 @@ function FeatureTopology.Classify( Proc, b3Raw) elseif Proc.Fct == 2 and bAllAnglesConcave and #vTriangularFaces == 1 then sFamily = 'Bevel' bIsThrough = false - elseif Proc.Fct == 2 and bAllAnglesConcave then + elseif Proc.Fct == 2 and bAllAnglesConcave and ( Proc.AffectedFaces.Left or Proc.AffectedFaces.Right) and ( Proc.AffectedFaces.Front or Proc.AffectedFaces.Back) then sFamily = 'Rabbet' bIsThrough = true + elseif Proc.Fct == 2 and bAllAnglesConcave then + sFamily = 'Groove' + bIsThrough = true elseif Proc.Fct == 2 and not bAllAnglesConcave and bIsAnyDimensionLongAsPart then sFamily = 'DoubleBevel' bIsThrough = true diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index b1d4d58..4057728 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -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)