From 227f0e6c51896bb533281efa93d3d4c7550a4a7a Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Thu, 20 Aug 2026 19:40:22 +0200 Subject: [PATCH] =?UTF-8?q?EgtMachKernel=20:=20-=20in=20Postproc=20aggiunt?= =?UTF-8?q?a=20variabile=20EMT.NDIR=20per=20normale=20al=20piano=20dell'ar?= =?UTF-8?q?co=20(pu=C3=B2=20non=20coincidere=20con=20il=20versore=20utensi?= =?UTF-8?q?le,=20vedi=20spatolatuta=20nel=20marmo).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OutputConst.h | 1 + Processor.cpp | 7 +++++-- Processor.h | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/OutputConst.h b/OutputConst.h index 60cbec0..a88a491 100644 --- a/OutputConst.h +++ b/OutputConst.h @@ -178,6 +178,7 @@ static const std::string GVAR_CORR = ".CORR" ; // (int) tipo di c static const std::string GVAR_TDIR = ".TDIR" ; // (Vector3d) versore utensile nel riferimento pezzo static const std::string GVAR_CDIR = ".CDIR" ; // (Vector3d) versore correzione nel riferimento pezzo static const std::string GVAR_ADIR = ".ADIR" ; // (Vector3d) versore ausiliario nel riferimento pezzo +static const std::string GVAR_NDIR = ".NDIR" ; // (Vector3d) versore normale al piano dell'arco nel riferimento pezzo static const std::string GVAR_TDIRP = ".TDIRp" ; // (Vector3d) precedente versore utensile nel riferimento pezzo static const std::string GVAR_ENABAXES = ".EnabAxes" ; // (bool) flag abilitazione assi attivi per simulazione static const std::string GVAR_SHOWAXES = ".ShowAxes" ; // (bool) flag visualizzazione assi attivi per simulazione diff --git a/Processor.cpp b/Processor.cpp index edef9cd..01c7038 100644 --- a/Processor.cpp +++ b/Processor.cpp @@ -517,7 +517,7 @@ Processor::ProcessClEnt( int nEntId, int nEntInd, int nClPathId, int nClPathInd, Point3d ptMid( AxesEnd[0], AxesEnd[1], AxesEnd[2]) ; ptMid.Rotate( pCamData->GetAxesCen(), pCamData->GetAxesNormDir(), - pCamData->GetAxesAngCen() / 2) ; if ( ! OnArc( nEntId, nEntInd, nMove, AxesEnd, - pCamData->GetAxesCen(), ptMid, pCamData->GetAxesRad(), pCamData->GetAxesAngCen(), + pCamData->GetAxesCen(), ptMid, pCamData->GetAxesRad(), pCamData->GetAxesAngCen(), pCamData->GetAxesNormDir(), pCamData->GetToolDir(), pCamData->GetCorrDir(), pCamData->GetBackAuxDir(), pCamData->GetFeed(), pCamData->GetFlag(), pCamData->GetFlag2(), pCamData->GetIndex(), pCamData->GetCorrType(), nMoveNext, AxesNext)) @@ -1164,7 +1164,7 @@ Processor::OnLinear( int nEntId, int nEntInd, int nMove, const DBLVECTOR& AxesEn //---------------------------------------------------------------------------- bool Processor::OnArc( int nEntId, int nEntInd, int nMove, const DBLVECTOR& AxesEnd, - const Point3d& ptCen, const Point3d& ptMid, double dRad, double dAngCen, + const Point3d& ptCen, const Point3d& ptMid, double dRad, double dAngCen, const Vector3d& vtNorm, const Vector3d& vtTool, const Vector3d& vtCorr, const Vector3d& vtAux, double dFeed, int nFlag, int nFlag2, int nIndex, int nCorr, int nMoveNext, const DBLVECTOR& AxesNext) { @@ -1194,6 +1194,8 @@ Processor::OnArc( int nEntId, int nEntInd, int nMove, const DBLVECTOR& AxesEnd, bOk = bOk && m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_RR, dRad) ; // assegno il valore dell'angolo al centro bOk = bOk && m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_AC, dAngCen) ; + // assegno il valore del versore normale al piano di giacitura dell'arco + bOk = bOk && m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_NDIR, vtNorm) ; // assegno il valore del versore utensile bOk = bOk && m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_TDIR, vtTool) ; // assegno il valore del versore correzione @@ -1243,5 +1245,6 @@ Processor::ResetArcData( void) bOk = bOk && m_pMachine->LuaResetGlobVar( GLOB_VAR + GVAR_M3) ; bOk = bOk && m_pMachine->LuaResetGlobVar( GLOB_VAR + GVAR_RR) ; bOk = bOk && m_pMachine->LuaResetGlobVar( GLOB_VAR + GVAR_AC) ; + bOk = bOk && m_pMachine->LuaResetGlobVar( GLOB_VAR + GVAR_NDIR) ; return bOk ; } diff --git a/Processor.h b/Processor.h index e3a4ca6..05254db 100644 --- a/Processor.h +++ b/Processor.h @@ -67,7 +67,7 @@ class Processor const Vector3d& vtTool, const Vector3d& vtCorr, const Vector3d& vtAux, double dFeed, int nFlag, int nFlag2, int nIndex, int nCorr, int nMoveNext, const DBLVECTOR& AxesNext) ; bool OnArc( int nEntId, int nEntInd, int nMove, const DBLVECTOR& AxesEnd, - const Point3d& ptCen, const Point3d& ptMid, double dRad, double dAngCen, + const Point3d& ptCen, const Point3d& ptMid, double dRad, double dAngCen, const Vector3d& vtNorm, const Vector3d& vtTool, const Vector3d& vtCorr, const Vector3d& vtAux, double dFeed, int nFlag, int nFlag2, int nIndex, int nCorr, int nMoveNext, const DBLVECTOR& AxesNext) ; bool ResetArcData( void) ;