From a3c905c33a8904d92fa4c29fa66a0bde9ed77211 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Fri, 19 Apr 2024 17:51:00 +0200 Subject: [PATCH 1/4] EgtExecutor : - adattamenti per Surf Bezier - aggiunta funzione Exe/Lua CreateArc2PR. --- EXE_GdbCreateCurve.cpp | 39 +++++++++++++++++++++++++++++++++++++++ EXE_GdbCreateSurf.cpp | 5 ----- LUA_GdbCreateCurve.cpp | 29 +++++++++++++++++++++++++++++ 3 files changed, 68 insertions(+), 5 deletions(-) diff --git a/EXE_GdbCreateCurve.cpp b/EXE_GdbCreateCurve.cpp index 61a5c4e..d9a9c25 100644 --- a/EXE_GdbCreateCurve.cpp +++ b/EXE_GdbCreateCurve.cpp @@ -1088,6 +1088,45 @@ ExeCreateArc3P( int nParentId, const Point3d& ptP1, return nId ; } +//------------------------------------------------------------------------------- +int +ExeCreateArc2PR( int nParentId, const Point3d& ptStart, const Point3d& ptEnd, + double dRad, bool bCCW, int nRefType) +{ + IGeomDB* pGeomDB = GetCurrGeomDB() ; + VERIFY_GEOMDB( pGeomDB, GDB_ID_NULL) + nParentId = AdjustId( nParentId) ; + // recupero il riferimento locale + Frame3d frLoc ; + bool bOk = pGeomDB->GetGroupGlobFrame( nParentId, frLoc) ; + // porto in locale i punti, il versore normale e quelloe estrusione + Point3d ptStartL = GetPointLocal( pGeomDB, ptStart, nRefType, frLoc) ; + Point3d ptEndL = GetPointLocal( pGeomDB, ptEnd, nRefType, frLoc) ; + Vector3d vtNormL = GetVectorLocal( pGeomDB, Z_AX, nRefType, frLoc) ; + Vector3d vtExtrL = GetVectorLocal( pGeomDB, Z_AX, nRefType, frLoc) ; + // creo l'arco + PtrOwner pCrvArc( CreateCurveArc()) ; + bOk = bOk && ( ! IsNull( pCrvArc) && + pCrvArc->Set2PNRS( ptStartL, ptEndL, vtNormL, dRad, bCCW)) ; + // assegno il versore estrusione + bOk = bOk && pCrvArc->SetExtrusion( vtExtrL) ; + // inserisco l'arco nel DB + int nId = ( bOk ? pGeomDB->AddGeoObj( GDB_ID_NULL, nParentId, Release( pCrvArc)) : GDB_ID_NULL) ; + ExeSetModified() ; + // se richiesto, salvo il comando Lua equivalente + if ( IsCmdLog()) { + string sLua = "EgtArc2PR(" + IdToString( nParentId) + ",{" + + ToString( ptStart) + "},{" + + ToString( ptEnd) + "}," + + ToString( dRad) + "," + + RefTypeToString( nRefType) + ")" + + " -- Id=" + ToString( nId) ; + LOG_INFO( GetCmdLogger(), sLua.c_str()) ; + } + // restituisco l'identificativo della nuova entità + return nId ; +} + //------------------------------------------------------------------------------- int ExeCreateArc2PB( int nParentId, const Point3d& ptStart, const Point3d& ptEnd, diff --git a/EXE_GdbCreateSurf.cpp b/EXE_GdbCreateSurf.cpp index 4136b4d..69f75c1 100644 --- a/EXE_GdbCreateSurf.cpp +++ b/EXE_GdbCreateSurf.cpp @@ -1668,8 +1668,6 @@ ExeCreateSurfBezier( int nParentId, int nDegU, int nDegV, int nSpanU, int nSpanV if ( ! pSurfBez->SetControlPoint( i, ptCtrl)) bOk = false ; } - // calcolo eventuali poli - pSurfBez->CalcPoles() ; // se superficie nulla (ovvero ridotta a punto), errore bOk = bOk && ! pSurfBez->IsAPoint() ; // inserisco la superficie nel DB @@ -1722,8 +1720,6 @@ ExeCreateSurfBezierRational( int nParentId, int nDegU, int nDegV, int nSpanU, in if ( ! pSurfBez->SetControlPoint( i, ptCtrl, vPntW[i].second)) bOk = false ; } - // calcolo eventuali poli - pSurfBez->CalcPoles() ; // se superficie nulla (ovvero ridotta a punto), errore bOk = bOk && ! pSurfBez->IsAPoint() ; // inserisco la superficie nel DB @@ -1899,7 +1895,6 @@ ExeCreateBezierSphere( int nParentId, const Point3d& ptCenter, double dR, int nR Point3d ptCenterLoc = GetPointLocal( pGeomDB, ptCenter, nRefType, frLoc) ; // Creo la superficie PtrOwner pSurfBez( CreateBezierSphere( ptCenterLoc, dR)) ; - pSurfBez->CalcPoles() ; int nId = ( bOk ? pGeomDB->AddGeoObj( GDB_ID_NULL, nParentId, Release( pSurfBez)) : GDB_ID_NULL) ; ExeSetModified() ; // se richiesto, salvo il comando Lua equivalente diff --git a/LUA_GdbCreateCurve.cpp b/LUA_GdbCreateCurve.cpp index ec4b9bd..bef8eec 100644 --- a/LUA_GdbCreateCurve.cpp +++ b/LUA_GdbCreateCurve.cpp @@ -425,6 +425,34 @@ LuaCreateArc3P( lua_State* L) return 1 ; } +//------------------------------------------------------------------------------- +static int +LuaCreateArc2PR( lua_State* L) +{ + // 5 o 6 parametri : ParentId, PtStart, PtEnd, dRad, bCCW [, nRefType] + int nParentId ; + LuaCheckParam( L, 1, nParentId) + Point3d ptStart ; + LuaCheckParam( L, 2, ptStart) + Point3d ptEnd ; + LuaCheckParam( L, 3, ptEnd) + double dRad ; + LuaCheckParam( L, 4, dRad) + bool bCCW ; + LuaCheckParam( L, 5, bCCW) ; + int nRefType = RTY_DEFAULT ; + LuaGetParam( L, 6, nRefType) ; + LuaClearStack( L) ; + // creo l'arco + int nId = ExeCreateArc2PR( nParentId, ptStart, ptEnd, dRad, bCCW, nRefType) ; + // restituisco il risultato + if ( nId != GDB_ID_NULL) + LuaSetParam( L, nId) ; + else + LuaSetParam( L) ; + return 1 ; +} + //------------------------------------------------------------------------------- static int LuaCreateArc2PB( lua_State* L) @@ -1083,6 +1111,7 @@ LuaInstallGdbCreateCurve( LuaMgr& luaMgr) bOk = bOk && luaMgr.RegisterFunction( "EgtArcC2P", LuaCreateArcC2P) ; bOk = bOk && luaMgr.RegisterFunction( "EgtArcC2PEx", LuaCreateArcC2PEx) ; bOk = bOk && luaMgr.RegisterFunction( "EgtArc3P", LuaCreateArc3P) ; + bOk = bOk && luaMgr.RegisterFunction( "EgtArc2PR", LuaCreateArc2PR) ; bOk = bOk && luaMgr.RegisterFunction( "EgtArc2PB", LuaCreateArc2PB) ; bOk = bOk && luaMgr.RegisterFunction( "EgtArc2PD", LuaCreateArc2PD) ; bOk = bOk && luaMgr.RegisterFunction( "EgtArc2PDEx", LuaCreateArc2PDEx) ; From 22774303af440f13f3db243c23798652b2fa7cc4 Mon Sep 17 00:00:00 2001 From: Riccardo Elitropi Date: Mon, 22 Apr 2024 13:23:59 +0200 Subject: [PATCH 2/4] EgtExecutor : - aggiunte funzioni per Vmill additivo. --- EXE_GdbCreateVol.cpp | 51 ++++++++++++++++++++++++++++++++++++++++---- EXE_GdbModifyVol.cpp | 28 ++++++++++++++++++++++++ LUA_GdbCreateVol.cpp | 37 ++++++++++++++++++++++++++++++++ LUA_GdbModifyVol.cpp | 27 +++++++++++++++++++++++ 4 files changed, 139 insertions(+), 4 deletions(-) diff --git a/EXE_GdbCreateVol.cpp b/EXE_GdbCreateVol.cpp index 6ca6247..f60437f 100644 --- a/EXE_GdbCreateVol.cpp +++ b/EXE_GdbCreateVol.cpp @@ -1,4 +1,4 @@ -//---------------------------------------------------------------------------- +//---------------------------------------------------------------------------- // EgalTech 2016-2016 //---------------------------------------------------------------------------- // File : EXE_GdbCreateVol.cpp Data : 27.10.16 Versione : 1.6v7 @@ -64,7 +64,50 @@ ExeCreateVolZmap( int nParentId, const Point3d& ptIni, double dDimX, double dDim " -- Id=" + ToString( nNewId) ; LOG_INFO( GetCmdLogger(), sLua.c_str()) ; } - // restituisco l'identificativo della nuova entità + // restituisco l'identificativo della nuova entità + return nNewId ; +} + +//------------------------------------------------------------------------------- +int ExeCreateVolZmapEmpty( int nParentId, const Point3d& ptIni, double dDimX, double dDimY, double dDimZ, + double dPrec, bool bTriDex, int nRefType) +{ + IGeomDB* pGeomDB = GetCurrGeomDB() ; + VERIFY_GEOMDB( pGeomDB, GDB_ID_NULL) + nParentId = AdjustId( nParentId) ; + // recupero il riferimento locale + Frame3d frLoc ; + bool bOk = pGeomDB->GetGroupGlobFrame( nParentId, frLoc) ; + // porto in locale i punti + Point3d ptIniL = GetPointLocal( pGeomDB, ptIni, nRefType, frLoc) ; + Point3d ptOnXL = GetPointLocal( pGeomDB, ptIni + X_AX, nRefType, frLoc) ; + Point3d ptOnYL = GetPointLocal( pGeomDB, ptIni + Y_AX, nRefType, frLoc) ; + // ne ricavo un riferimento intrinseco + Frame3d frBox ; + bOk = bOk && frBox.Set( ptIniL, ptOnXL, ptOnYL) ; + // creo lo Zmap nel suo riferimento intrinseco + PtrOwner pVZM( CreateVolZmap()) ; + bOk = bOk && ! IsNull( pVZM) ; + bOk = bOk && pVZM->CreateEmptyMap( ORIG, dDimX, dDimY, dDimZ, dPrec, bTriDex) ; + // lo porto nel riferimento locale + bOk = bOk && pVZM->ToGlob( frBox) ; + // inserisco lo Zmap nel DB + int nNewId = ( bOk ? pGeomDB->AddGeoObj( GDB_ID_NULL, nParentId, Release( pVZM)) : GDB_ID_NULL) ; + ExeSetModified() ; + // se richiesto, salvo il comando Lua equivalente + if ( IsCmdLog()) { + string sLua = "EgtVolZmapEmpty(" + IdToString( nParentId) + ",{" + + ToString( ptIni) + "}," + + ToString( dDimX) + "," + + ToString( dDimY) + "," + + ToString( dDimZ) + "," + + ToString( dPrec) + "," + + ( bTriDex ? "true" : "false") + "," + + RefTypeToString( nRefType) + ")" + + " -- Id=" + ToString( nNewId) ; + LOG_INFO( GetCmdLogger(), sLua.c_str()) ; + } + // restituisco l'identificativo della nuova entità return nNewId ; } @@ -103,7 +146,7 @@ ExeCreateVolZmapByRegionExtrusion( int nParentId, int nSfrId, double dDimZ, doub " -- Id=" + ToString( nNewId) ; LOG_INFO( GetCmdLogger(), sLua.c_str()) ; } - // restituisco l'identificativo della nuova entità + // restituisco l'identificativo della nuova entità return nNewId ; } @@ -141,6 +184,6 @@ ExeCreateVolZmapFromSurfTm( int nParentId, int nStmId, double dPrec, bool bTriDe " -- Id=" + ToString( nNewId) ; LOG_INFO( GetCmdLogger(), sLua.c_str()) ; } - // restituisco l'identificativo della nuova entità + // restituisco l'identificativo della nuova entità return nNewId ; } diff --git a/EXE_GdbModifyVol.cpp b/EXE_GdbModifyVol.cpp index 1cce74a..3f57943 100644 --- a/EXE_GdbModifyVol.cpp +++ b/EXE_GdbModifyVol.cpp @@ -337,6 +337,34 @@ ExeVolZmapSetChiselTool( const INTVECTOR& vIds, const string& sToolName, return bOk ; } +//---------------------------------------------------------------------------- +bool +ExeVolZmapSetAdditiveTool( const INTVECTOR& vIds, const string& sToolName, + double dLen, double dDiam, double dCornR, int nFlag, bool bFirst) +{ + IGeomDB* pGeomDB = GetCurrGeomDB() ; + VERIFY_GEOMDB( pGeomDB, false) + // recupero gli Zmap e assegno i dati dell'utensile + bool bOk = true ; + for ( int i = 0 ; i < int( vIds.size()) ; ++ i) { + IVolZmap* pVZM = GetVolZmap( pGeomDB->GetGeoObj( vIds[i])) ; + bOk = ( bOk && pVZM != nullptr && pVZM->SetAdditiveTool( sToolName, dLen, dDiam / 2, dCornR, nFlag, bFirst)) ; + } + // se richiesto, salvo il comando Lua equivalente + if ( IsCmdLog()) { + string sLua = "EgtVolZmapSetAdditiveTool({" + IdListToString( vIds) + "}," + + sToolName + "," + + ToString( dLen) + "," + + ToString( dDiam) + "," + + ToString( dCornR) + "," + + ToString( nFlag) + ")" + + " -- Ok=" + ToString( bOk) ; + LOG_INFO( GetCmdLogger(), sLua.c_str()) ; + } + // restituisco risultato + return bOk ; +} + //---------------------------------------------------------------------------- bool ExeVolZmapResetTools( const INTVECTOR& vIds) diff --git a/LUA_GdbCreateVol.cpp b/LUA_GdbCreateVol.cpp index 2e2e1fc..f5ec104 100644 --- a/LUA_GdbCreateVol.cpp +++ b/LUA_GdbCreateVol.cpp @@ -54,6 +54,42 @@ LuaCreateVolZmapBox( lua_State* L) return 1 ; } +//------------------------------------------------------------------------------- +static int +LuaCreateVolZmapEmpty( lua_State* L) +{ + // 6 o 7 o 8 parametri : ParentId, PtIni, dDimX, dDimY, dDimZ, dPrec [, bTriDex] [, nRefType] + int nParentId ; + LuaCheckParam( L, 1, nParentId) + Point3d ptIni ; + LuaCheckParam( L, 2, ptIni) + double dDimX ; + LuaCheckParam( L, 3, dDimX) + double dDimY ; + LuaCheckParam( L, 4, dDimY) + double dDimZ ; + LuaCheckParam( L, 5, dDimZ) + double dPrec ; + LuaCheckParam( L, 6, dPrec) + bool bTriDex = true ; + int nRefType = RTY_DEFAULT ; + if ( ! LuaGetParam( L, 7, bTriDex)) + LuaGetParam( L, 7, nRefType) ; + else + LuaGetParam( L, 8, nRefType) ; + LuaClearStack( L) ; + // creo VZM parallelepipedo + int nId = ExeCreateVolZmapEmpty( nParentId, ptIni, dDimX, dDimY, dDimZ, dPrec, bTriDex, nRefType) ; + // restituisco il risultato + if ( nId != GDB_ID_NULL) + LuaSetParam( L, nId) ; + else + LuaSetParam( L) ; + return 1 ; +} + + + //------------------------------------------------------------------------------- static int LuaCreateVolZmapByRegionExtrusion( lua_State* L) @@ -110,6 +146,7 @@ LuaInstallGdbCreateVol( LuaMgr& luaMgr) { bool bOk = ( &luaMgr != nullptr) ; bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapBox", LuaCreateVolZmapBox) ; + bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapEmpty", LuaCreateVolZmapEmpty) ; bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapByRegionExtrusion", LuaCreateVolZmapByRegionExtrusion) ; bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapFromSurfTm", LuaCreateVolZmapFromSurfTm) ; return bOk ; diff --git a/LUA_GdbModifyVol.cpp b/LUA_GdbModifyVol.cpp index b0c8e28..f749bd9 100644 --- a/LUA_GdbModifyVol.cpp +++ b/LUA_GdbModifyVol.cpp @@ -250,6 +250,32 @@ LuaVolZmapSetChiselTool( lua_State* L) return 1 ; } +//---------------------------------------------------------------------------- +static int +LuaVolZmapSetAdditiveTool( lua_State* L) +{ + // 5 o 6 parametri : vIds, sToolName, dLen, dWidth, dThick, nFlag + INTVECTOR vIds ; + LuaCheckParam( L, 1, vIds) + string sToolName ; + LuaCheckParam( L, 2, sToolName) + double dLen ; + LuaCheckParam( L, 3, dLen) + double dDiam ; + LuaCheckParam( L, 4, dDiam) + double dCornR ; + LuaCheckParam( L, 5, dCornR) + int nFlag = 1 ; + LuaGetParam( L, 6, nFlag) ; + LuaClearStack( L) ; + // imposto scalpello a Zmap indicati + bool bOk = ExeVolZmapSetAdditiveTool( vIds, sToolName, dLen, dDiam, dCornR, nFlag, true) ; + // restituisco il risultato + LuaSetParam( L, bOk) ; + return 1 ; +} + + //---------------------------------------------------------------------------- static int LuaVolZmapResetTool( lua_State* L) @@ -375,6 +401,7 @@ LuaInstallGdbModifyVol( LuaMgr& luaMgr) bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapSetGenTool", LuaVolZmapSetGenTool) ; bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapSetMortiserTool", LuaVolZmapSetMortiserTool) ; bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapSetChiselTool", LuaVolZmapSetChiselTool) ; + bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapSetAdditiveTool", LuaVolZmapSetAdditiveTool) ; bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapResetTool", LuaVolZmapResetTool) ; bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapGetToolOutline", LuaVolZmapGetToolOutline) ; bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapMillingStep", LuaVolZmapMillingStep) ; From 9ef30272b4d7209f60b63b98a5333d73d7f61003 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Mon, 22 Apr 2024 15:30:00 +0200 Subject: [PATCH 3/4] EgtExecutor : - aggiunta funzione Exe/Lua GetExitId. --- EXE_MachMgr.cpp | 10 ++++++++++ LUA_MachMgr.cpp | 21 +++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/EXE_MachMgr.cpp b/EXE_MachMgr.cpp index f38e517..746907c 100644 --- a/EXE_MachMgr.cpp +++ b/EXE_MachMgr.cpp @@ -3421,6 +3421,16 @@ ExeGetHeadExitCount( const string& sHead) return pMachMgr->GetHeadExitCount( sHead) ; } +//----------------------------------------------------------------------------- +int +ExeGetExitId( const string& sHead, int nExit) +{ + IMachMgr* pMachMgr = GetCurrMachMgr() ; + VERIFY_MACHMGR( pMachMgr, GDB_ID_NULL) + // restituisco identificativo dell'uscita della testa indicata nella macchina della macchinata corrente + return pMachMgr->GetExitId( sHead, nExit) ; +} + //----------------------------------------------------------------------------- int ExeGetTcPosId( const string& sTcPos) diff --git a/LUA_MachMgr.cpp b/LUA_MachMgr.cpp index c0d101d..6091b1a 100644 --- a/LUA_MachMgr.cpp +++ b/LUA_MachMgr.cpp @@ -3737,6 +3737,26 @@ LuaGetHeadExitCount( lua_State* L) return 1 ; } +//------------------------------------------------------------------------------- +static int +LuaGetExitId( lua_State* L) +{ + // 2 parametri : sHead, nExit + string sHead ; + LuaCheckParam( L, 1, sHead) + int nExit ; + LuaCheckParam( L, 2, nExit) + LuaClearStack( L) ; + // recupero l'identificativo dell'Uscita della Testa indicata della macchina + int nId = ExeGetExitId( sHead, nExit) ; + // restituisco il risultato + if ( nId != GDB_ID_NULL) + LuaSetParam( L, nId) ; + else + LuaSetParam( L) ; + return 1 ; +} + //------------------------------------------------------------------------------- static int LuaGetTcPosId( lua_State* L) @@ -4299,6 +4319,7 @@ LuaInstallMachMgr( LuaMgr& luaMgr) bOk = bOk && luaMgr.RegisterFunction( "EgtGetAxisId", LuaGetAxisId) ; bOk = bOk && luaMgr.RegisterFunction( "EgtGetHeadId", LuaGetHeadId) ; bOk = bOk && luaMgr.RegisterFunction( "EgtGetHeadExitCount", LuaGetHeadExitCount) ; + bOk = bOk && luaMgr.RegisterFunction( "EgtGetExitId", LuaGetExitId) ; bOk = bOk && luaMgr.RegisterFunction( "EgtGetTcPosId", LuaGetTcPosId) ; bOk = bOk && luaMgr.RegisterFunction( "EgtGetAxisToken", LuaGetAxisToken) ; bOk = bOk && luaMgr.RegisterFunction( "EgtGetAxisType", LuaGetAxisType) ; From 9e1f151bbc90bc257749d8df7cbabefa679163e1 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Fri, 26 Apr 2024 11:33:16 +0200 Subject: [PATCH 4/4] EgtExecutor : - adattamenti per Zmap con virtual additive. --- EXE_GdbCreateVol.cpp | 2 +- LUA_GdbModifyVol.cpp | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/EXE_GdbCreateVol.cpp b/EXE_GdbCreateVol.cpp index f60437f..66bb808 100644 --- a/EXE_GdbCreateVol.cpp +++ b/EXE_GdbCreateVol.cpp @@ -88,7 +88,7 @@ int ExeCreateVolZmapEmpty( int nParentId, const Point3d& ptIni, double dDimX, do // creo lo Zmap nel suo riferimento intrinseco PtrOwner pVZM( CreateVolZmap()) ; bOk = bOk && ! IsNull( pVZM) ; - bOk = bOk && pVZM->CreateEmptyMap( ORIG, dDimX, dDimY, dDimZ, dPrec, bTriDex) ; + bOk = bOk && pVZM->CreateEmpty( ORIG, dDimX, dDimY, dDimZ, dPrec, bTriDex) ; // lo porto nel riferimento locale bOk = bOk && pVZM->ToGlob( frBox) ; // inserisco lo Zmap nel DB diff --git a/LUA_GdbModifyVol.cpp b/LUA_GdbModifyVol.cpp index f749bd9..1dedd66 100644 --- a/LUA_GdbModifyVol.cpp +++ b/LUA_GdbModifyVol.cpp @@ -152,7 +152,7 @@ LuaVolZmapSetAdvTool( lua_State* L) static int LuaVolZmapSetSawTool( lua_State* L) { - // 7 o 8 parametri : vIds, sToolName, dLen, dDiam, dThick, dStemDiam, dCornR, nFlag + // 7 o 8 parametri : vIds, sToolName, dLen, dDiam, dThick, dStemDiam, dCornR [, nFlag] INTVECTOR vIds ; LuaCheckParam( L, 1, vIds) string sToolName ; @@ -181,7 +181,7 @@ LuaVolZmapSetSawTool( lua_State* L) static int LuaVolZmapSetGenTool( lua_State* L) { - // 3 o 4 parametri : vIds, sToolName, ToolSectId, nFlag + // 3 o 4 parametri : vIds, sToolName, ToolSectId [, nFlag] INTVECTOR vIds ; LuaCheckParam( L, 1, vIds) string sToolName ; @@ -202,7 +202,7 @@ LuaVolZmapSetGenTool( lua_State* L) static int LuaVolZmapSetMortiserTool( lua_State* L) { - // 6 o 7 parametri : Id, sToolName, dLen, dWidth, dThick, dCornR, nFlag + // 6 o 7 parametri : Id, sToolName, dLen, dWidth, dThick, dCornR [, nFlag] INTVECTOR vIds ; LuaCheckParam( L, 1, vIds) string sToolName ; @@ -229,7 +229,7 @@ LuaVolZmapSetMortiserTool( lua_State* L) static int LuaVolZmapSetChiselTool( lua_State* L) { - // 5 o 6 parametri : vIds, sToolName, dLen, dWidth, dThick, nFlag + // 5 o 6 parametri : vIds, sToolName, dLen, dWidth, dThick [, nFlag] INTVECTOR vIds ; LuaCheckParam( L, 1, vIds) string sToolName ; @@ -254,7 +254,7 @@ LuaVolZmapSetChiselTool( lua_State* L) static int LuaVolZmapSetAdditiveTool( lua_State* L) { - // 5 o 6 parametri : vIds, sToolName, dLen, dWidth, dThick, nFlag + // 5 o 6 parametri : vIds, sToolName, dLen, dDiam, dCornR [, nFlag] INTVECTOR vIds ; LuaCheckParam( L, 1, vIds) string sToolName ; @@ -268,14 +268,13 @@ LuaVolZmapSetAdditiveTool( lua_State* L) int nFlag = 1 ; LuaGetParam( L, 6, nFlag) ; LuaClearStack( L) ; - // imposto scalpello a Zmap indicati + // imposto utensile additivo a Zmap indicati bool bOk = ExeVolZmapSetAdditiveTool( vIds, sToolName, dLen, dDiam, dCornR, nFlag, true) ; // restituisco il risultato LuaSetParam( L, bOk) ; return 1 ; } - //---------------------------------------------------------------------------- static int LuaVolZmapResetTool( lua_State* L)