diff --git a/LuaLibs/ProcessHeadCut.lua b/LuaLibs/ProcessHeadCut.lua index d38e615..b6671f4 100644 --- a/LuaLibs/ProcessHeadCut.lua +++ b/LuaLibs/ProcessHeadCut.lua @@ -196,7 +196,11 @@ local function MakeHeadChamfer( idProc, nPartId) EgtSetGridFrame( Frame3d( 0,0,0, GDB_FR.RIGHT)) local dQ09Value = EgtGetInfo( idProc, 'Q09', 'd') + if not dQ09Value then + dQ09Value = 0.1 + end local bChamferedEdge = dQ09Value > 0 + dQ09Value = EgtIf( bChamferedEdge, max( dQ09Value, 0.1), min( dQ09Value, -0.1)) local nIdFirstEntity, nEntityCnt = EgtExplodeCurveCompo( nLoopId) local p3MidPoint = EgtMP( nIdFirstEntity, GDB_ID.GRID) @@ -232,6 +236,9 @@ local function MakeHeadChamfer( idProc, nPartId) end EgtChangeClosedCurveStartPoint( idGeom, p3MidPoint, GDB_RT.GRID) + -- reimposto la griglia + EgtSetGridFrame() + -- Inserisco la lavorazione del lato standard local dExtra = 2 local sName1 = 'HeadCham_' .. ( EgtGetName( idProc) or tostring( idProc)) diff --git a/LuaLibs/ProcessSplit.lua b/LuaLibs/ProcessSplit.lua index 62664c4..3a8792f 100644 --- a/LuaLibs/ProcessSplit.lua +++ b/LuaLibs/ProcessSplit.lua @@ -198,7 +198,13 @@ local function MakeTailChamfer( idProc, nPartId, dDepthTailChamfer) EgtSetGridFrame( Frame3d( 0,0,0, GDB_FR.LEFT)) local dQ09Value = EgtGetInfo( idProc, 'Q09', 'd') + if not dQ09Value then + dQ09Value = 0.1 + end local bChamferedEdge = dQ09Value > 0 + dQ09Value = EgtIf( bChamferedEdge, max( dQ09Value, 0.1), min( dQ09Value, -0.1)) + + local nIdFirstEntity, nEntityCnt = EgtExplodeCurveCompo( nLoopId) local p3MidPoint = EgtMP( nIdFirstEntity, GDB_ID.GRID) @@ -234,6 +240,9 @@ local function MakeTailChamfer( idProc, nPartId, dDepthTailChamfer) end EgtChangeClosedCurveStartPoint( idGeom, p3MidPoint, GDB_RT.GRID) + -- reimposto la griglia + EgtSetGridFrame() + -- Inserisco la lavorazione del lato standard local dExtra = 2 local sName1 = 'TailCham_' .. ( EgtGetName( idProc) or tostring( idProc))