Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1c8a405478 |
@@ -1088,45 +1088,6 @@ 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<ICurveArc> 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,
|
||||
|
||||
@@ -1668,6 +1668,8 @@ 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
|
||||
@@ -1720,6 +1722,8 @@ 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
|
||||
@@ -1895,6 +1899,7 @@ ExeCreateBezierSphere( int nParentId, const Point3d& ptCenter, double dR, int nR
|
||||
Point3d ptCenterLoc = GetPointLocal( pGeomDB, ptCenter, nRefType, frLoc) ;
|
||||
// Creo la superficie
|
||||
PtrOwner<ISurfBezier> 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
|
||||
|
||||
+56
-14
@@ -1,4 +1,4 @@
|
||||
//----------------------------------------------------------------------------
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2016-2016
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EXE_GdbCreateVol.cpp Data : 27.10.16 Versione : 1.6v7
|
||||
@@ -53,7 +53,7 @@ ExeCreateVolZmap( int nParentId, const Point3d& ptIni, double dDimX, double dDim
|
||||
ExeSetModified() ;
|
||||
// se richiesto, salvo il comando Lua equivalente
|
||||
if ( IsCmdLog()) {
|
||||
string sLua = "EgtVolZmapBox(" + IdToString( nParentId) + ",{" +
|
||||
string sLua = "EgtVolZmapEmpty(" + IdToString( nParentId) + ",{" +
|
||||
ToString( ptIni) + "}," +
|
||||
ToString( dDimX) + "," +
|
||||
ToString( dDimY) + "," +
|
||||
@@ -64,7 +64,7 @@ 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 ;
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ int ExeCreateVolZmapEmpty( int nParentId, const Point3d& ptIni, double dDimX, do
|
||||
// creo lo Zmap nel suo riferimento intrinseco
|
||||
PtrOwner<IVolZmap> pVZM( CreateVolZmap()) ;
|
||||
bOk = bOk && ! IsNull( pVZM) ;
|
||||
bOk = bOk && pVZM->CreateEmpty( ORIG, dDimX, dDimY, dDimZ, dPrec, bTriDex) ;
|
||||
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
|
||||
@@ -107,7 +107,7 @@ int ExeCreateVolZmapEmpty( int nParentId, const Point3d& ptIni, double dDimX, do
|
||||
" -- Id=" + ToString( nNewId) ;
|
||||
LOG_INFO( GetCmdLogger(), sLua.c_str()) ;
|
||||
}
|
||||
// restituisco l'identificativo della nuova entità
|
||||
// restituisco l'identificativo della nuova entità
|
||||
return nNewId ;
|
||||
}
|
||||
|
||||
@@ -146,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 ;
|
||||
}
|
||||
|
||||
@@ -161,8 +161,8 @@ ExeCreateVolZmapFromSurfTm( int nParentId, int nStmId, double dPrec, bool bTriDe
|
||||
const ISurfTriMesh* pStm = GetSurfTriMesh( pGeomDB->GetGeoObj( nStmId)) ;
|
||||
bool bOk = ( pStm != nullptr) ;
|
||||
// recupero il riferimento della trimesh
|
||||
Frame3d frStm ;
|
||||
bOk = bOk && pGeomDB->GetGlobFrame( nStmId, frStm) ;
|
||||
//Frame3d frStm ;
|
||||
//bOk = bOk && pGeomDB->GetGlobFrame( nStmId, frStm) ;
|
||||
// recupero il riferimento del gruppo di destinazione
|
||||
Frame3d frDest ;
|
||||
bOk = bOk && pGeomDB->GetGroupGlobFrame( nParentId, frDest) ;
|
||||
@@ -171,19 +171,61 @@ ExeCreateVolZmapFromSurfTm( int nParentId, int nStmId, double dPrec, bool bTriDe
|
||||
bOk = bOk && ! IsNull( pVZM) ;
|
||||
bOk = bOk && pVZM->CreateFromTriMesh( *pStm, dPrec, bTriDex) ;
|
||||
// lo porto nel riferimento di destinazione
|
||||
bOk = bOk && pVZM->LocToLoc( frStm, frDest) ;
|
||||
//bOk = bOk && pVZM->LocToLoc( frStm, frDest) ;
|
||||
// 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 = "EgtVolZmapFromTriMesh(" + IdToString( nParentId) + "," +
|
||||
ToString( nStmId) + "," +
|
||||
ToString( dPrec) + "," +
|
||||
( bTriDex ? "true" : "false") + ")" +
|
||||
string sLua = "UpdateVolZmapByAddingSurfTm(" + IdToString( nParentId) + "," +
|
||||
IdToString( nStmId) + "," +
|
||||
ToString( nStmId) + "," +
|
||||
ToString( dPrec) + "," +
|
||||
( bTriDex ? "true" : "false") + ")" +
|
||||
" -- Id=" + ToString( nNewId) ;
|
||||
LOG_INFO( GetCmdLogger(), sLua.c_str()) ;
|
||||
}
|
||||
// restituisco l'identificativo della nuova entità
|
||||
// restituisco l'identificativo della nuova entità
|
||||
return nNewId ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
bool
|
||||
ExeUpdateVolZmapByAddingSurfTm( int nParentId, int nZmapId, int nStmId)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, GDB_ID_NULL)
|
||||
nParentId = AdjustId( nParentId) ;
|
||||
// recupero lo Zmap
|
||||
IVolZmap* pVolZmap = GetVolZmap( pGeomDB->GetGeoObj( nZmapId)) ;
|
||||
bool bOk = pVolZmap != nullptr ;
|
||||
// recupero il riferimento dello Zmap
|
||||
Frame3d frZmap ;
|
||||
bOk = bOk && pGeomDB->GetGlobFrame( nZmapId, frZmap) ;
|
||||
// recupero la trimesh
|
||||
PtrOwner<ISurfTriMesh> pStm( CloneSurfTriMesh( pGeomDB->GetGeoObj( nStmId))) ;
|
||||
bOk = bOk && ( pStm != nullptr) ;
|
||||
// recupero il riferimento della trimesh
|
||||
Frame3d frStm ;
|
||||
bOk = bOk && pGeomDB->GetGlobFrame( nStmId, frStm) ;
|
||||
// recupero il riferimento del gruppo di destinazione
|
||||
Frame3d frDest ;
|
||||
bOk = bOk && pGeomDB->GetGroupGlobFrame( nParentId, frDest) ;
|
||||
// porto lo Zmap e la trimesh nel riferimento della destinazione
|
||||
bOk = bOk &&
|
||||
pVolZmap->LocToLoc( frZmap, frDest) &&
|
||||
pStm->LocToLoc( frStm, frDest) ;
|
||||
// aggiorno lo Zmap
|
||||
bOk = bOk && pVolZmap->AddSrfTm( pStm) ;
|
||||
// riporto lo Zmap nel frame originario
|
||||
bOk = bOk && pVolZmap->LocToLoc( frDest, frStm) ;
|
||||
ExeSetModified() ;
|
||||
// se richiesto, salvo il comando Lua equivalente
|
||||
if ( IsCmdLog()) {
|
||||
string sLua = "EgtVolZmapFromTriMesh(" + IdToString( nParentId) + "," +
|
||||
ToString( nStmId) + ")" ;
|
||||
LOG_INFO( GetCmdLogger(), sLua.c_str()) ;
|
||||
}
|
||||
// restituisco l'identificativo della nuova entità
|
||||
return bOk ;
|
||||
}
|
||||
|
||||
@@ -337,34 +337,6 @@ 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)
|
||||
|
||||
@@ -3421,16 +3421,6 @@ 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)
|
||||
|
||||
@@ -425,34 +425,6 @@ 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)
|
||||
@@ -1111,7 +1083,6 @@ 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) ;
|
||||
|
||||
+23
-6
@@ -56,7 +56,7 @@ LuaCreateVolZmapBox( lua_State* L)
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaCreateVolZmapEmpty( lua_State* L)
|
||||
LuaCreateVolZMapEmpty( lua_State* L)
|
||||
{
|
||||
// 6 o 7 o 8 parametri : ParentId, PtIni, dDimX, dDimY, dDimZ, dPrec [, bTriDex] [, nRefType]
|
||||
int nParentId ;
|
||||
@@ -78,7 +78,7 @@ LuaCreateVolZmapEmpty( lua_State* L)
|
||||
else
|
||||
LuaGetParam( L, 8, nRefType) ;
|
||||
LuaClearStack( L) ;
|
||||
// creo VZM parallelepipedo
|
||||
// creo VZM da superficie trimesh
|
||||
int nId = ExeCreateVolZmapEmpty( nParentId, ptIni, dDimX, dDimY, dDimZ, dPrec, bTriDex, nRefType) ;
|
||||
// restituisco il risultato
|
||||
if ( nId != GDB_ID_NULL)
|
||||
@@ -88,8 +88,6 @@ LuaCreateVolZmapEmpty( lua_State* L)
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaCreateVolZmapByRegionExtrusion( lua_State* L)
|
||||
@@ -130,7 +128,7 @@ LuaCreateVolZmapFromSurfTm( lua_State* L)
|
||||
bool bTriDex = true ;
|
||||
LuaGetParam( L, 4, bTriDex) ;
|
||||
LuaClearStack( L) ;
|
||||
// creo VZM da superficie trimesh
|
||||
// creo VZM da superficie trimesh
|
||||
int nId = ExeCreateVolZmapFromSurfTm( nParentId, nStmId, dPrec, bTriDex) ;
|
||||
// restituisco il risultato
|
||||
if ( nId != GDB_ID_NULL)
|
||||
@@ -140,14 +138,33 @@ LuaCreateVolZmapFromSurfTm( lua_State* L)
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaUpdateVolZmapByAddingSurfTm( lua_State* L)
|
||||
{
|
||||
// 3 ParentId, ZmapId, StmId
|
||||
int nParentId ;
|
||||
LuaCheckParam( L, 1, nParentId)
|
||||
int nZmapId ;
|
||||
LuaCheckParam( L, 2, nZmapId)
|
||||
int nStmId ;
|
||||
LuaCheckParam( L, 3, nStmId)
|
||||
LuaClearStack( L) ;
|
||||
// creo VZM da superficie trimesh
|
||||
bool bOk = ExeUpdateVolZmapByAddingSurfTm( nParentId, nZmapId, nStmId) ;
|
||||
LuaSetParam( L, bOk) ;
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
bool
|
||||
LuaInstallGdbCreateVol( LuaMgr& luaMgr)
|
||||
{
|
||||
bool bOk = ( &luaMgr != nullptr) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapBox", LuaCreateVolZmapBox) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapEmpty", LuaCreateVolZmapEmpty) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapEmpty", LuaCreateVolZMapEmpty) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapByRegionExtrusion", LuaCreateVolZmapByRegionExtrusion) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapFromSurfTm", LuaCreateVolZmapFromSurfTm) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtUpdateVolZmapByAddingSurfTm", LuaUpdateVolZmapByAddingSurfTm) ;
|
||||
return bOk ;
|
||||
}
|
||||
|
||||
+4
-30
@@ -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 ;
|
||||
@@ -250,31 +250,6 @@ LuaVolZmapSetChiselTool( lua_State* L)
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
static int
|
||||
LuaVolZmapSetAdditiveTool( lua_State* L)
|
||||
{
|
||||
// 5 o 6 parametri : vIds, sToolName, dLen, dDiam, dCornR [, 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 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)
|
||||
@@ -400,7 +375,6 @@ 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) ;
|
||||
|
||||
@@ -3737,26 +3737,6 @@ 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)
|
||||
@@ -4319,7 +4299,6 @@ 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) ;
|
||||
|
||||
Reference in New Issue
Block a user