diff --git a/GetWallData.lua b/GetWallData.lua index 562e699..6c62842 100644 --- a/GetWallData.lua +++ b/GetWallData.lua @@ -39,6 +39,8 @@ GWD.SIMUL_VIEW_DIR = WD.SIMUL_VIEW_DIR GWD.ORIG_CORNER = WD.ORIG_CORNER GWD.NESTING_CORNER = WD.NESTING_CORNER GWD.HOR_DRILL_DIAM = WD.HOR_DRILL_DIAM +GWD.MIN_HEIGHT = WD.MIN_HEIGHT +GWD.MAX_HEIGHT = WD.MAX_HEIGHT -- Tutto ok GWD.ERR = 0 diff --git a/LuaLibs/WProcessDrill.lua b/LuaLibs/WProcessDrill.lua index 877aeee..e52367c 100644 --- a/LuaLibs/WProcessDrill.lua +++ b/LuaLibs/WProcessDrill.lua @@ -80,7 +80,7 @@ function WPD.Classify( Proc, b3Raw) -- se foro orizzontale, verifico sia sul bordo del grezzo local b3RedRaw = BBox3d( b3Raw) b3RedRaw:expand( -20) - if vtExtr:getZ() > -0.05 and not EnclosesPointXY( b3RedRaw, ptCen) then + if ( WD.HOR_DRILL_5AX or WD.HOR_DRILL_5AX == nil) and vtExtr:getZ() > -0.05 and not EnclosesPointXY( b3RedRaw, ptCen) then return true end -- altrimenti non lavorabile diff --git a/LuaLibs/WProcessFreeContour.lua b/LuaLibs/WProcessFreeContour.lua index 39d9150..7b00f1b 100644 --- a/LuaLibs/WProcessFreeContour.lua +++ b/LuaLibs/WProcessFreeContour.lua @@ -1,4 +1,4 @@ --- ProcessFreeContour.lua by Egaltech s.r.l. 2022/03/14 +-- ProcessFreeContour.lua by Egaltech s.r.l. 2022/03/16 -- Gestione calcolo profilo libero per Pareti -- 2021/11/15 Penna e chiodature sono sempre riportate sulla faccia sopra anche se nel progetto sono sotto. -- 2021/12/10 In taglio con lama aggiunta gestione SCC per testa Gearbox. @@ -6,6 +6,7 @@ -- 2022/02/03 Corretto controllo massimo affondamento nella tavola. -- 2022/02/21 Corretti allungamenti/accorciamenti tagli inclinati con fresa. Migliorata gestione tagli trasversali per macchine travi. -- 2022/03/14 Corretto riconoscimento lato esterno per percorsi aperti. +-- 2022/03/16 Ulteriore modifica per riconoscimento lato esterno (aggiunto uso vExtr a GetFacesExternalSide). -- Tabella per definizione modulo local WPF = {} @@ -306,19 +307,19 @@ end --------------------------------------------------------------------- -local function GetFacesExternalSide( Proc) +local function GetFacesExternalSide( Proc, vtExtr) -- 3=sinistra, 4=destra -- se meno di due facce considero esterno come dichiarato dal gruppo local nNumFacet = EgtSurfTmFacetCount( Proc.Id) if nNumFacet < 2 then return Proc.Grp end - -- se facce isoate, considero esterno come dichiarato dal gruppo + -- se facce isolate, considero esterno come dichiarato dal gruppo local bAdj, ptV1, ptV2, dAng = EgtSurfTmFacetsContact( Proc.Id, 0, 1, GDB_ID.ROOT) if not bAdj then return Proc.Grp end -- calcolo dell'esterno rispetto all'avanzamento local ptC1, vtN1 = EgtSurfTmFacetCenter( Proc.Id, 0, GDB_ID.ROOT) local ptV = ( ptV1 + ptV2) / 2 local vtDir1 = ptV - ptC1 - if ( vtN1 ^ vtDir1):getZ() > 0 then + if ( vtN1 ^ vtDir1) * vtExtr > 0 then return 4 else return 3 @@ -1869,7 +1870,7 @@ local function MakeByCut( Proc, nRawId, b3Raw) local vtExtr= EgtCurveExtrusion( AuxId, GDB_RT.GLOB) if vtExtr then bOpposite = ( Proc.Grp == 4 and vtExtr:getZ() < 0) or ( Proc.Grp == 3 and vtExtr:getZ() > 0) - if GetFacesExternalSide( Proc) ~= Proc.Grp then + if GetFacesExternalSide( Proc, vtExtr) ~= Proc.Grp then bOpposite = not bOpposite end end @@ -2236,7 +2237,7 @@ local function MakeByPocket( Proc, nRawId, b3Raw) vtExtr = EgtCurveExtrusion( AuxId, GDB_RT.GLOB) if vtExtr then bOpposite = ( Proc.Grp == 4 and vtExtr:getZ() < 0) or ( Proc.Grp == 3 and vtExtr:getZ() > 0) - if GetFacesExternalSide( Proc) ~= Proc.Grp then + if GetFacesExternalSide( Proc, vtExtr) ~= Proc.Grp then bOpposite = not bOpposite end end