EgtInterface 1.6o4 :

- aggiunte interfacce per EgtGetOperationName, EgtGetOperationId, EgtAddMachining, EgtCreateMachining, EgtSetMachiningGeometry.
This commit is contained in:
Dario Sassi
2016-04-06 06:32:25 +00:00
parent 33603e5961
commit 129a54dedc
2 changed files with 48 additions and 0 deletions
+48
View File
@@ -769,6 +769,26 @@ __stdcall EgtGetOperationPhase( int nId)
return ExeGetOperationPhase( nId) ;
}
//-----------------------------------------------------------------------------
BOOL
__stdcall EgtGetOperationName( int nId, wchar_t*& wsName)
{
if ( &wsName == nullptr)
return FALSE ;
string sName ;
if ( ! ExeGetOperationName( nId, sName))
return FALSE ;
wsName = _wcsdup( stringtoW( sName)) ;
return (( wsName == nullptr) ? FALSE : TRUE) ;
}
//-----------------------------------------------------------------------------
int
__stdcall EgtGetOperationId( const wchar_t* wsName)
{
return ExeGetOperationId( wstrztoA( wsName)) ;
}
//-----------------------------------------------------------------------------
BOOL
__stdcall EgtRemoveOperation( int nId)
@@ -854,6 +874,20 @@ __stdcall EgtGetPhaseDisposition( int nPhase)
//-----------------------------------------------------------------------------
// Machinings
//-----------------------------------------------------------------------------
int
__stdcall EgtAddMachining( const wchar_t* wsName, const wchar_t* wsMachining)
{
return ExeAddMachining( wstrztoA( wsName), wstrztoA( wsMachining)) ;
}
//-----------------------------------------------------------------------------
int
__stdcall EgtCreateMachining( const wchar_t* wsName, int nMchType, const wchar_t* wsTool)
{
return ExeAddMachining( wstrztoA( wsName), nMchType, wstrztoA( wsTool)) ;
}
//-----------------------------------------------------------------------------
BOOL
__stdcall EgtSetCurrMachining( int nId)
@@ -889,6 +923,20 @@ __stdcall EgtSetMachiningParamString( int nType, const wchar_t* wsVal)
return ( ExeSetMachiningParam( nType, string( wstrztoA( wsVal))) ? TRUE : FALSE) ;
}
//-----------------------------------------------------------------------------
BOOL
__stdcall EgtSetMachiningGeometry( int nNumId, const int nIds[], const int nSubs[])
{
if ( nIds == nullptr || nSubs == nullptr)
return FALSE ;
// creo elenco identificativi
SELVECTOR vIds ;
for ( int i = 0 ; i < nNumId ; ++ i)
vIds.emplace_back( nIds[i], nSubs[i]) ;
vIds.reserve( nNumId) ;
return ( ExeSetMachiningGeometry( vIds) ? TRUE : FALSE) ;
}
//-----------------------------------------------------------------------------
BOOL
__stdcall EgtPreviewMachining( BOOL bRecalc)